Код:
CMD:v(playerid, params[], help)
{
new string[256];
if(P_Enum[playerid][pe_CarKey] == -1 && P_Enum[playerid][pe_CarKey2] == -1 && P_Enum[playerid][pe_CarKey3] == -1)
{ GRESKA(playerid, "Nemate nijedno vozilo!"); return 1; }
else if(P_Enum[playerid][pe_VoziloKljuc] != -1 && P_Enum[playerid][pe_VoziloKljuc2] == -1 && P_Enum[playerid][pe_VoziloKljuc3] == -1)
{
format(string,sizeof(string),"%s\nNema Vozila\nNema Vozila", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc]][ce_Model]) );
ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
}
else if(P_Enum[playerid][pe_VoziloKljuc] == -1 && P_Enum[playerid][pe_VoziloKljuc2] != -1 && P_Enum[playerid][pe_VoziloKljuc3] == -1)
{
format(string,sizeof(string),"Nema Vozila\n%s\nNema Vozila", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc2]][ce_Model]) );
ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
}
else if(P_Enum[playerid][pe_VoziloKljuc] == -1 && P_Enum[playerid][pe_VoziloKljuc2] == -1 && P_Enum[playerid][pe_VoziloKljuc3] != -1)
{
format(string,sizeof(string),"Nema Vozila\nNema Vozila\n%s", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc3]][ce_Model]) );
ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
}
else if(P_Enum[playerid][pe_VoziloKljuc] != -1 && P_Enum[playerid][pe_VoziloKljuc2] != -1 && P_Enum[playerid][pe_VoziloKljuc3] == -1)
{
format(string,sizeof(string),"%s\n%s\nNema Vozila", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc]][ce_Model]),GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc2]][ce_Model]) );
ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
}
else if(P_Enum[playerid][pe_VoziloKljuc] != -1 && P_Enum[playerid][pe_VoziloKljuc2] == -1 && P_Enum[playerid][pe_VoziloKljuc3] != -1)
{
format(string,sizeof(string),"%s\nNema Vozila\n%s", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc]][ce_Model]),GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc3]][ce_Model]) );
ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
}
else if(P_Enum[playerid][pe_VoziloKljuc] == -1 && P_Enum[playerid][pe_VoziloKljuc2] != -1 && P_Enum[playerid][pe_VoziloKljuc3] != -1)
{
format(string,sizeof(string),"Nema Vozila\n%s\n%s", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc2]][ce_Model]),GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc3]][ce_Model]) );
ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
}
else if(P_Enum[playerid][pe_VoziloKljuc] != -1 && P_Enum[playerid][pe_VoziloKljuc2] != -1 && P_Enum[playerid][pe_VoziloKljuc3] != -1)
{
format(string,sizeof(string),"%s\n%s\n%s", GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc]][ce_Model]),GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc2]][ce_Model]),GetVehicleNameEx(C_Enum[P_Enum[playerid][pe_VoziloKljuc3]][ce_Model]) );
ShowPlayerDialog(playerid, DIALOG_VOZILO123, DIALOG_STYLE_LIST, ""COL_WHITE"Vozilo kontrola", string, "Odabir", "Ponisti");
}
else return 1;
return 1;
}