DetonateSatchels: Difference between revisions
Jump to navigation
Jump to search
ThePiotrek (talk | contribs) No edit summary |
|||
Line 19: | Line 19: | ||
==Example== | ==Example== | ||
The below example allows a player to detonate any of their placed satchels via the command /blowsatchels | The below example allows a player to detonate any of their placed satchels via the command /blowsatchels (Client-side) | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function | addCommandHandler("blowsatchels", | ||
function() | |||
detonateSatchels() | |||
end | |||
addCommandHandler("blowsatchels", | ) | ||
</syntaxhighlight> | |||
</section> | |||
The below example allows a player to detonate any of their placed satchels via the command /blowsatchels (Server-side) | |||
<section name="Client" class="server" show="true"> | |||
<syntaxhighlight lang="lua"> | |||
addCommandHandler("blowsatchels", | |||
function(sourcePlayer, commandName) | |||
detonateSatchels(sourcePlayer) | |||
end | |||
) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> |
Revision as of 19:56, 18 November 2022
This function can be used to detonate a players satchels.
Syntax
Click to collapse [-]
Clientbool detonateSatchels ( )
Click to collapse [-]
Serverbool detonateSatchels ( player Player )
Returns
Returns true if successful, false otherwise.
Example
The below example allows a player to detonate any of their placed satchels via the command /blowsatchels (Client-side)
Click to collapse [-]
ClientaddCommandHandler("blowsatchels", function() detonateSatchels() end )
The below example allows a player to detonate any of their placed satchels via the command /blowsatchels (Server-side)
Click to collapse [-]
ClientaddCommandHandler("blowsatchels", function(sourcePlayer, commandName) detonateSatchels(sourcePlayer) end )