How can i fix my key detecting script. - 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: How can i fix my key detecting script. (
/showthread.php?tid=264420)
How can i fix my key detecting script. -
kin - 26.06.2011
I am trying to make a script so when someone moves forward it replenishes their health, then when they move backwards it deletes 1 health, then side to side gives/removes armor
but it does not work correctly...
pawn Код:
if((oldkeys & KEY_UP) && !(newkeys & KEY_UP))
thats one line, please help me.
Re: How can i fix my key detecting script. -
[HiC]TheKiller - 26.06.2011
If you want to do that, you need a timer with GetPlayerKeys that constantly checks if the person is holding one of those keys. OnPlayerKeyStateChange only checks the key when another one is pressed or released, not constantly.
Re: How can i fix my key detecting script. -
kin - 26.06.2011
Fixed, wrong call back *locked*