02.06.2015, 15:22
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!):
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;
}