Dectect player crouching bug?
#1

Hello, i want detect if a player is crouching when pressed the touch "crouch" but doesn't work with
PHP код:
GetPlayerSpecialAction 
and i don't want use
PHP код:
onplayerupdate 
There is another possibility?

PHP код:
switch(GetPlayerWeapon(playerid))
{
    case 
23..252729..3441:
    {
        if(
GetPlayerSpecialAction(playerid) != 1)
        {
            if(
PRESSED(KEY_CROUCH))
            {
                   
SendClientMessage(playerid,-1,"test");
            }
        }
     }

Not Work with
PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys
when iam standing and i use touch "KEY_CROUCH)"
Reply
#2

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_CROUCH)
    {
        switch(GetPlayerWeapon(playerid))
        {
            case 23 .. 25, 27, 29 .. 34, 41:
            {
                if(GetPlayerSpecialAction(playerid) == 0)
                {
                    SendClientMessage(playerid,-1,"test");
                }
            }
        }
    }
    return 1;
}
Reply
#3

My problem its with this callback does not detect if the person dont moves so i used a timer for use in a variable with
PHP код:
(GetPlayerSpecialAction(playerid
but i did not use a timer but works ^^

Thx
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)