OnPlayerStealthKill

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

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

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

Cancel effect

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

Example

Click to collapse [-]
Server
[lua]
function onStealthKill(targetPlayer)
     outputChatBox("Stealth kill!", source)
     outputChatBox("" .. getPlayerName(targetPlayer) .. " has been stealth-killed by " .. getPlayerName(source) .. ".", source)
end
addEventHandler("onPlayerStealthKill", getRootElement(), onStealthKill)
[/lua]


See Also

Player events


Event functions