20.02.2019, 01:22
Hello, OnPlayerDeath function isn't calling in my gamemode
I tried with only print but still, it doesn't work
PHP Code:
public OnPlayerDeath(playerid, killerid, reason)
{
print("Player died");
if (PlayerInfo[playerid][pInjured] == 0)
{
PlayerInfo[playerid][pInjured] = 1;
GetPlayerPos(playerid, inj_x,inj_y,inj_z);
GetPlayerFacingAngle(playerid, injured_angle);
}
else if (PlayerInfo[playerid][pInjured] == 1)
{
KillTimer(AcceptDeathTimer[playerid]);
KillTimer(LoseHealthTimer[playerid]);
AcceptDeath[playerid] = 0;
PlayerInfo[playerid][pInjured] = 0;
Hospitalized[playerid] = 1;
}
return 1;
}