SA-MP Forums Archive
Anim problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Anim problem (/showthread.php?tid=418682)



Anim problem - Colossus874 - 25.02.2013

Well, I have this death system, and when the timer starts until respawn and the anim should be triggered, it doesn't. When you are dead it's mean't that you cannot move from there. You are basically freezed but I don't know what causes this anim not to be triggered. If I do /crack which is the same anim befoe dying it is triggered.

This is the anim code:
Код:
ApplyAnimation(playerid,"CRACK","crckdeth2",4.1,0,1,1,1,0,1);



Re: Anim problem - Da_Noob - 25.02.2013

Can we see the whole code you're having trouble with? There doesn't seem to be anything wrong with the ApplyAnimation.


Re: Anim problem - Colossus874 - 25.02.2013

Код:
 public DeathTimer()
{
    for(new i=0;i<MAX_PLAYERS;i++)
	{
	if(PlayerInfo[i][pDead] == 1){
	if(PlayerInfo[i][pDeadTimer] == 0){
	PlayerInfo[i][pDead] = 0;
	SpawnPlayer(i);
    SendClientMessage(i, COLOR_LIGHTBLUE, "You died, remember that you can't remember getting killed.!");
    TextDrawHideForPlayer(i, Textdraw0);
	}
	else if(PlayerInfo[i][pDeadTimer] < 61){
	if(PlayerInfo[i][pDeadAnim] == 1)
	{
	PlayerInfo[i][pDeadAnim] = 0;
	TogglePlayerControllable(i,false);
	ApplyAnimation(i,"CRACK","crckdeth2",4.1,0,1,1,1,0,1);
	}
	
	PlayerInfo[i][pDeadTimer]--;
	new string[128];
	format(string,sizeof(string),"Time until\nrespawn:\n%d seconds",PlayerInfo[i][pDeadTimer]);
	TextDrawShowForPlayer(i, Textdraw0);
	TextDrawSetString(Textdraw0, string);
	}
	}
	}
	
}
I had the ApplyAnim in the OnPlayerSpawn if you just died but changed it to the timer to try it.