26.11.2014, 20:02 
	
	
	
		Hello i have a save money problem with a job filterscript. When i start the job and finish gives me money but when i save accounts and restart server the money is gone.. How to fix this?
	
	
	
	
public OnPlayerDataSave(playerid)
{
    if(IsPlayerConnected(playerid))
	{
		if(gPlayerLogged[playerid] && gPlayerSpawned[playerid])
		{
		    new string[256], playersip[64];
		    format(string, sizeof(string), "%s.ini", PlayerName(playerid));
		    GetPlayerIp(playerid, playersip, sizeof(playersip));
		    if(dini_Exists(string))
		    {
		        dini_Set(string, "Key", PlayerInfo[playerid][pKey]);
		        dini_Set(string, "IP", PlayerInfo[playerid][pIP]);
		        dini_IntSet(string, "AdminLevel", PlayerInfo[playerid][pAdmin]);
		        dini_IntSet(string, "aDuty", PlayerInfo[playerid][aDuty]);
		        dini_IntSet(string, "aTog", PlayerInfo[playerid][aTog]);
		        dini_IntSet(string, "pMember", PlayerInfo[playerid][pMember]);
		        dini_IntSet(string, "pRank", PlayerInfo[playerid][pRank]);
		        dini_IntSet(string, "Banned", PlayerInfo[playerid][pBanned]);
		        dini_IntSet(string, "DonateRank", PlayerInfo[playerid][pDonateRank]);
		        dini_IntSet(string, "Registered", PlayerInfo[playerid][pReg]);
		        dini_IntSet(string, "Warnings", PlayerInfo[playerid][pWarns]);
		        dini_IntSet(string, "Cash", PlayerInfo[playerid][pCash]);
		        dini_IntSet(string, "Kills", PlayerInfo[playerid][pKills]);
		        dini_IntSet(string, "Deaths", PlayerInfo[playerid][pDeaths]);
		        dini_IntSet(string, "Muted", PlayerInfo[playerid][pMuted]);
		        dini_IntSet(string, "TimeMuted", PlayerInfo[playerid][ptMuted]);
		        dini_IntSet(string, "VipMuted", PlayerInfo[playerid][pvMuted]);
		        dini_IntSet(string, "KillSpree", PlayerInfo[playerid][pSpree]);
		        dini_IntSet(string, "CWons", PlayerInfo[playerid][pCWons]);
		        dini_IntSet(string, "Hide", PlayerInfo[playerid][pHide]);
                dini_IntSet(string, "pJailed", PlayerInfo[playerid][pJailed]);
                dini_IntSet(string, "pArrested", PlayerInfo[playerid][pArrested]);
		        dini_IntSet(string, "pCrimes", PlayerInfo[playerid][pCrimes]);
		        dini_IntSet(string, "pJail", PlayerInfo[playerid][pJail]);
            	dini_IntSet(string, "pJailTime", PlayerInfo[playerid][pJailTime]);
            	dini_IntSet(string, "pWantedDeaths", PlayerInfo[playerid][pWantedDeaths]);
		    }
		}
	}
    return 1;
}
// This function is used to give the player some money
forward GM_GivePlayerMoney(playerid, Money);
public GM_GivePlayerMoney(playerid, Money)
{
// Add the given money to the player's account
PlayerInfo[playerid][pCash] = PlayerInfo[playerid][pCash] + Money;
// Return that the function had success
return 1;
}
CallRemoteFunction("GM_GivePlayerMoney", "ii", playerid, Money);
dini_IntSet(string, "Cash", PlayerInfo[playerid][pCash]);
dini_IntSet(string, "Cash", GetPlayerMoney(playerid));
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
| 
 Where to add this in filterscript "CallRemoteFunction("GM_GivePlayerMoney", "ii", playerid, Money);"? 
 |