Detecting melee
#3

Not really sure. You can check OnPlayerKeyStateChange, but you need to make sure player isn't falling/in car/in water, and is equipped with a melee.
But I think a better way is using GetPlayerAnimationIndex and GetAnimationName.
Here is a list of animations:
https://sampwiki.blast.hk/wiki/Animations
You have animations for Knife and Baseball(baseball bat), pretty sure there is other melees as well.
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)