SA-MP Forums Archive
OnPlayerKeyStateChange - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerKeyStateChange (/showthread.php?tid=613675)



OnPlayerKeyStateChange - danielpalade - 30.07.2016

Hello,
How could I make it so whenever the key KEY_ACTION is pressed, that it will do something.
Right now, if I have another key pressed, and I try to press the KEY_ACTION, it wouldn't work.
So basically I can only use that key if no other key is pressed. How can I bypass that?


Re: OnPlayerKeyStateChange - Counterafk - 30.07.2016

Код:
if(newkeys & KEY_ACTION)
{
	// code
}



Re: OnPlayerKeyStateChange - danielpalade - 31.07.2016

Quote:
Originally Posted by Counterafk
Посмотреть сообщение
Код:
if(newkeys & KEY_ACTION)
{
	// code
}
Doesn't work. This is what I have already.