Quote:
Originally Posted by [HLF]Southclaw
Well the only way I know of would be to use random bounds
pawn Код:
#define RandomBounds(%1,%2) (random((%2)-(%1))+(%1))
then randomize between the first and last letters of the alphabet [from the ascii table]
which I think is 0x61 to 0x7A
So the code would be
RandomBounds(0x61, 0x7A);
(sorry I forgot the actual numbers for some reason I can only remember the hex)
Hope that helps  ... if it's right (should be I think!)
|
Quote:
Originally Posted by RyDeR`
pawn Код:
random(26) + 'a'; // non-captial letters random(26) + 'A'; // captial letters
You don't actually need the "numbers" actually, you could also do this:
pawn Код:
RandomBounds('a', 'z'); RandomBounds('A', 'Z');
|
Thanks guys, will try both.
Anyway do these functions outputs the code in string or integer?