Adding a timer to /jail - 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: Adding a timer to /jail (
/showthread.php?tid=87329)
Adding a timer to /jail -
Mattjones17 - 19.07.2009
Hi
Is it possible to add a fine and a timer to this command, so that it automatically unjails the person after the timer reaches 0?
http://pastebin.com/m5e8f27c7
Matt
Re: Adding a timer to /jail -
James_Alex - 19.07.2009
juste use "SetTimer"
visit
www.wiki.sa-mp.com formore infos
Re: Adding a timer to /jail -
Mattjones17 - 19.07.2009
Yeh - I've played aruond with that as it is - but I'm a bit of a scripting noob so I really dont know how I would go about setting the timer to jail the person for a certain amount of time, and only unjail them when its over, even if they logout.
Re: Adding a timer to /jail -
member - 19.07.2009
You'll need SetTimerEx for that. Try this, i just did it quickly so it might not work.
http://pastebin.com/d1ee6c7a3
If you want them to be re-jailed if they diconnect then re-connect then it gets more complicated, and you'll need to use player' account file (if you have one e.g. most admin FS's have files for each player) for that.
Re: Adding a timer to /jail -
Mattjones17 - 19.07.2009
Thanks, I'll try that later when I get on my computer that has the script on it. I notice you added //2 minutes timer. Is it possible to set it so that the cop chooses the jailtime?
Thanks
Matt