Number Plate Help
#1

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 ?
Reply
#2

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);
Reply
#3

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

Correct Me If I am Wrong.

Thanks
Reply
#4

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.
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)