SA-MP Forums Archive
when server restarts .... - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: when server restarts .... (/showthread.php?tid=381076)



when server restarts .... - HardBoy - 28.09.2012

hey,

How to make when the server restart it saves the players stats? because its only saving when the player disconnects, so if server restart the player stats won't save, i want it to save when server restart

PHP Code:
public OnPlayerDisconnect(playeridreason)
{
    
    new 
INI:File INI_Open(UserPath(playerid));
    
INI_SetTag(File,"data");
    
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    
INI_WriteInt(File,"Admin",SInfo[playerid][pAdmin]);
    
INI_Close(File);

i have more but i won't write them all


Re: when server restarts .... - XtremeR - 28.09.2012

if Y_ini fails then u better learn it, its not that easy to use.. i'd suggest u to use Dini instead, its easier


Re: when server restarts .... - HardBoy - 28.09.2012

dude my quistion is clear
i asked how to make when server restart stats saves?

or just give me for ex
puplic OnServerRestart For Example

give me anything that says about server restart and ill make stats saves


Re: when server restarts .... - HardBoy - 28.09.2012

omg any help?