OnPlayerKeyStateChange
#3

Are you sure that "F" is "KEY_SECONDARY_ATTACK" try to getin with "Enter" as it's the default, try to get in with enter, also make a debug to make sure the callback is being called

pawn Код:
if ((newkeys & KEY_SECONDARY_ATTACK) && !(oldkeys & KEY_SECONDARY_ATTACK))
    {
        if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
            SendClientMessage(playerid, -1, "The callback is being called, the problem might be in ""SendToEnter"" or ""SendToExit"");
            SendToEnter(playerid);
            SendToExit(playerid);
        }
    }
Quote:
Originally Posted by ATGOggy
Посмотреть сообщение
Why are these like this:
PHP код:
if ((newkeys KEY_SECONDARY_ATTACK) && !(oldkeys KEY_SECONDARY_ATTACK)) 
I think it should be like this:
PHP код:
if ((newkeys == KEY_SECONDARY_ATTACK) && !(oldkeys == KEY_SECONDARY_ATTACK)) 
Read this.
Reply


Messages In This Thread
OnPlayerKeyStateChange - by FaZeRs - 16.01.2015, 15:33
Re: OnPlayerKeyStateChange - by ATGOggy - 16.01.2015, 16:47
Re: OnPlayerKeyStateChange - by xVIP3Rx - 16.01.2015, 17:05

Forum Jump:


Users browsing this thread: 2 Guest(s)