Animation focused endless -
SukMathcuck - 02.06.2015
Hello! I'm here trying to fix and give up, so, the person dies, and she goes to the hospital, in a coma, the player plays an animation, and this animation works fine until the time the patient is discharged from the hospital when the player discharged, the player is locked in an animation indefinitely, lying on the ground, as the pictures shows, I think it is something the Timer, do not know, I tried and tried everything and nothing really worked, I will show some information. .
Player comatose (so far, so good ..):
player with error with an endless animation (this is the error!):
PHP код:
forward AnimacaoEmComa(playerid);
new animacao_forcada3[MAX_PLAYERS];
animacao_forcada3[playerid] = SetTimerEx("AnimacaoEmComa", 4000, true, "i", playerid); //When it starts, the animation is called .. and freezes the player every 4 seconds;
public AnimacaoEmComa(playerid)
{
TogglePlayerControllable(playerid, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1 , 0, 1, 1, 0, 4000, 0) ; //animation tired to modify, months and months trying
}
public FuncaoHospital(id) //function call to when the patient is discharged, have more code in this function, put only what you need
{
KillTimer(animacao_forcada3[id]); SetPlayerSpecialAction(id, 0); ClearAnimations(id); //This function is to disconnect / end the Timer and animations;
}
Re: Animation focused endless -
rappy93 - 02.06.2015
Can you show the code where you call
FuncaoHospital ?
Re: Animation focused endless -
SukMathcuck - 02.06.2015
PHP код:
forward FuncaoHospital(id);
public FuncaoHospital(id)
{
}
return true;
}
Re: Animation focused endless -
SukMathcuck - 02.06.2015
please someone? it is urgent the code above!
Re: Animation focused endless -
Threshold - 03.06.2015
Where are you actually using SetTimerEx to call 'FuncaoHospital(id)'
You don't need a timer for the animation either... ApplyAnimation has a 'loop' parameter which will make the animation run continuously until stopped with ClearAnimations or another animation is played.
pawn Код:
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 1, 1, 1, 0, 0, 1); // Call this when a player is meant to get the animation
forward FuncaoHospital(id);
public FuncaoHospital(id) // When the player is discharged
{
SetPlayerSpecialAction(id, 0);
ClearAnimations(id);
return 1;
}
Re: Animation focused endless -
rappy93 - 03.06.2015
PHP код:
forward AnimacaoEmComa(playerid);
new animacao_forcada3[MAX_PLAYERS];
public AnimacaoEmComa(playerid)
{
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1 , 1, 1, 1, 0, 4000, 0) ; //animation set up to be in a continuos loop
}
public FuncaoHospital(id) //function call to when the patient is discharged, have more code in this function, put only what you need
{
SetPlayerSpecialAction(id, 0);
ClearAnimations(id); //This function is to disconnect / end the Timer and animations;
}
If it is still not working please reply with the code for FuncaoHospital and also where you use the FuncaoHospital function.