09.11.2013, 15:33
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,
UnJail
OnPlayerSpawn
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;
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.");
}
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);
}