OnPlayerKeyStateChange
#1

I have trouble using
Код:
#define PRESSED(%0) \
	(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
In this code
Код:
if (PRESSED( KEY_FIRE ))
       {
       SendClientMessage(playerid, 0xFFFFFFFF, "You fire a big cow at you enemy.");
       }
Problem:
When player press and hold or crouch or holding any other key this message will not be call,
I interested how to ignore all other key ?
Reply
#2

try removing the space as your using a marco
and sometimes this matters, Im not sure if this is the case

Код:
if (PRESSED(KEY_FIRE))
or dont use the marco at all and use

pawn Код:
if ((newkeys & KEY_FIRE) && !(oldkeys & KEY_FIRE))
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)