26.12.2018, 14:29
pawn Код:
new timercount[MAX_PLAYERS] = 0;
//In the command
time[targetid] = 3600000;
timercount[targetid] = SetTimerEx("CountTimer", 1000, true, "i", targetid);
//function
forward CountTimer(playerid)
public CountTimer(playerid);
{
time[playerid]--;
new time[50];
format(time,sizeof(time), "Vreme Zatvora: %d",time[playerid);
GameTextForPlayer(playerid, time ,5000,3);
if(time[playerid] == 0)
{
KillTimer(timercount[playerid]);
// Releasing from jail code
return 1;
}
return 1;
}