OnPlayerDetonateSatchels: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server event}} {{Added feature/item|1.6.1|1.6.0|22293|This event is triggered every time satchels are detonated - either by a player or through detonateSatchels.}} ==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== <syntaxhighlight lang="...")
 
Line 12: Line 12:


==Example==
==Example==
The below example will notify everyone on the server when someones Satchels get detonated
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
 
addEventHandler("onPlayerDetonateSatchels", root, function()
    local msg = string.format("%s's Satchels has been detonated")
    outputChatBox(msg)
end)
</syntaxhighlight>
</syntaxhighlight>
{{See also/Server event|Player events}}
{{See also/Server event|Player events}}

Revision as of 19:17, 23 December 2023

BETA: NEW FEATURE (BUILD: 1.6.0 r22293)
This event is triggered every time satchels are detonated - either by a player or through detonateSatchels.

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")
    outputChatBox(msg)
end)

See Also

Player events


Event functions

Shared