Seconds to minutes on --
#3

Well to make it count down in minutes you need a timer,

pawn Код:
//put this under public OnGameModeInit()
SetTimer("JailTimer",60000,true);
//this would be your timer to call the jailtimer function every minute
//then put this anywhere under a_samp outside of a callback
forward JailTimer();
public JailTimer()
{
    for (new i=0; i<MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pJailed] > 0)
        {
            if(PlayerInfo[i][pJailTime] > 0)
            {
                PlayerInfo[i][pJailTime]--;
            }
        }
    }
    return 1;
}
//that would loop through every player and decrease thier jail time by 1.
You would have to do something like that. Then you could add in the code so once the players time is 0 and the pJailed is greater than 0 (wich means they are jailed but time is up) it would release the player.
Reply


Messages In This Thread
Seconds to minutes on -- - by PaulDinam - 29.06.2012, 17:35
Re: Seconds to minutes on -- - by PaulDinam - 29.06.2012, 18:26
Re: Seconds to minutes on -- - by nickdodd25 - 29.06.2012, 19:59

Forum Jump:


Users browsing this thread: 1 Guest(s)