17.09.2011, 23:15
pawn Код:
if (!strcmp("/test", cmdtext, true))
{
format(string,sizeof(string),"Test id:%d",getRandomID());
SendClientMessage(playerid,COLOR_RED,string);
return 1;
}
stock getRandomID()
{
new i, c;
for ( ; i < MAX_PLAYERS; ++i )
{
if ( IsPlayerConnected( i ) )
{
++c;
}
}
return random(c);
}