Saving Timer?
#1

Hey guys. I need a saving timer for my arrest command. So far I have fixed that whenever the player disconnects while in jail he will be sent there when logging in. But I need to set the timer to how much it was when he disconnected.

This is what I got now:

OnArrest,

pawn Код:
SetPlayerPos(playerid, 1492.2151,-1768.2281,3285.2859);
        SetTimerEx("UnJail", 60000*time, false, "i", criminal);
        PlayerInfo[criminal][pInJail] = 1;
UnJail

pawn Код:
public UnJail(playerid)
{
    SetPlayerPos(playerid, 1555.5061,-1675.7239,16.1953);
    SCM(playerid, COLOR_LSPD, "* You have been released from prison. Try to be a better citizen in the future.");
}
OnPlayerSpawn

pawn Код:
if(PlayerInfo[playerid][pInJail] == 1)
    {
        SetPlayerPos(playerid, 1492.2151,-1768.2281,3285.2859);
        format(string, sizeof(string), "* Your character is currently is jail for another %d seconds.", jailtimer??);
        SCM(playerid, COLOR_LIGHTRED, string);
    }
Reply


Messages In This Thread
Saving Timer? - by Chrillzen - 09.11.2013, 15:33
Re: Saving Timer? - by David (Sabljak) - 09.11.2013, 17:12
Re: Saving Timer? - by Chrillzen - 09.11.2013, 17:40

Forum Jump:


Users browsing this thread: 1 Guest(s)