Fireman job help
#2

The HOLDING macro is often used wrongly. What is usually desired is PRESSED and RELEASED. OnPlayerKeyStateChange is only called when a key changes. You can press and then hold KEY_FIRE for an eternity but it will still only register a press when you first press it and a release when you release it. Only if you press an additional while still holding KEY_FIRE will it register as holding.

You will need to set a timer when they first press the key and it and kill the timer when they release it. Alternatively, set and unset a variable and use OnPlayerUpdate if you require faster interaction.
Reply


Messages In This Thread
Fireman job help - by StreetboyBalkan - 03.03.2016, 15:07
Re: Fireman job help - by Vince - 03.03.2016, 16:30
Re: Fireman job help - by StreetboyBalkan - 04.03.2016, 20:11
Re: Fireman job help - by StreetboyBalkan - 05.03.2016, 20:39
Re: Fireman job help - by StreetboyBalkan - 09.03.2016, 14:26
Re: Fireman job help - by AbyssMorgan - 09.03.2016, 14:54
Re: Fireman job help - by StreetboyBalkan - 10.03.2016, 09:15

Forum Jump:


Users browsing this thread: 1 Guest(s)