07.12.2009, 15:16
When i use a command that will change user file info then all gets delete from the user like:
I type /makeadmin and it succefly makes it and i /q.
but when i check the scripting files I find a black userfile.. It is full before the cmd.
i putted onplayerupdate after onplayerdisconnect:
this aint GF or any other gm
I type /makeadmin and it succefly makes it and i /q.
but when i check the scripting files I find a black userfile.. It is full before the cmd.
i putted onplayerupdate after onplayerdisconnect:
Код:
public OnPlayerUpdate(playerid) { if(IsPlayerConnected(playerid)) { if(AccountInfo[playerid][aLogged] == 1) { new string3[128]; new playername3[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername3, sizeof(playername3)); format(string3, sizeof(string3), ACCOUNTS_FOLDER, playername3); new ip[20]; GetPlayerIp(playerid,ip,sizeof(ip)); new File: hFile = fopen(string3, io_write); if (hFile) { new var[128]; format(var, 128, "Password=%s\n", AccountInfo[playerid][aPassword]);fwrite(hFile, var); format(var, 128, "IP=%s\n",ip);fwrite(hFile, var); format(var, 128, "EE=%d\n", AccountInfo[playerid][aEE]);fwrite(hFile, var); format(var, 128, "Admin=%d\n", AccountInfo[playerid][aAdmin]);fwrite(hFile, var); format(var, 128, "Tut=%d\n", AccountInfo[playerid][aTut]);fwrite(hFile, var); format(var, 128, "Faction=%d\n", AccountInfo[playerid][aFaction]);fwrite(hFile, var); } } } return 1; }