SetJetpackWeaponEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 14: Line 14:


==Example==  
==Example==  
{{Example}}
function weaponEnabled ()
setJetpackWeaponEnabled ( 27, true )
end
addCommandHandler ("enableSpas12", weaponEnabled)
 
==Requirements==
==Requirements==
{{Requirements|1.3.1|n/a|}}
{{Requirements|1.3.1|n/a|}}
==See Also==
==See Also==
{{World_functions}}
{{World_functions}}

Revision as of 08:17, 3 September 2012

This function sets a weapon usable while using the Jetpack.

Syntax

bool setJetpackWeaponEnabled(string weapon, bool enabled)

Required Arguments

  • weapon The weapon that's being set usable on a Jetpack.
  • enabled A bool representing whether the weapon is enabled or disabled.

Returns

Returns true, else false if invalid arguments are passed.

Example

function weaponEnabled () setJetpackWeaponEnabled ( 27, true ) end addCommandHandler ("enableSpas12", weaponEnabled)

Requirements

This template will be deleted.

See Also