DetonatePlayerSatchels

From Multi Theft Auto: Wiki
Revision as of 17:28, 5 January 2014 by Arran Fortuna (talk | contribs) (Created page with "__NOTOC__ {{Server function}} This function detonates the thrown satchels of a player, as if they had fired the detonator. ==Syntax== <syntaxhighlight lang="lua"> bool detonatePlayerSatchels(...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function detonates the thrown satchels of a player, as if they had fired the detonator.

Syntax

bool detonatePlayerSatchels( player thePlayer )         

Required Arguments

  • thePlayer: the player that should have their thrown satchels detonated.

Returns

Returns true if a valid player element was passed, false otherwise.

Example

This example will allow players to detonate their thrown satchels via the command /detonate

function cmdDetonateSatchels(plr)
	detonatePlayerSatchels(plr)
end
addCommandHandler("detonate", cmdDetonateSatchels)

Requirements

Minimum server version 1.1
Minimum client version n/a

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.1" />

See Also