OnPlayerDetonateSatchels

From Multi Theft Auto: Wiki
Revision as of 19:18, 23 December 2023 by ItsHasaN (talk | contribs) (→‎Example)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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 Satchel(s) 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


Event functions