05.06.2017, 00:40
Quote:
Код:
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0))) Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(PRESSED(KEY_LOOK_BEHIND)) { // execute command } return 1; } |
He can use it as simple.
Example:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & /*<Insert your key here>*/) { //<Insert your action/code here> } return 1; }
https://sampwiki.blast.hk/wiki/Keys