Detecting a key being held
#1

I have this defined (taken from SA-MP Wiki)

Код:
#define HOLDING(%0) \
	((newkeys & (%0)) == (%0))
and this is the code I use on OnPlayerKeyStateChange

Код:
if(HOLDING(KEY_SPRINT))
{
	SendClientMessage(playerid, -1, "HOLDING SPRINT");
	
	if(pInfo[playerid][ApplyingPressure] == 1)
	{
		SendClientMessage(playerid, -1, "Holding sprint");
	}
}
In game it sends it only once, any idea why?
Reply


Messages In This Thread
Detecting a key being held - by Denying - 18.08.2015, 17:44
Re: Detecting a key being held - by Vince - 18.08.2015, 18:04
Re: Detecting a key being held - by Denying - 18.08.2015, 18:14

Forum Jump:


Users browsing this thread: 1 Guest(s)