[HELP]Weapons not saving when player crashes.
#2

I dont really know this FS, but in general, a Servercrash is unforseeable, so there cant be a callback for this.
So, you could add an timer, that saves the data for example every 60 or 120 seconds, that should be often enough.

I just looked over the script. I think, adding this should be enough:

pawn Код:
in global variables:
new savetimer[MAX_PLAYERS];

in OnPlayerConnect:
savetimer[playerid] = SetTimerEx("refresh_player_data", 120000 (interval in ms), 1, "ii", playerid, 1);

in onPlayerDisconnect:
KillTimer(savetimer[playerid]);
Reply


Messages In This Thread
[HELP]Weapons not saving when player crashes. - by Lilcuete - 10.07.2010, 15:09
Re: [HELP]Weapons not saving when player crashes. - by Mauzen - 10.07.2010, 15:17
Re: [HELP]Weapons not saving when player crashes. - by Lilcuete - 10.07.2010, 15:27
Re: [HELP]Weapons not saving when player crashes. - by Mauzen - 10.07.2010, 15:30
Re: [HELP]Weapons not saving when player crashes. - by Lilcuete - 10.07.2010, 15:35
Re: [HELP]Weapons not saving when player crashes. - by Mauzen - 10.07.2010, 15:59

Forum Jump:


Users browsing this thread: 1 Guest(s)