Displaying vehicle model as name.
#9

There difference between those 2 vehicle models is about 100 so debug it:
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;
}
Go in-game, execute the command once again and post what it printed in the console/server log.
Reply


Messages In This Thread
Displaying vehicle model as name. - by Zeppo - 29.03.2014, 18:40
Re: Displaying vehicle model as name. - by Abagail - 29.03.2014, 18:52
Re: Displaying vehicle model as name. - by Zeppo - 29.03.2014, 18:58
Re: Displaying vehicle model as name. - by Niko_boy - 29.03.2014, 19:06
Re: Displaying vehicle model as name. - by Konstantinos - 29.03.2014, 19:20
Re: Displaying vehicle model as name. - by Zeppo - 29.03.2014, 19:37
Re: Displaying vehicle model as name. - by Konstantinos - 29.03.2014, 19:43
Re: Displaying vehicle model as name. - by Zeppo - 29.03.2014, 19:48
Re: Displaying vehicle model as name. - by Konstantinos - 29.03.2014, 19:55
Re: Displaying vehicle model as name. - by Zeppo - 29.03.2014, 21:06

Forum Jump:


Users browsing this thread: 1 Guest(s)