10.08.2016, 17:51
You actually don't need this. When someone is shooting at you and then you set your health to 0.0 it won't be not be considered as suicide. The killerid will be the the same person who was shooting you.
You can check it by yourself with debug code:
You can check it by yourself with debug code:
Код:
public OnPlayerDeath(playerid, killerid, reason) { if(killerid == INVALID_PLAYER_ID) SendClientMessage(playerid, -1, "Death reason: suicide/died"); else SendClientMessage(playerid, -1, "You're killed"); return 1; }