Random Letters and Numbers
#5

You could try:

pawn Code:
stock getRandomLetter() {
    return 65 + random(52); // ASCII Code of capital A is 65 + 2 * 26 for all other chars in alphabet.
}

//...
format(someString, 128, "%c, %c, %c", getRandomLetter(), getRandomLetter(), getRandomLetter());
I'm not sure how number plates are shown, if there are capital letters only you could change the max. random value to 26 again.
Reply


Messages In This Thread
Random Letters and Numbers - by Abreezy - 05.01.2012, 20:30
Re: Random Letters and Numbers - by Norck - 05.01.2012, 21:04
Re: Random Letters and Numbers - by Mrki_Drakula - 05.01.2012, 21:21
Re: Random Letters and Numbers - by Abreezy - 05.01.2012, 22:20
Re: Random Letters and Numbers - by thiaZ_ - 05.01.2012, 22:25
Re: Random Letters and Numbers - by Abreezy - 05.01.2012, 22:37
Re: Random Letters and Numbers - by vincee - 05.01.2012, 22:43
Re: Random Letters and Numbers - by thiaZ_ - 05.01.2012, 22:46
Re: Random Letters and Numbers - by vincee - 05.01.2012, 22:51

Forum Jump:


Users browsing this thread: 1 Guest(s)