03.05.2014, 19:17
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?
DeadAnim:
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); }
Код:
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; }