Count down for jail time ???
#1

Anyone has any idea how to make a count down for jail.Like when you jail him for 600second it will start countdowning from 600 and same for all other numbers.I already have a jail command with time support.Just gametext countdown is missing.

Thanks
Reply
#2

Put SetTimer in your jail command

Reply
#3

lol i know that and but how to make a count down in gametext form
Reply
#4

Код:
new time[20];
format(time,sizeof(time),"Jailtime: %d",your-jail-time-variable-here);
GameTextForPlayer(playerid,time,5000,3);
Reply
#5

how to make when a timer ends to do some action like: SetPlayerPos
Reply
#6

pawn Код:
SetTimerEx("SetPlayerUnjail", 1000, 1, "d", playerid);
new jailtime[max_players];


public SetPlayerUnjail(playerid)
{
 new time[20];
 jailtime[playerid]--;
 if(jailtime[playerid] > 0)
 {
 format(time,sizeof(time),"Jailtime: %d",jailtime[playerid]);
 GameTextForPlayer(playerid,time,500,3);
 }
 else if(jailtime[playerid] == 0)
 {
 SetPlayerPos(playerid, 0.0, 0.0, 0.0);
 GameTextForPlayer(playerid, "Your free..",500,3);
 }
 return 1;
}
something like this, its a rough version correct it a bit and you can use it. (jail them by setting the time limit higher then zero and then set their pos to the jail.)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)