[HELP] Random Numbers
#1

I'm experimenting for the first time, the random() feature in SAMP. I'm going to use it to create random license plates on dynamic vehicles. When I use the command /dvcreate, it creates a vehicle. It then will call the function Random(999) to get the first side of the license plate, and another one to get the second part. So the string would look like

pawn Код:
%d - %d
And the plate would look like (at random

pawn Код:
451 - 942
What I'm wondering, if the number reaches like 45, if I could set it to have a zero before it so it will still come out to three characters, like

pawn Код:
045 - 541
And if it is possible to not only have numbers, but have letters as well.

Help please!
Reply


Messages In This Thread
[HELP] Random Numbers - by BornHuman - 01.12.2014, 04:46
Re: [HELP] Random Numbers - by Capua - 01.12.2014, 05:14
Re: [HELP] Random Numbers - by Threshold - 01.12.2014, 06:35

Forum Jump:


Users browsing this thread: 1 Guest(s)