Make a unique number - 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: Make a unique number (
/showthread.php?tid=614618)
Make a unique number -
Bondz - 10.08.2016
I'm trying make each vehicle has unique plate by using their vehicle id.
PHP код:
vid = AddStaticVehicleEx(vehicletype,SpawnX,SpawnY,SpawnZ,SpawnRot,Color1,Color2,(30*60),0); // respawn 30 minutes
new numplate_test[32+1];
format(numplate_test,32,"VEH {FF0000}%d RP",vid);
SetVehicleNumberPlate(vid, numplate_test);
Ex:If the vehicle id is 50,I want to make them + 22,so 50+22=72,the plate will be shown 'VEH 72 RP'
How do i do that?
Re: Make a unique number -
Kaliber - 10.08.2016
Ehh just add 22?!
PHP код:
format(numplate_test,32,"VEH {FF0000}%d RP",vid+22);
Re: Make a unique number -
Konstantinos - 10.08.2016
You will need to add the desired number in format such "vid + 22" as argument, based on your example.