Detecting melee
#6

Quote:
Originally Posted by [XST]O_x
Посмотреть сообщение
You're right. You can combine OnPlayerKeyStateChange with GetPlayerAnimationIndex.
I mean, a player can't swing a bat without hitting KEY_FIRE, he has to. So, you can do something like:
pawn Код:
OnPlayerKeyStateChange(playerid, oldkeys, newkeys)
{
    if(PRESSED(KEY_FIRE)) {
        if(GetPlayerAnimationIndex(playerid) > 0) {
        //...
You could spam the KEY_FIRE and it will still work. I need it to be called only once per hit
Reply


Messages In This Thread
Detecting melee - by zaibaslr2 - 11.10.2015, 15:19
Re: Detecting melee - by Spmn - 11.10.2015, 15:24
Re: Detecting melee - by [XST]O_x - 11.10.2015, 15:29
Re: Detecting melee - by zaibaslr2 - 12.10.2015, 12:21
Re: Detecting melee - by [XST]O_x - 12.10.2015, 14:07
Re: Detecting melee - by zaibaslr2 - 12.10.2015, 14:21
Re: Detecting melee - by zaibaslr2 - 13.10.2015, 11:49
Re: Detecting melee - by bgedition - 13.10.2015, 12:05
Re: Detecting melee - by zaibaslr2 - 13.10.2015, 14:17
Re: Detecting melee - by [XST]O_x - 13.10.2015, 15:38

Forum Jump:


Users browsing this thread: 1 Guest(s)