05.05.2016, 19:32
PHP код:
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) {
if(PRESSED(KEY_FIRE)) {
// do stuff
}
return 1;
}