07.01.2012, 16:09
you have to subtract the jail time variable in your timer with the 1 second interval
//edit:
why dont u just use a timer with a false bool? You could remove the variable then and also u didnt have to kill the timer afterwards.
Also make sure you also add this to the killed timer (to prevent further issues)
pawn Код:
JailTime[playerid]--;
pawn Код:
forward UnJail(playerid);
public Unjail(playerid)
{
//put it here...
if(JailTime[playerid] <= 0)
{
JailTime[playerid] = 0;
KillTimer(JailTimer[playerid]);
SetPlayerPos(playerid, 246.4798,67.8764,1003.6406);
SetPlayerInterior(playerid, 6);
SetPlayerVirtualWorld(playerid, -1);
SendClientMessage(playerid, COLOR_GOLD,"[INFO]You have been UnJailed, Now try to be a good civilian!");
}
return 1;
}
why dont u just use a timer with a false bool? You could remove the variable then and also u didnt have to kill the timer afterwards.
Also make sure you also add this to the killed timer (to prevent further issues)
pawn Код:
JailTimer[playerid]=-1;