/jail time countdown
#3

pawn Code:
PlayerInfo[playa][pJailTime] = time*60;
to
pawn Code:
PlayerInfo[playa][pJailTime] = time;
add
pawn Code:
unjail = SetTimerEx("OnPlayerJailUpdate", 1000, true, "i", playa);
Don't forget to define unjail in your script!
pawn Code:
forward OnPlayerJailUpdate(playerid);
public OnPlayerJailUpdate(playerid)
{
    if(PlayerInfo[playerid][pJailTime] == 0)
    {
        KillTimer(unjail);
        //unjail stuff here!
    }
    else
    {
        PlayerInfo[playerid][pJailTime] --;
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
/jail time countdown - by mrxqware - 28.12.2013, 18:51
Re: /jail time countdown - by mrxqware - 29.12.2013, 00:26
Re: /jail time countdown - by Mattakil - 29.12.2013, 02:17
Re: /jail time countdown - by mrxqware - 29.12.2013, 08:54
Re: /jail time countdown - by Mattakil - 29.12.2013, 14:33

Forum Jump:


Users browsing this thread: 1 Guest(s)