20.09.2016, 23:08
Well, i've been improving my death system recently, then i faced a problem, took me 2 hours and still i cannot fix it.
When a player dies, if he isn't in the heavily injured status, he will be dropped (In a sleeping animation) on the ground, and frozen.
But what happens is, everything is fine, skin is fine, freezing is fine, expect the animation, it doesn't happen AT ALL. >.>
Here, i'll show my OnPlayerSpawn, and OnPlayerDeath callbacks.
OnPlayerSpawn:
OnPlayerDeath:
Also, if anyone can give me exact death(sleep) animation? >.>
Thank you.
When a player dies, if he isn't in the heavily injured status, he will be dropped (In a sleeping animation) on the ground, and frozen.
But what happens is, everything is fine, skin is fine, freezing is fine, expect the animation, it doesn't happen AT ALL. >.>
Here, i'll show my OnPlayerSpawn, and OnPlayerDeath callbacks.
OnPlayerSpawn:
Код:
if(pInfo[playerid][Injured] == 1)
{
SetPlayerPos(playerid,pInfo[playerid][XPos],pInfo[playerid][YPos],pInfo[playerid][ZPos]);
SetPlayerFacingAngle(playerid,pInfo[playerid][Angle]);
SetPlayerDrunkLevel(playerid,4999);
SetPlayerSkin(playerid,pInfo[playerid][Skin]);
GameTextForPlayer(playerid, "~r~Heavily injured.", 600000, 6);
ApplyAnimation(playerid, "CRACK", "crckdeth4",4.1,0,0,0,1,1);
SetPlayerHealth(playerid,25);
SetTimerEx("Reducedeathhp",30000,true,"i",playerid);
TogglePlayerControllable(playerid,0);
Код:
GetPlayerPos(playerid,pInfo[playerid][XPos],pInfo[playerid][YPos],pInfo[playerid][ZPos]);
GetPlayerFacingAngle(playerid,pInfo[playerid][Angle]);
pInfo[playerid][Skin] = GetPlayerSkin(playerid);
if(pInfo[playerid][Injured] == 0)
{
pInfo[playerid][Injured] = 1;
}
else if(pInfo[playerid][Injured] == 1)
{
pInfo[playerid][Injured] = 0;
}
Thank you.



