SA-MP Forums Archive
problem timeforteleport - 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: problem timeforteleport (/showthread.php?tid=175313)



problem timeforteleport - [Ha]Lommo - 09.09.2010

I use tele's in my server and i want that a player can't teleport when he lost health the last 10seconds, how to do this?

Greets,


Re: problem timeforteleport - cessil - 09.09.2010

create a timer to check the players health and save it to a variable, if the players new health is less than their old health set a variable that'll prevent them from teleporting and then another timer to unset that variable in 10seconds time


Re: problem timeforteleport - LarzI - 09.09.2010

Get YUP.
OnPlayerLoseHealth or w/e the callback is named, get's called when the player loses health.
Use it to check, then set a timer, but reset the timer (kill, set) if the player loses health once more


Re: problem timeforteleport - [Ha]Lommo - 09.09.2010

Quote:
Originally Posted by cessil
Посмотреть сообщение
create a timer to check the players health and save it to a variable, if the players new health is less than their old health set a variable that'll prevent them from teleporting and then another timer to unset that variable in 10seconds time
Can u explain lil bit more ? xd