NPC:OnPlayerDeath
From SA-MP Wiki
Important | For the player version of this callback, check OnPlayerDeath. |
Description:
Just as the player version of the callback, this callback is called when any player dies.
(playerid)
playerid | The player who has died. |
Return Values:
This callback does not handle returns.
Example Usage:
public OnPlayerDeath(playerid) { new string[80], name[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "Oh no %s! I didn't want you to die that way!", name); SendChat(string); return 1; }
Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.
- NPC:OnPlayerText: Called when any player writes some chat.
- NPC:OnClientMessage: Called when a client message is sent to the player (or to all players).