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?