OnPlayerDetonateSatchels: Difference between revisions
Jump to navigation
Jump to search
Line 15: | Line 15: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addEventHandler("onPlayerDetonateSatchels", root, function() | addEventHandler("onPlayerDetonateSatchels", root, function() | ||
local msg = string.format("%s's Satchels has been detonated") | local msg = string.format("%s's Satchels has been detonated", getPlayerName(source)) | ||
outputChatBox(msg) | outputChatBox(msg) | ||
end) | end) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{See also/Server event|Player events}} | {{See also/Server event|Player events}} |
Revision as of 19:17, 23 December 2023
Parameters
No parameters.
Source
The source of this event is the player whose satchels are being detonated.
Canceling
If this event is canceled, the satchels will not detonate.
Example
The below example will notify everyone on the server when someones Satchels get detonated
addEventHandler("onPlayerDetonateSatchels", root, function() local msg = string.format("%s's Satchels has been detonated", getPlayerName(source)) outputChatBox(msg) end)
See Also
Player events
- onPlayerACInfo
- onPlayerBan
- onPlayerChangeNick
- onPlayerChat
- onPlayerClick
- onPlayerCommand
- onPlayerConnect
- onPlayerContact
- onPlayerDamage
- onPlayerJoin
- onPlayerLogin
- onPlayerLogout
- onPlayerMarkerHit
- onPlayerMarkerLeave
- onPlayerModInfo
- onPlayerMute
- onPlayerNetworkStatus
- onPlayerPickupHit
- onPlayerPickupLeave
- onPlayerPickupUse
- onPlayerPrivateMessage
- onPlayerQuit
- onPlayerScreenShot
- onPlayerSpawn
- onPlayerStealthKill
- onPlayerTarget
- onPlayerUnmute
- onPlayerVehicleEnter
- onPlayerVehicleExit
- onPlayerVoiceStart
- onPlayerVoiceStop
- onPlayerWasted
- onPlayerWeaponFire
- onPlayerWeaponSwitch
Event functions
- addEvent
- addEventHandler
- cancelEvent
- cancelLatentEvent
- getEventHandlers
- getLatentEventHandles
- getLatentEventStatus
- removeEventHandler
- triggerEvent
- wasEventCancelled