29.03.2014, 19:55
There difference between those 2 vehicle models is about 100 so debug it:
Go in-game, execute the command once again and post what it printed in the console/server log.
pawn Код:
CMD:myvehicles(playerid, params[])
{
new
id1 = GetVehicleModel(PlayerInfo[playerid][pVehicle1]),
id2 = GetVehicleModel(PlayerInfo[playerid][pVehicle2]),
id3 = GetVehicleModel(PlayerInfo[playerid][pVehicle3]),
string[100];
printf("%s (%i) | %s (%i) | %s (%i)", (400 <= id1 <= 611) ? (VehicleNames[id1 - 400]) : ("N/A"), id1, (400 <= id2 <= 611) ? (VehicleNames[id2 - 400]) : ("N/A"), id2, (400 <= id3 <= 611) ? (VehicleNames[id3 - 400]) : ("N/A"), id3);
format(string, sizeof (string), "%s\n%s\n%s", (400 <= id1 <= 611) ? (VehicleNames[id1 - 400]) : ("N/A"), (400 <= id2 <= 611) ? (VehicleNames[id2 - 400]) : ("N/A"), (400 <= id3 <= 611) ? (VehicleNames[id3 - 400]) : ("N/A"));
ShowPlayerDialog(playerid, DIALOG_MYVEH, DIALOG_STYLE_LIST, "Your current vehicles:", string, "Info", "Cancel");
return 1;
}