Random phone number
#4

Very simple to generate a random "phone" number:
pawn Код:
stock GenerateRandomNumber(string[], const length = 8)
{
    for(new i; i < length; ++i)
    {
        string[i] = random(10) + '0';
    }
    return ;
}
Example:
pawn Код:
new
    string[12]
;
GenerateRandomNumber(string);
print(string);
Reply


Messages In This Thread
Random phone number - by lukas567 - 03.07.2011, 19:12
Re: Random phone number - by iPLEOMAX - 03.07.2011, 19:15
Re: Random phone number - by Kitten - 03.07.2011, 19:17
Re: Random phone number - by RyDeR` - 03.07.2011, 19:54
Re: Random phone number - by lukas567 - 03.07.2011, 20:41
Re: Random phone number - by dowster - 03.07.2011, 21:09
Re: Random phone number - by lukas567 - 04.07.2011, 04:21

Forum Jump:


Users browsing this thread: 2 Guest(s)