Change walkstyle
#5

Try this, not tested though;
pawn Код:
#define HOLDING(%0) ((newkeys & (%0)) == (%0))
#define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    new udlr, ud, lr;
    GetPlayerKeys(playerid, udlr, ud, lr);
    if(HOLDING(KEY_WALK) && ud > 0 || HOLDING(KEY_WALK) && ud < 0 || HOLDING(KEY_WALK) && lr > 0 || HOLDING(KEY_WALK) && lr < 0) {
        // Once a player presses ALT and one of the arrows.
    } else if(RELEASED(KEY_WALK)) {
        // Once a player releases ALT.
    }
    return 1;
}
Reply


Messages In This Thread
Change walkstyle - by N0FeaR - 17.02.2012, 17:57
Re: Change walkstyle - by Twisted_Insane - 17.02.2012, 17:58
Re: Change walkstyle - by N0FeaR - 17.02.2012, 18:03
Re: Change walkstyle - by Twisted_Insane - 17.02.2012, 18:11
Re: Change walkstyle - by Toreno - 17.02.2012, 18:11
Re: Change walkstyle - by Zarky - 17.02.2012, 18:14
Re: Change walkstyle - by Konstantinos - 17.02.2012, 18:18
Re: Change walkstyle - by N0FeaR - 18.02.2012, 08:40
Re: Change walkstyle - by N0FeaR - 18.02.2012, 08:47
Re: Change walkstyle - by N0FeaR - 20.02.2012, 16:25

Forum Jump:


Users browsing this thread: 2 Guest(s)