SA-MP Forums Archive
Number Plate Help - 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: Number Plate Help (/showthread.php?tid=159475)



Number Plate Help - Hash [NL-RP] - 13.07.2010

I've recently created a number plate system on my server
i want it be a mix of numbers and letters

i am using this code

new plate = 100000 + random(899999);

How can i get letters to ?


Re: Number Plate Help - Finn - 13.07.2010

I made a code for you, this fills up a string with random letters:

pawn Код:
stock randomletters(string[], maxlen = sizeof(string))
{
    new i;
    while(i < maxlen)
    {
        if(random(2))
        {
            //upper
            string[i] = random(26) + 65;
        }
        else
        {
            //lower
            string[i] = random(26) + 97;
        }
        i++;
    }
    return 1;
}
EXAMPLE OF USAGE:
pawn Код:
new string[20];

randomletters(string);

print(string);



Re: Number Plate Help - Falcon Interceptor - 13.07.2010

I thought that Number Plate changing isn't working in SAMP 0.3

Correct Me If I am Wrong.

Thanks


Re: Number Plate Help - Mr187 - 13.07.2010

Quote:
Originally Posted by Falcon Interceptor
Посмотреть сообщение
I thought that Number Plate changing isn't working in SAMP 0.3

Correct Me If I am Wrong.

Thanks
Your not wrong, It doesn't work at all in 0.3 as i am aware and tried everything to get it to work, It was even removed from the wiki.


Re: Number Plate Help - Hash [NL-RP] - 13.07.2010

Quote:
Originally Posted by Mr187
Посмотреть сообщение
Your not wrong, It doesn't work at all in 0.3 as i am aware and tried everything to get it to work, It was even removed from the wiki.
Not the actuall car plate, you will type /stats and it will show
Car Plate : [1243234]

And the above your car there will be a text draw showing the plate, but its almost finished now
so thats for the help