Count down for jail time ??? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Count down for jail time ??? (
/showthread.php?tid=113546)
Count down for jail time ??? -
Naruto4 - 14.12.2009
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
Re: Count down for jail time ??? -
MB@ - 14.12.2009
Put SetTimer in your jail command
Re: Count down for jail time ??? -
Naruto4 - 14.12.2009
lol i know that and but how to make a count down in gametext form
Re: Count down for jail time ??? -
BMUK - 15.12.2009
Код:
new time[20];
format(time,sizeof(time),"Jailtime: %d",your-jail-time-variable-here);
GameTextForPlayer(playerid,time,5000,3);
Re: Count down for jail time ??? -
Naruto4 - 19.12.2009
how to make when a timer ends to do some action like: SetPlayerPos
Re: Count down for jail time ??? -
Think - 19.12.2009
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.)