01.01.2012, 23:30
BTW after adding GetVehicleNameFromID to this command, it comes up with server unknown command, and when I take it off, it works.
pawn Код:
if(strcmp(cmd, "/v", true) == 0)
{
if(PlayerInfo[playerid][pCarKey1] == 999 && PlayerInfo[playerid][pCarKey2] == 999)
{
SendClientMessage(playerid, COLOR_WHITE,"Nie masz zadnego samochodu");
return 0;
}
new stringV[256];
new option1[128];
new option2[128];
new CarFile[35];
new CarFile2[35];
format(CarFile,sizeof(CarFile),"Auta/%d.ini",PlayerInfo[playerid][pCarKey1]);
format(CarFile2,sizeof(CarFile2),"Auta/%d.ini",PlayerInfo[playerid][pCarKey2]);
new string12[128];
new string13[128];
format(string12, sizeof(string12), "%s",GetVehicleNameFromID(dini_Int(CarFile,"ModelID")));
format(string13, sizeof(string13), "%s",GetVehicleNameFromID(dini_Int(CarFile2,"ModelID")));
format(option1,sizeof(option1),"%s [UID: %d]",string12,PlayerInfo[playerid][pCarKey1]);
format(option2,sizeof(option2),"%s [UID: %d]",string13,PlayerInfo[playerid][pCarKey2]);
format(stringV,sizeof(stringV),"%s\n%s",option1,option2);
ShowPlayerDialog(playerid, VCMD, DIALOG_STYLE_LIST, "Twoje pojazdy:", stringV, "Wybierz", "Zamknij");
return 1;
}