03.10.2010, 02:22
pawn Код:
stock GiveCellNumber(playerid)
{
new
number,
File:hFile,
string[128];
if (IsPlayerConnectedAndLoggedIn(playerid))
{
while (true)
{
number = random(899999) + 100000;
format(string, sizeof(string), "XRPG/Numbers/%s.ini", number);
if (!fexist(string))
{
hFile = fopen(string, io_readwrite);
PlayerInfo[playerid][pMyNumber] = number;
fwrite(hFile, PlayerName[playerid]);
fclose(hFile);
break;
}
}
}
return 1;
}