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