SA-MP Forums Archive
License plate - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: License plate (/showthread.php?tid=251244)



License plate NEW QUESTION page 2 - ColdIce - 26.04.2011

Hello, I was wondering, all vehicles on my server have the same license plate! Is it possible of change that to something else? Or is it possible to make a script that makes ALL plates say "Stunts"?


Re: License plate - Steven82 - 26.04.2011

pawn Код:
for(new i = 0; i < MAX_VEHICLES; i++)
{
 SetVehicleNumberPlate(i, "Stunts");
 SetVehicleToRespawn(i);
}
Put this under OnGameModeInit

Edit:
Put this after all the vehicles you have created.


Re: License plate - ellyx - 26.04.2011

Yes, it is possible

Just find: OnVehicleSpawn(vehicleid) and bellow add this:

Код:
new rand = random(3000); rand += 1500;
new string[32];
format(string, sizeof(string), "{D20000}STUNTS", rand);
SetVehicleNumberPlate(vehicleid, string);



Re: License plate - Steven82 - 26.04.2011

Quote:
Originally Posted by ellyx
Посмотреть сообщение
Yes, it is possible

Just find: OnVehicleSpawn(vehicleid) and bellow add this:

Код:
new rand = random(3000); rand += 1500;
new string[32];
format(string, sizeof(string), "{D20000}STUNTS", rand);
SetVehicleNumberPlate(vehicleid, string);
My way, is truly and honestly easier, since it does it right when the GameMode starts up.


Re: License plate - ellyx - 26.04.2011

Quote:
Originally Posted by Steven82
Посмотреть сообщение
My way, is truly and honestly easier, since it does it right when the GameMode starts up.
Sure, but I try to help this guy, but you post Earlier


Re: License plate - Steven82 - 26.04.2011

yeah i'm glad your attempting to help and not sit on your ass


Re: License plate - ColdIce - 26.04.2011

Quote:
Originally Posted by ellyx
Посмотреть сообщение
Yes, it is possible

Just find: OnVehicleSpawn(vehicleid) and bellow add this:

Код:
new rand = random(3000); rand += 1500;
new string[32];
format(string, sizeof(string), "{D20000}STUNTS", rand);
SetVehicleNumberPlate(vehicleid, string);
Quote:

public OnVehicleSpawn(vehicleid)
{
[code=C]new rand = random(3000); rand += 1500;
new string[32];
format(string, sizeof(string), "{D20000}STUNTS", rand);
SetVehicleNumberPlate(vehicleid, string);[/code]
}

??
4 errors


Re: License plate - ColdIce - 26.04.2011

nvm it compiled. Gonna try it


nope didnt work


Re: License plate - Steven82 - 26.04.2011

ColdIce, which one are you trying? Did you try Ellyx's, or mine?


Re: License plate - ColdIce - 26.04.2011

Tried both, your showed me shitload of errors and Ellyx showed none, but it just didnt work on the server