[Tutorial] Random vehicles plate for 0.3c versions
#1

Hey Guys i Today show how to make a random venhicle plate

You dont need any include only /include <a_samp>

now found Function called OnVehicleSpawn

now under OnVehicleSpawn put these code

Код:
public OnVehicleSpawn(vehicleid)
 {
new rand = random(3000) + 1500;
new string[24];
format(string, sizeof(string), "{D20000}LS-{FFFFFF}%d", rand);
SetVehicleNumberPlate(vehicleid, string);

	return true;
}
explanation

Код:
new rand = random(3000); + 1500;
it says variable with random numbers to 3000 and then adds the random number 1500, for example . If the number comes out randomly in 1234 then added in 1500 and it comes out 2734.
Код:
new string[24];
it makes new string with 24 cell
Код:
format(string, sizeof(string), "{D20000}LS-{FFFFFF}%d", rand);
Format functions including string variables and other strings . D20000 LS- } { { FFFFFF } % d explained to be " LS " in red colours , a random number ( rand variable) is written in white , Color Embedding ( 0.3c )
sorry for My bad languange i Serbian
Reply


Messages In This Thread
Random vehicles plate for 0.3c versions - by Dejan12345 - 03.08.2016, 13:37
Re: Random vehicles plate for 0.3c versions - by Stinged - 03.08.2016, 14:08
Re: Random vehicles plate for 0.3c versions - by Dejan12345 - 03.08.2016, 14:26
Re: Random vehicles plate for 0.3c versions - by Deadpoop - 03.08.2016, 15:58
Re: Random vehicles plate for 0.3c versions - by Luicy. - 03.08.2016, 16:19
Re: Random vehicles plate for 0.3c versions - by Dejan12345 - 04.08.2016, 08:43

Forum Jump:


Users browsing this thread: 1 Guest(s)