27.11.2010, 13:09
Ok, I got another piece of code. I know I can use yours, if I can't fix this, I will.
Means server crash. Nothing gets writed. What's the problem? :S
pawn Код:
stock GetFreeNumber(playerid)
{
new string[50],Playername[MAX_PLAYER_NAME];
new ph = random(1000000);
new File:NumFile = fopen("Stuff/Numbers.txt",io_read);
fread(NumFile,string);
{
if(strval(string) == ph) return GetFreeNumber(playerid);
}
fclose(NumFile);
GetPlayerName(playerid,Playername,sizeof(Playername));
format(file,sizeof(file),"Accounts/%s.ini",Playername);
dini_IntSet(file,"PhoneNumber",ph);
return ph;
}

