NPC:OnPlayerDeath
From SA-MP Wiki
(Difference between revisions)
Revision as of 13:56, 13 September 2009 Dark Kostas (Talk | contribs) (Deleted Return) ← Previous diff |
Revision as of 19:42, 23 April 2014 Ikkentim (Talk | contribs) (Added return value) Next diff → |
||
Line 10: | Line 10: | ||
{{Parameters|playerid}} | {{Parameters|playerid}} | ||
{{Param|playerid|The player who has died.}} | {{Param|playerid|The player who has died.}} | ||
+ | |||
+ | {{NoReturnCallback}} | ||
<pawn> | <pawn> |
Revision as of 19:42, 23 April 2014
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.
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).