Auto UnJail timer doesn't stop after player leaves/gets kicked whilst in jail? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Auto UnJail timer doesn't stop after player leaves/gets kicked whilst in jail? (
/showthread.php?tid=417782)
Auto UnJail timer doesn't stop after player leaves/gets kicked whilst in jail? -
Goldino - 22.02.2013
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!
Re: Auto UnJail timer doesn't stop after player leaves/gets kicked whilst in jail? -
SilverKiller - 22.02.2013
Under OnPlayerDisconnect:
pawn Код:
KillTimer(JailTimer[playerid]);
Re: Auto UnJail timer doesn't stop after player leaves/gets kicked whilst in jail? -
Goldino - 22.02.2013
Quote:
Originally Posted by SilverKiller
Under OnPlayerDisconnect:
pawn Код:
KillTimer(JailTimer[playerid]);
|
ill test it