Animations after dying - 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: Animations after dying (
/showthread.php?tid=511062)
Animations after dying -
Gecko75 - 03.05.2014
Hi-
I made my own afterdeath system, and it seems that it won't apply the animation I specified.
Everything else works, but the player isn't put into the animation and they wont stay there.
CheckWounded is called on a timer AFTER OnPlayerSpawn.
Like I said, everything works BUT the animation.
Any suggestions?
Код:
public CheckWounded(playerid)
{
if(PlayerIsWounded(playerid))
{
PutPlayer(playerid,PlayerInfo[playerid][pPosX],PlayerInfo[playerid][pPosY],PlayerInfo[playerid][pPosZ]);
SetInterior(playerid, PlayerInfo[playerid][pInt]);
SetWorld(playerid, PlayerInfo[playerid][pWorld]);
SetPlayerHealth(playerid, 40.0);
SCM(playerid, COLOR_LIGHTRED, "You are brutally wounded, you may wait for a medical assistance or '/acceptdeath'.");
//OnPlayAnim(playerid, "WUZI", "CS_Dead_Guy", 4.0, 1, 1, 1, 1, 0);
//OnPlayAnim(playerid, "WUZI", "CS_Dead_Guy", 4.1, 1, 0, 0, 0, 1);
FreezePlayer(playerid);
SetTimerEx("UnFreezePlayer", 3250, 0, "i", playerid);
DeadAnim(playerid);
SetTimerEx("DeadAnim", 3500, 0, "i", playerid);
SetPlayerWeather(playerid, -91);
}
DeadAnim:
Код:
public DeadAnim(playerid)
{
//playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp
//OnPlayAnim(playerid, "WUZI", "CS_Dead_Guy", 4.1, 1, 0, 0, 0, 1);
ApplyAnimation(playerid, "WUZI", "CS_Dead_Guy", 4.1, 1, 0, 0, 0, 1, 1);
return 1;
}
Re: Animations after dying -
XK - 03.05.2014
try this one
pawn Код:
ApplyAnimation(playerid,"PED","FLOOR_hit_f",4.0,0,1,1,1,0,1);