Detaljan opis problema: Problem je u komandi /v , neznam nece komande u dialogu da rade neznam zasto ☹️ 😢 😢
Dio skripte:
EVO KOMANDE:
YCMD:v(playerid, params[], help)
{
#pragma unused help
#pragma unused params
new vehicleid = GetPlayerVehicleID(playerid);
if(Player == 9999 && Player == 9999 && Player == 9999) return SCM(playerid,COLOR_RED,"Nemate svoje vozilo!");
if(strcmp(C_Data,GetName(playerid), false ) == 0)
{
ShowPlayerDialog(playerid,DIALOG_CARS+1,DIALOG_STYLE_LIST,"Kontrola Vozila","Boja\nZakljucaj Auto\nOdkljucaj Auto\nProdaj Auto\nParkiraj Auto\nLociraj Auto\nAlarm","Odaberi","Odkazi");
}
return 1;
}EVO ODGOVORA NA DIALOG
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_CARS+1:
{
if(!response) return SCM(playerid,-1,"Dialog zatvoren");
new vehicleid = GetPlayerVehicleID(playerid);
switch(listitem)
{
case 0: {
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,"Morate biti u svom vozilu!");
ShowPlayerDialog(playerid,DIALOG_CARS,DIALOG_STYLE_INPUT,"Boja","Cjena: $200\nUpisite boju vozila(ID).\n Primjer: 5 9","Promjeni","Odkazi"); }
case 1: {
ShowPlayerDialog(playerid,DIALOG_CARS+5,DIALOG_STYLE_LIST,"Kontrola Vozila","Prvo Auto\nDrugo Auto\nTrece Auto","Zakljucaj","Odkazi");
}
case 2: {
ShowPlayerDialog(playerid,DIALOG_CARS+2,DIALOG_STYLE_LIST,"Kontrola Vozila","Prvo Auto\nDrugo Auto\nTrece Auto","Odkljucaj","Odkazi");
}
case 3: {
new string;
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,"Morate biti u vasem vozilu");
new price = GetVehiclePrice(GetVehicleModel(vehicleid));
if(Player == 0 && Player == 0 && Player == 0) return SCM(playerid,COLOR_RED,"Nemate vozilo..");
GivePlayerMoney(playerid, price/2);
SendFormatMSG(playerid,-1,"Prodali ste vase vozilo za: $%d",price/2);
DestroyVehicle(vehicleid);
if(Player == vehicleid)
{
format(string,sizeof(string),CoS_File,C_Data);
C_Data = 0;
C_Data = 0;
C_Data = 0;
C_Data = 0;
format(C_Data,128,"Department");
CheckCar(Player);
Player = 0;
UpdatePlayerInfo(playerid);
}
else if(Player == vehicleid)
{
format(string,sizeof(string),CoS_File,C_Data);
C_Data = 0;
C_Data = 0;
C_Data = 0;
C_Data = 0;
format(C_Data,128,"Department");
CheckCar(Player);
Player = 0;
UpdatePlayerInfo(playerid);
}
else if(Player == vehicleid)
{
format(string,sizeof(string),CoS_File,C_Data);
C_Data = 0;
C_Data = 0;
C_Data = 0;
C_Data = 0;
format(C_Data,128,"Department");
CheckCar(Player);
Player = 0;
UpdatePlayerInfo(playerid);
}
}
case 4: {
if(!IsPlayerInAnyVehicle(playerid)) return SCM(playerid,COLOR_RED,"Niste u vozilu!");
new Float:Pos; GetPlayerPos(playerid,Pos,Pos,Pos); GetVehicleZAngle(vehicleid, Pos);
C_Data = Pos;
C_Data = Pos;
C_Data = Pos;
C_Data = Pos;
SetVehiclePos(vehicleid, C_Data,C_Data,C_Data);
SetVehicleZAngle(vehicleid, C_Data);
SCM(playerid,-1,"Vehicle is parked.");
CheckCar(C_Data);}
case 5: {
ShowPlayerDialog(playerid,DIALOG_CARS+3,DIALOG_STYLE_LIST,"Kontrola Vozila","Prvo Auto\nDrugo Auto\nTrece Auto","Odkljucaj","Odkazi");
}
case 6: {
ShowPlayerDialog(playerid,DIALOG_CARS+4,DIALOG_STYLE_LIST,"Kontrola Vozila","Prvo Auto\nDrugo Auto\nTrece Auto","Izaberi","Odkazi");
}
}
}
case DIALOG_CARS+4://For alarm
{
if(!response) return 1;
switch(listitem)
{
case 0:
{
new id = Player;
new Float:Pos; GetVehiclePos(id,Pos,Pos,Pos);
if(id == 999) return SCM(playerid,-1,"You don't have car on this slot");
if(!IsPlayerInRangeOfPoint(playerid,40.0,Pos,Pos,Pos)) return SCM(playerid,-1,"Niste u blizini vaseg vozila");
AlarmChoose = 1;
AlarmChooseID = id;
TextDrawShowForPlayer(playerid,AlarmTD0);
TextDrawShowForPlayer(playerid,AlarmTD1);
TextDrawSetString(AlarmTD1,"~p~~h~Alarm: ~r~ON~n~~n~~p~~h~Alarm: ~w~OFF");
}
case 1:
{
new id = Player;
new Float:Pos; GetVehiclePos(id,Pos,Pos,Pos);
if(id == 999) return SCM(playerid,-1,"You don't have car on this slot");
if(!IsPlayerInRangeOfPoint(playerid,40.0,Pos,Pos,Pos)) return SCM(playerid,-1,"Niste u blizini vaseg vozila");
AlarmChoose = 1;
AlarmChooseID = id;
TextDrawShowForPlayer(playerid,AlarmTD0);
TextDrawShowForPlayer(playerid,AlarmTD1);
TextDrawSetString(AlarmTD1,"~p~~h~Alarm: ~r~ON~n~~n~~p~~h~Alarm: ~w~OFF");
}
case 2:
{
new id = Player;
new Float:Pos; GetVehiclePos(id,Pos,Pos,Pos);
if(id == 999) return SCM(playerid,-1,"You don't have car on this slot");
if(!IsPlayerInRangeOfPoint(playerid,40.0,Pos,Pos,Pos)) return SCM(playerid,-1,"Niste u blizini vaseg vozila");
AlarmChoose = 1;
AlarmChooseID = id;
TextDrawShowForPlayer(playerid,AlarmTD0);
TextDrawShowForPlayer(playerid,AlarmTD1);
TextDrawSetString(AlarmTD1,"~p~~h~Alarm: ~r~ON~n~~n~~p~~h~Alarm: ~w~OFF");
}
}
}
case DIALOG_CARS+2:
{
switch(listitem)
{
case 0: {
if(Player != 9999) { C_Data[Player] = 0; CheckCar(Player); } }
case 1: {
if(Player != 9999) { C_Data[Player] = 0; CheckCar(Player); } }
case 2: {
if(Player != 9999) { C_Data[Player] = 0; CheckCar(Player); } }
}
}
case DIALOG_CARS+3://Dialog for locate
{
switch(listitem)
{
case 0: {
if(Player != 9999) {new Float:Postition; GPSOn = true; GetVehiclePos(Player,Postition,Postition,Postition); SetPlayerCheckpoint(playerid,Postition,Postition,Postition,5.0); SCM(playerid,-1,"Vehicle is located for turn of GPS type /gpsoff");} }
case 1: {
if(Player != 9999) {new Float:Postition; GPSOn = true; GetVehiclePos(Player,Postition,Postition,Postition); SetPlayerCheckpoint(playerid,Postition,Postition,Postition,5.0); SCM(playerid,-1,"Vehicle is located for turn of GPS type /gpsoff");} }
case 2: {
if(Player != 9999) {new Float:Postition; GPSOn = true; GetVehiclePos(Player,Postition,Postition,Postition); SetPlayerCheckpoint(playerid,Postition,Postition,Postition,5.0); SCM(playerid,-1,"Vehicle is located for turn of GPS type /gpsoff");} }
}
}
case DIALOG_CARS://For color
{
new vehicleid = GetPlayerVehicleID(playerid),col;
if(sscanf(inputtext,"ii",col,col)) return ShowPlayerDialog(playerid,DIALOG_CARS,DIALOG_STYLE_INPUT,"Boja","Upisite boju vozila(ID).\n Primjer: 5 9","Promjeni","Odkazi");
C_Data = col;
C_Data = col;
GivePlayerMoney(playerid,-200);
ChangeVehicleColor(vehicleid,col,col);
CheckCar(vehicleid);
}
case DIALOG_CARS+5://For lock
{
switch(listitem)
{
case 0: {
if(Player != 9999) { C_Data[Player] = 1; CheckCar(Player); } }
case 1: {
if(Player != 9999) { C_Data[Player] = 1; CheckCar(Player); } }
case 2: {
if(Player != 9999) { C_Data[Player] = 1; CheckCar(Player); } }
}
}
}
return 1;
}Neke slike/video za lakse dobivanje pomoci(neobavezno):
