How can i fix my key detecting script.
#1

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.
Reply
#2

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.
Reply
#3

Fixed, wrong call back *locked*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)