Auto Unjail timer doesn't stop after getting kicked.
#1

Hey guys, I was on my server with my friend testing out the jail function. I told him to jail me, then kick me. I came back to the server, and it says that I have been automatically released from jail. But whats weird, the timer should stop counting after I leave the server. Can you please help? Heres the auto un jail function:

Код:
public Unjail(playerid)
{
    if(Jailed[playerid] == 0)
		return 1;
    new playerName[24], String[128];
    GetPlayerName(playerid, playerName, sizeof(playerName));
    format(String, sizeof(String), "%s {FFFFFF}has been automatically released from Admin jail.", playerName);
    SendClientMessageToAll(0x009DFFFF, String);
    Jailed[playerid] = 0;
    SetPlayerInterior(playerid, 0);
    SetPlayerVirtualWorld(playerid, 0);
    SpawnPlayer(playerid);
    SetPlayerHealth(playerid, 100);
    KillTimer(JailTimer[playerid]);
    return 1;
}
Is it possible to kill the timer after the person disconnects, and comes back?

Please help
Reply
#2

You can use this topic a reference
Reply
#3

doesnt help me with anything?
Reply
#4

Basically, when setting the timer, set it as a variable.

Then, OnPlayerDisconnect, use KillTimer(Timer ID)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)