Skip to content

onPlayerStealthKill

Server-side

This event is triggered when a player stealth kills another player.

Parameters

element targetPlayer
  • targetPlayer: the player or ped that is being stealth killed.

Source

element: The source of this event is the player that initiated the stealth kill.

Canceling

If this event is canceled, then the stealth kill is aborted.

Code Examples

server
function onStealthKill(targetPlayer)
outputChatBox("Stealth kill!", source) -- Tell the player he/she has done a stealth kill.
outputChatBox(getPlayerName(targetPlayer).." has been stealth-killed by "..getPlayerName(source)..".")
end
addEventHandler("onPlayerStealthKill", root, onStealthKill) -- Adds a handler for the stealth kill event.

See Also