SetJetpackWeaponEnabled

From Multi Theft Auto: Wiki
Revision as of 17:11, 25 September 2012 by Jaysds1 (talk | contribs) (→‎Example)
Jump to navigation Jump to search

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

addEventHandler("onResourceStart",resourceRoot,function()
     if setJetpackWeaponEnabled("31",true) then
          outputChatBox(getWeaponNameFromID(31).." is now enabled for jetpacks!")
     end
end)

Requirements

This template will be deleted.

See Also