ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server events
  3. onPlayerStealthKill

Event

onPlayerStealthKill

ServerPlayersIdentical to MTA:SA

A player kills someone silently with a knife from behind. You can block the kill; otherwise the victim gets onPlayerWasted with stealth = true.

Handler

addEventHandler("onPlayerStealthKill", root, function(targetPlayer) ... end)

Parameters

targetPlayerplayer
The victim.

Source

source is the killer.

cancelEvent() = the victim lives.

Example

addEventHandler("onPlayerStealthKill", root, function(target)
    if getElementData(target, "admin") then cancelEvent() end
end)

See also