#3

Quote:
Originally Posted by Swarn
Посмотреть сообщение
Код:
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
	if(PRESSED(KEY_LOOK_BEHIND))
	{
	    // execute command
	}
    return 1;
}
Something like this?
Why did you define "PRESSED"?

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;
}
Read more about keys here

https://sampwiki.blast.hk/wiki/Keys
Reply


Messages In This Thread
MMB - by Cyboorg - 04.06.2017, 19:00
Re: MMB - by Swarn - 04.06.2017, 19:13
Re: MMB - by Beryllium - 05.06.2017, 00:40
Re: MMB - by Sew_Sumi - 05.06.2017, 22:15

Forum Jump:


Users browsing this thread: 1 Guest(s)