02.02.2013, 16:08
I want to create random number for player when he register and with stock function to make sure that number isn't duplicated for any player. Problem is that it wont work. Does anyone know what i'm missing here?
pawn Код:
do
{
PlayerInfo[playerid][pPin] = 1000 + random(8999);
}
while(PinUsed(playerid));
pawn Код:
stock PinUsed(playerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
if(PlayerInfo[playerid][pPin] == PlayerInfo[playerid][pPin] && i != playerid) return 1;
return 1;
}