Get random string
#4

pawn Код:
GenString( string[ ] , size = sizeof string )
{
    static const Data[ ] = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";//add more characters if they want to include in string
    new i;
    for(i = 0 ; i < size; ++i)
        string[ i ] = Data[ random( sizeof Data ) ];
}
pawn Код:
new string[10];
GenString(string);
printf("random string : %s ",string);
Reply


Messages In This Thread
Get random string - by HoussemGaming - 26.06.2017, 21:11
Re: Get random string - by Logic_ - 26.06.2017, 21:19
Re: Get random string - by Vince - 26.06.2017, 21:30
Re: Get random string - by SyS - 27.06.2017, 04:10
Re: Get random string - by OuDayas - 20.03.2019, 19:37
Re: Get random string - by NaS - 20.03.2019, 19:50
Re: Get random string - by B3x7K - 20.03.2019, 19:51

Forum Jump:


Users browsing this thread: 2 Guest(s)