Force Save On Kick
#1

How can you force a save while you use kick(playerid) ? I have SavePlayer(playerid); under most stuff, including the kick command, but it still goes for onplayerdisconnect therefore saving everything again, which sets it to 0, since player is already kicked i guess.

How could you fix this issue? it's the same issue with the gmx.
Reply
#2

OnPlayerDisconnect is always called...case 2 of onplayerdisconnect is kicked/banned, you could do something with that...I'm not sure what you're trying to do though since saving when they disconnect should always happen unless you change it...like...

pawn Код:
new str[128];
switch(reason)
{
    case 0: format(str, sizeof(str), "{00CCCC}Leave:{993300} %s[%d] has left the server! (Timeout)", Name(playerid), playerid, reason);
    case 1: format(str, sizeof(str), "{00CCCC}Leave:{993300} %s[%d] has left the server! (Leaving)", Name(playerid), playerid, reason);
    case 2:
    {
        //we can do some stuff if you need
    }
}
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)