Detect another keyboard keys
#1

Hi. How to detect press on keyboard keys M, I, etc? I know how to detect keys Y, H and N, but no more.
Reply
#2

this is not, and never will be, possible. hence a KeyDetect() in playerlogin callbacks.
you are limited to the native KEY_xxx constants.
little tip: sometimes its handy to use the numpad 2,4,6,8 (camera) keys to control a custom object cursor or similar.
Reply
#3

@Diorturato: have a look at https://sampwiki.blast.hk/wiki/GetPlayerKeys
...and scroll down.
the camera keys DO work onfoot, here is 1 line which represents the camera):
Код:
KEY_ANALOG_UP 	2048 	- 	~k~~VEHICLE_TURRETUP~ 	NUM8
@******: i dont know if you recently looked at the configuration menu - its line 6 and 7 "conversation no" and "yes" (on foot), i mapped those to my joypad too, and the "camera left/right/down/up" are ALSO used by stick 2 on the joypad. the default configuration is set up to num 4/2/6/8 btw. saying that, YES, it is (sometimes / for me, always) very useful to remember those additional "keys" if using a joypad.
nevertheless, i already mentioned them above as KEY_xxx. the xxx was not meant as censoring ^^
Reply
#4

Quote:
Originally Posted by Babul
Посмотреть сообщение
the camera keys DO work onfoot, here is 1 line which represents the camera):
Код:
KEY_ANALOG_UP 	2048 	- 	~k~~VEHICLE_TURRETUP~ 	NUM8
No. KEY_ANALOG_UP and KEY_ANALOG_DOWN working only invehicle.
Reply
#5

KEY_ANALOG_LEFT and KEY_ANALOG_RIGHT working onfoot, but player can change key (San Andreas settings) ONLY invehicle. Wtf?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)