SA-MP Forums Archive
Detecting a player accelerating - 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)
+--- Thread: Detecting a player accelerating (/showthread.php?tid=569511)



Detecting a player accelerating - CalvinC - 31.03.2015

How can i detect if a player is accelerating?
I was thinking of detecting his keys to see if he's pressing W using GetPlayerKeys, but the wiki says you cannot do this anymore:



Re: Detecting a player accelerating - RichieĀ© - 31.03.2015

Have you tried: VEHICLE_ACCELERATE?


Re: Detecting a player accelerating - CalvinC - 31.03.2015

How can i use that?


Re: Detecting a player accelerating - RichieĀ© - 31.03.2015

Keystatechange callback and use vars is one way. I have done this method before.


Re: Detecting a player accelerating - CalvinC - 31.03.2015

The wiki says you can't detect directional keys, but found out i could still detect if the player is using KEY_SPRINT, by the directional keys it's not WASD, only the arrows.
But thanks.