DetonateSatchels: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
|||
(One intermediate revision by the same user not shown) | |||
Line 5: | Line 5: | ||
<section name="Client" class="client" show="true"> | <section name="Client" class="client" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool detonateSatchels ( ) | bool detonateSatchels() | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> | ||
Line 11: | Line 11: | ||
<section name="Server" class="server" show="true"> | <section name="Server" class="server" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
bool detonateSatchels ( player Player ) | bool detonateSatchels(player Player) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> | ||
Line 20: | Line 20: | ||
==Example== | ==Example== | ||
The below example allows a player to detonate any of their placed satchels via the command /blowsatchels (Client-side) | 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-side" class="client" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addCommandHandler("blowsatchels", | addCommandHandler("blowsatchels", | ||
Line 31: | Line 31: | ||
The below example allows a player to detonate any of their placed satchels via the command /blowsatchels (Server-side) | The below example allows a player to detonate any of their placed satchels via the command /blowsatchels (Server-side) | ||
<section name=" | <section name="Server-side" class="server" show="true"> | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addCommandHandler("blowsatchels", | addCommandHandler("blowsatchels", |
Latest revision as of 21:02, 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 [-]
Client-sideaddCommandHandler("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 [-]
Server-sideaddCommandHandler("blowsatchels", function(sourcePlayer, commandName) detonateSatchels(sourcePlayer) end )