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



Keys - spd_sahil - 22.01.2012

Okay i wanted to know how do i find out the detection of the Up Left right and down keys.. cause it doesnt seem to work in OnPlayerKeyStateChange()


AW: Keys - Drebin - 22.01.2012

Down, up, left and right key don't get called in OnPlayerKeyStateChange(), you have to do it in OnPlayerUpdate():
https://sampwiki.blast.hk/wiki/GetPlayerKeys


Re: Keys - suhrab_mujeeb - 22.01.2012

Код:
KEY_ACTION			(MOUSE key 1)
KEY_CROUCH				©
KEY_FIRE				(CTRL)
KEY_SPRINT				(SPACE)
KEY_SECONDARY_ATTACK	    (F or ENTER)
KEY_JUMP				(SHIFT)
KEY_LOOK_RIGHT			(Numpad 6)
KEY_HANDBRAKE			(SPACE)
KEY_LOOK_LEFT			(Numpad 4)
KEY_SUBMISSION			(2)
KEY_LOOK_BEHIND		(BackSpace or Middle Mouse Button)	
KEY_WALK				(ALT)
KEY_ANALOG_UP			
KEY_ANALOG_DOWN			
KEY_ANALOG_LEFT			
KEY_ANALOG_RIGHT		

KEY_UP			(Up arrow)		
KEY_DOWN				(Down arrow)
KEY_LEFT				(Left arrow)
KEY_RIGHT				(Right Arrow)
I guess you are looking for this?


Re: AW: Keys - spd_sahil - 22.01.2012

Quote:
Originally Posted by Drebin
Посмотреть сообщение
Down, up, left and right key don't get called in OnPlayerKeyStateChange(), you have to do it in OnPlayerUpdate():
https://sampwiki.blast.hk/wiki/GetPlayerKeys
This is what i was looking for.. but.. it gives me some mysterious error.. i shall report back after checking my script through


Re: Keys - MP2 - 22.01.2012

What error?