Server Restart = Lose Stats
#5

Код:
CMD:gmx(playerid)
{
    SaveStats(playerid);
    SetTimer(#Restart, 2 * 1000, 0);
}

forward Restart();
public Restart()
{
     SendRconCommand(#gmx);
}
Код:
stock SaveStats(playerid)
{
 //put what u have on player disconnect here and they u have it player stats saved
    return 1;
}
eg of my savestats
/*
stock SaveStats(playerid)
{
    new INI:File = INI_Open(UserPath(playerid));
    INI_SetTag(File,"data");
    INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
    INI_WriteInt(File,"Years", GetPlayerScore(playerid));
    INI_WriteInt(File,"Bank",PlayerInfo[playerid][pBank]);
    INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
    INI_WriteInt(File,"House1",PlayerInfo[playerid][pHouse1]);
    INI_WriteInt(File,"House2",PlayerInfo[playerid][pHouse2]);
    INI_WriteInt(File,"House3",PlayerInfo[playerid][pHouse3]);
    INI_WriteInt(File,"Helper",PlayerInfo[playerid][pHelper]);
    INI_WriteInt(File,"NMute",PlayerInfo[playerid][pNMute]);
    INI_WriteInt(File,"VHouse",PlayerInfo[playerid][pVHouse]);
    INI_WriteInt(File,"Bizey",PlayerInfo[playerid][pBiz]);
    INI_WriteInt(File,"VBizkey",PlayerInfo[playerid][pVBiz]);
    INI_WriteInt(File,"Viplvl",PlayerInfo[playerid][pVIP]);
    INI_WriteInt(File,"pHouse",PlayerInfo[playerid][pHouse]);
    INI_WriteInt(File,"Cigar",PlayerInfo[playerid][pCigar]);
    INI_WriteInt(File,"HPhone",PlayerInfo[playerid][pHasCellphone]);
    INI_WriteInt(File,"Phone",PlayerInfo[playerid][pCellphone]);
    INI_WriteInt(File,"PhoneBook",PlayerInfo[playerid][pPhonebook]);
    INI_WriteInt(File,"Dice",PlayerInfo[playerid][pDice]);
    INI_WriteInt(File,"Sprunk",PlayerInfo[playerid][pSprunk]);
    INI_WriteInt(File,"Rope",PlayerInfo[playerid][pRope]);
    INI_WriteInt(File,"BFold",PlayerInfo[playerid][pBlindfold]);
    INI_WriteInt(File,"Spray",PlayerInfo[playerid][pSpray]);
    INI_WriteInt(File,"walkietalkie",PlayerInfo[playerid][pWT]);
    INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
    INI_WriteInt(File,"Ban",PlayerInfo[playerid][pBanned]);
    INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Close(File);
    return 1;
}
*/
Reply


Messages In This Thread
Server Restart = Lose Stats - by Admigo - 12.09.2012, 19:18
Re: Server Restart = Lose Stats - by HairStyle - 12.09.2012, 19:28
Re: Server Restart = Lose Stats - by sniperwars - 12.09.2012, 19:31
Re: Server Restart = Lose Stats - by Admigo - 12.09.2012, 19:32
Re: Server Restart = Lose Stats - by trapstar2020 - 12.09.2012, 19:33
Re: Server Restart = Lose Stats - by HairStyle - 12.09.2012, 19:34
Re: Server Restart = Lose Stats - by sniperwars - 12.09.2012, 19:35
Re: Server Restart = Lose Stats - by antonio112 - 12.09.2012, 19:38
Re: Server Restart = Lose Stats - by Admigo - 12.09.2012, 19:44
Re: Server Restart = Lose Stats - by DaRealShazz - 12.09.2012, 19:46

Forum Jump:


Users browsing this thread: 2 Guest(s)