Small problem with kills/money save
#13

Quote:
Originally Posted by deqn_0000
Посмотреть сообщение
I'm not sure because i just refix the script on 1 friend :/ If you wanna i can share all of the script here?
Actually no saving system can save userfiles if server doesn't even get the time to.. (on Closing/crashing as i said before)

You can make a seperate command though:

pawn Код:
//somewhere outside any function:
forward CloseServer();
public CloseServer() { return SendRconCommand("exit"); }

//In OnPlayerCommandText, if you use dcmd/zcmd, just modify it a little bit.
if (strcmp("/exitserver", cmdtext, true, 11) == 0)
    {
        if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "Error: RCON only command.");
        GameTextForAll("~g~AUTO-SAVING STATS!~n~~r~Server will shutdown in 10 seconds.", 10000, 3);
        SetTimer("CloseServer", 10100, false);

        for ( new i=0; i<MAX_PLAYERS; i++ )
        {
            if( IsPlayerConnected(i) && !IsPlayerNPC(i) ) { SavePlayer(i); }
        }
        return true;
    }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)