20.09.2015, 00:23
Slice or Crayder, in OnPlayerPrepareDeath:
Its correct? Or or I have to use ApplyAnimation (if yes, i don't understand options animlib[32] and animname[32] in functions)
---
Issue here: After player death (with killerid != INVALID_PLAYER_ID), server crashs. If i type /kill, set health to 0.0, dies normaly, and no crash. I put in pastebin my OnPlayerDeath, OnPlayerPrepareDeath, OnPlayerDamage(Done): http://pastebin.com/hEXwzW2u
i make comments in pastebin, ok?
Edit: i use SAMP Server Linux 0.3.7 R2-1 on my server.
Code:
public OnPlayerPrepareDeath(playerid, animlib[32], animname[32], &anim_lock, &respawn_time)
{
// P_SHOOTEDBODY detect bodypart player shooted, in OnPlayerDamageDone
respawn_time = 5000;
anim_lock = 1;
if(PLAYER_INFO[playerid][P_SHOOTEDBODY] != -1)
{
if(PLAYER_INFO[playerid][P_SHOOTEDBODY] == SHOOTED_FRONT_CHEST)
{
animlib = "PED";
animname = "KO_shot_stom";
}
else if(PLAYER_INFO[playerid][P_SHOOTEDBODY] == SHOOTED_FRONT_HEAD)
{
animlib = "PED";
animname = "KO_shot_face";
}
else if(PLAYER_INFO[playerid][P_SHOOTEDBODY] == SHOOTED_FRONT_TORSO)
{
animlib = "PED";
animname = "KO_shot_stom";
}
else if(PLAYER_INFO[playerid][P_SHOOTEDBODY] == SHOOTED_BACK_TORSO)
{
animlib = "PED";
animname = "KO_skid_back";
}
else if(PLAYER_INFO[playerid][P_SHOOTEDBODY] == SHOOTED_BACK_HEAD)
{
animlib = "FINALE";
animname = "FIN_Land_Die";
}
}
else
{
animlib = "PED";
animname = "KO_skid_back";
}
PLAYER_INFO[playerid][P_SHOOTEDBODY] = -1;
return true;
}
---
Issue here: After player death (with killerid != INVALID_PLAYER_ID), server crashs. If i type /kill, set health to 0.0, dies normaly, and no crash. I put in pastebin my OnPlayerDeath, OnPlayerPrepareDeath, OnPlayerDamage(Done): http://pastebin.com/hEXwzW2u
i make comments in pastebin, ok?
Edit: i use SAMP Server Linux 0.3.7 R2-1 on my server.

