Skip to main content

SendDeathMessageToPlayer

คำอธิบาย

Adds a death to the 'killfeed' on the right-hand side of the screen for a single player.

NameDescription
playeridThe ID of the player to send the death message to.
killerThe ID of the killer (can be INVALID_PLAYER_ID).
killeeThe ID of the player that died.
weaponThe reason (not always a weapon) for the victim's death. Special icons can also be used (ICON_CONNECT and ICON_DISCONNECT).

ส่งคืน

1: The function was executed successfully.

0: The function failed to execute.

ตัวอย่าง

public OnPlayerDeath(playerid, killerid, WEAPON:reason)
{
// Sends a death message to "playerid" shows that "killerid" killed "playerid" for "reason"
SendDeathMessageToPlayer(playerid, killerid, playerid, reason);

return 1;
}

ฟังก์ชั่นที่เกี่ยวข้องกัน

  • SendDeathMessage: Add a kill to the death list.
  • OnPlayerDeath: Called when a player dies.