Number Plate Help
#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


Messages In This Thread
Number Plate Help - by Hash [NL-RP] - 13.07.2010, 12:56
Re: Number Plate Help - by Finn - 13.07.2010, 14:09
Re: Number Plate Help - by Falcon Interceptor - 13.07.2010, 15:02
Re: Number Plate Help - by Mr187 - 13.07.2010, 15:42
Re: Number Plate Help - by Hash [NL-RP] - 13.07.2010, 16:07

Forum Jump:


Users browsing this thread: 2 Guest(s)