Auto UnJail timer doesn't stop after player leaves/gets kicked whilst in jail?
#1

I have a bug with my Auto - UnJail timer. I told my friend to jail me, then kick me whilst I was in jail. I came back to the server, and a little bit later, it said that I had been auto released from jail. It should stop after I've been kicked. I hope you understand exactly what I'm saying!

Here is my auto - unjail function:

pawn Код:
public Unjail(playerid)
{
    if(Jailed[playerid] == 0)
        return 0;
    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;
}


Please help,

Thanks!
Reply
#2

Under OnPlayerDisconnect:

pawn Код:
KillTimer(JailTimer[playerid]);
Reply
#3

Quote:
Originally Posted by SilverKiller
Посмотреть сообщение
Under OnPlayerDisconnect:

pawn Код:
KillTimer(JailTimer[playerid]);
ill test it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)