SA-MP Forums Archive
SetVehicleNumberPlate - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetVehicleNumberPlate (/showthread.php?tid=499577)



SetVehicleNumberPlate - Lidor124 - 08.03.2014

How to set for vehicle after typing command /buycar a random SetVehicleNumberPlate for car and it will be saved with dini or Y_ini or whatever save system it will be...
I mean SetVehicleNumberPlate - will set with random 4 characters and 4 random numbers example:

NKSP 5466

+REP


Re: SetVehicleNumberPlate - XK - 08.03.2014

pawn Код:
new LetterList[26][] =
{
    "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"
};
now the random:
pawn Код:
new string[10];
    format(string, sizeof(string), "%s%s%s%s %d%d%d", LetterList[random(sizeof(LetterList))], LetterList[random(sizeof(LetterList))], LetterList[random(sizeof(LetterList))], LetterList[random(sizeof(LetterList))], random(10), random(10), random(10));
    SetVehicleNumberPlate(vehicleid, string);
and it will have 4 letters and 4 numbers,i will make the saving now