14.06.2014, 22:43
I made a basic death system, however, it seems to set you to when you logged in. I've also preloaded the anim library and it doesn't seem to put you in the Crack anim, no matter how many times you set it in the OPD callback.
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
TogglePlayerSpectating(playerid, true);
new Float:X, Float:Y, Float:Z;
GetPlayerPos(playerid, X, Y, Z);
SetPlayerPos(playerid, X, Y, Z);
SetPlayerHealth(playerid, 30);
TogglePlayerSpectating(playerid, false);
ApplyAnimation(playerid,"CRACK","crckdeth2",4.1,1,1,1,1,1);
TogglePlayerControllable(playerid, false);
SendClientMessage(playerid, COLOR_RED, "You've been killed.");
return true;
}