[UNSOLVED] Big problem, cannot solve it.
#6

By putting it under OnPlayerDisconnect it dident save when I got the money ingame or at Disconnect...

Код:
public OnPlayerDisconnect(playerid, reason)
{
	gPlayerLogged[playerid] = 0;
  
  if(IsPlayerConnected(playerid))
	{
		if(gPlayerLogged[playerid])
		{
			new string3[32];
			new pname3[MAX_PLAYER_NAME];
			GetPlayerName(playerid, pname3, sizeof(pname3));
			format(string3, sizeof(string3), "%s.ini", pname3);
			new File: pFile = fopen(string3, io_write);
			if (pFile)
			{
				new var[32];
				format(var, 32, "%s\n", PlayerInfo[playerid][pPassword]);fwrite(pFile, var);
				fclose(pFile);
				new File: hFile = fopen(string3, io_append);
				PlayerInfo[playerid][pMoney] = GetPlayerMoney(playerid);
				format(var, 32, "Money:%d\n",PlayerInfo[playerid][pMoney]);fwrite(hFile, var);
				format(var, 32, "Bank:%d\n",PlayerInfo[playerid][pBank]);fwrite(hFile, var);
				fclose(hFile);
			}
		}
	}
	return 1;
}
Reply


Messages In This Thread
[UNSOLVED] Big problem, cannot solve it. - by FreddeN - 12.12.2009, 20:04
Re: [HELP] Big problem, cannot solve it. - by Backwardsman97 - 12.12.2009, 20:12
Re: [HELP] Big problem, cannot solve it. - by FreddeN - 12.12.2009, 20:13
Re: [HELP] Big problem, cannot solve it. - by Backwardsman97 - 12.12.2009, 20:15
Re: [HELP] Big problem, cannot solve it. - by FreddeN - 12.12.2009, 20:19
Re: [HELP] Big problem, cannot solve it. - by FreddeN - 12.12.2009, 20:25
Re: [HELP] Big problem, cannot solve it. - by Joe Staff - 12.12.2009, 20:36
Re: [HELP] Big problem, cannot solve it. - by FreddeN - 12.12.2009, 20:41
Re: [HELP] Big problem, cannot solve it. - by FreddeN - 12.12.2009, 20:44
Re: [HELP] Big problem, cannot solve it. - by FreddeN - 12.12.2009, 21:33

Forum Jump:


Users browsing this thread: 1 Guest(s)