SAMP Keybinder

05/13/2017 23:07 Alborzar#1
Hallo

ich wollte in C++ einen Keybinder für SAMP erstellen, weiss jedoch nicht genau wie ich eine 'Abfrage' erstelle dass wenn man eine bestimmte Taste drückt, dass etwas passiert.

Wäre nett wenn jemand mir das zeigen könnte.

Mit freundlichen Grüßen,
_ArtaX
05/18/2017 09:48 atom0s#2
Depends on how you want to handle the key presses. Do you just want it to handle whenever a key is pressed in general or do you want it to block the key from happening in game as well?

If you just want to use the keybind whenever, just use something like GetAsyncKeyState to query for key presses.


If you want to block the key from hitting the game as well, then you are going to need to hook DirectInput, or whichever input handling API the game uses.