[HELP] Hold keys
#1

Hello everybody,

well, my question its how if player its holding SPRINT/SPACE, it apply sprint animation
and if he stop holding, it stop doing the animation.

I used:
if((newkeys & KEY_SPRINT))
{
ApplyAnimation(playerid,"PED","sprint_civi",4.1,1, 1,1,1,1,1);
}

And when i stop holding SPACE, the animation dont stop.

Thx,
Reply
#2

Use an else statement under it with ClearAnimation.
Reply
#3

Okay but the problem its, it apply the clearanimation when i press any buttons, so i cant climb objects.

Please, Any ideas?
Reply
#4

Solved... i use

if (RELEASED( KEY_SPRINT ))
{
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
}

Thanks anyway...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)