OnPlayerKeyStateChange
#6

You shouldn't use TestCount in NaS variant, 'coz it's already check 3 buttons(KEY_UP, KEY_SPRINT, KEY_JUMP And not forget to set Test to 1. If you want to check if player pressed ANY 3 buttons, try this, it works.
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(!IsPlayerInAnyVehicle(playerid))
    {
        new count = 0;
        for(new i = 0; i < 20; i++)
            count += (newkeys >> i) & 1;
        if(count == 3)
        {
            SendClientMessageToAll(-1, "3 buttons!");
            //TODO...
        }
    }
    return 1;
}
Reply


Messages In This Thread
OnPlayerKeyStateChange - by Matnix - 01.09.2013, 22:42
AW: OnPlayerKeyStateChange - by NaS - 01.09.2013, 22:54
Re: OnPlayerKeyStateChange - by Borg - 01.09.2013, 22:57
Re : OnPlayerKeyStateChange - by Matnix - 01.09.2013, 23:14
Re : OnPlayerKeyStateChange - by Matnix - 02.09.2013, 03:05
Re: OnPlayerKeyStateChange - by Borg - 02.09.2013, 03:26
Re : OnPlayerKeyStateChange - by Matnix - 02.09.2013, 04:22
Re: OnPlayerKeyStateChange - by Borg - 02.09.2013, 04:34
AW: OnPlayerKeyStateChange - by NaS - 02.09.2013, 10:13

Forum Jump:


Users browsing this thread: 1 Guest(s)