23.05.2014, 12:47
Hello,
I have (probably) have a simple question. I would like to add a system that makes you sprint for an infinite time as long as you're pressing the KEY_SPRINT & KEY_UP (forward) button at the same time.
I did find a few examples, but none really did what I wanted. I did try something like this, but it didn't really work out the way I wanted:
(https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange)
I hope someone can help me. I would like to see a pre-made script since I've been looking for something like this for a while now, and I couldn't really find anything that works the way I want it to.
I think it is possible by applying an animation, but it's just not working for me right now.
Thank you.
I have (probably) have a simple question. I would like to add a system that makes you sprint for an infinite time as long as you're pressing the KEY_SPRINT & KEY_UP (forward) button at the same time.
I did find a few examples, but none really did what I wanted. I did try something like this, but it didn't really work out the way I wanted:
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (HOLDING( KEY_SPRINT | KEY_UP )) { ApplyAnimation(playerid, "PED", "sprint_civi", 4.1, 1, 1, 1, 1, 1, 1); } }
I hope someone can help me. I would like to see a pre-made script since I've been looking for something like this for a while now, and I couldn't really find anything that works the way I want it to.
I think it is possible by applying an animation, but it's just not working for me right now.
Thank you.