09.08.2012, 18:45
What Do I add to those commands to make it a keybind.
OnPlayerKeyStateChange is the trick. https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Detect when a certain key was pressed, and execute the command you like. |
//At to top
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
//OnPlayerKeyStateChange
//if they pressed Fire and Crouch key.
if (PRESSED( KEY_FIRE | KEY_CROUCH ))