[HELP] Bank + Register = ?!
#3

Quote:
Originally Posted by © Tђэ LυxυяiσN™
Of course it would not save. You have not specified it was to save money when the player leaves the server!

Try this (Not Tested and Only Save Player Cash!):

pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
SaveCash(playerid);
IsLogged[playerid] = 0;
return 1;
}
pawn Код:
stock SaveCash(playerid)
{
if(IsLogged[playerid] == 1)
{
new name[MAX_PLAYER_NAME];
new file[128];
GetPlayerName(playerid, name, sizeof(name));
format(file,sizeof(file),"%s.ini",name);
if(fexist(file))
{
dini_IntSet(file, "Cash", GetPlayerMoney(playerid));
}
}
return 1;
}
My pocket money saves, but it's the money in my bank account that wont save, PlayerInfo[Playerid][Bank], will this fix that problem?
Reply


Messages In This Thread
[HELP] Bank + Register = ?! - by FreddeN - 02.02.2010, 18:14
Re: [HELP] Bank + Register = ?! - by LuxurioN™ - 02.02.2010, 18:30
Re: [HELP] Bank + Register = ?! - by FreddeN - 02.02.2010, 18:34
Re: [HELP] Bank + Register = ?! - by LuxurioN™ - 02.02.2010, 18:46
Re: [HELP] Bank + Register = ?! - by FreddeN - 02.02.2010, 21:15

Forum Jump:


Users browsing this thread: 1 Guest(s)