11.10.2011, 01:03
Bom, jб coloquei para salvar o level de admin do player no final do GM, mas quando relogo continua a desaparecer o nvl de admin.. se alguйm souber como arrumo isso --'
new string3[256];
new pname3[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname3, sizeof(pname3));
format(string3, sizeof(string3), "Players/%s.ini", pname3);
new File: pFile = fopen(string3, io_write);
if (pFile)
{
new pIp[128];
GetPlayerIp(playerid, pIp, sizeof(pIp));
new var[32];
format(var, 32, "Password=%s\n", PlayerInfo[playerid][pPassword]);fwrite(pFile, var);
fclose(pFile);
new File: hFile = fopen(string3, io_append);
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
format(var, 32, "IP=%s\n", pIp);fwrite(hFile, var);
format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
format(var, 32, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(hFile, var);
format(var, 32, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
format(var, 32, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(hFile, var);
format(var, 32, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(hFile, var);
format(var, 32, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(hFile, var);
format(var, 32, "Bank=%d\n",PlayerInfo[playerid][pBank]);fwrite(hFile, var);
format(var, 32, "Skin=%d\n",PlayerInfo[playerid][pSkin]);fwrite(hFile, var);
format(var, 32, "TimesConnected=%d\n",PlayerInfo[playerid][pTimes]);fwrite(hFile, var);
format(var, 32, "PlayingHours=%d\n",PlayerInfo[playerid][pHours]);fwrite(hFile, var);
format(var, 32, "PlayingMinutes=%d\n",PlayerInfo[playerid][pMins]);fwrite(hFile, var);
format(var, 32, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(hFile, var);
format(var, 32, "DayRegistered=%d\n",PlayerInfo[playerid][pDate1]);fwrite(hFile, var);
format(var, 32, "MonthRegistered=%d\n",PlayerInfo[playerid][pDate2]);fwrite(hFile, var);
format(var, 32, "YearRegistered=%d\n",PlayerInfo[playerid][pDate3]);fwrite(hFile, var);
fclose(hFile);
pawn Код:
|
new string3[128], pname3[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname3, sizeof(pname3));
format(string3, sizeof(string3), "Players/%s.ini", pname3);
new File: pFile = fopen(string3, io_write);
if (pFile)
{
new pIp[128], var[64];
GetPlayerIp(playerid, pIp, sizeof(pIp));
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
format(var, 64, "Password=%s\n", PlayerInfo[playerid][pPassword]);fwrite(pFile, var);
format(var, 64, "IP=%s\n", pIp);fwrite(pFile, var);
format(var, 64, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(pFile, var);
format(var, 64, "Warnings=%d\n",PlayerInfo[playerid][pWarns]);fwrite(pFile, var);
format(var, 64, "Level=%d\n",PlayerInfo[playerid][pLevel]);fwrite(pFile, var);
format(var, 64, "Kills=%d\n",PlayerInfo[playerid][pKills]);fwrite(pFile, var);
format(var, 64, "Deaths=%d\n",PlayerInfo[playerid][pDeaths]);fwrite(pFile, var);
format(var, 64, "Money=%d\n",PlayerInfo[playerid][pCash]);fwrite(pFile, var);
format(var, 64, "Bank=%d\n",PlayerInfo[playerid][pBank]);fwrite(pFile, var);
format(var, 64, "Skin=%d\n",PlayerInfo[playerid][pSkin]);fwrite(pFile, var);
format(var, 64, "TimesConnected=%d\n",PlayerInfo[playerid][pTimes]);fwrite(pFile, var);
format(var, 64, "PlayingHours=%d\n",PlayerInfo[playerid][pHours]);fwrite(pFile, var);
format(var, 64, "PlayingMinutes=%d\n",PlayerInfo[playerid][pMins]);fwrite(pFile, var);
format(var, 64, "JailTime=%d\n",PlayerInfo[playerid][pJailTime]);fwrite(pFile, var);
format(var, 64, "DayRegistered=%d\n",PlayerInfo[playerid][pDate1]);fwrite(pFile, var);
format(var, 64, "MonthRegistered=%d\n",PlayerInfo[playerid][pDate2]);fwrite(pFile, var);
format(var, 64, "YearRegistered=%d\n",PlayerInfo[playerid][pDate3]);fwrite(pFile, var);
fclose(pFile);