setJetpackWeaponEnabled | Multi Theft Auto: Wiki Skip to content

setJetpackWeaponEnabled

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function sets a weapon usable while using the Jetpack.

Note

colt 45, sawed-off, tec-9 and uzi are always enabled for the Jetpack and are not affected by this function.

Syntax

bool setJetpackWeaponEnabled ( int weaponID/string weaponName, bool enabled )
Required Arguments
  • weaponID/string weaponName: MISSING_PARAM_DESC
  • enabled: MISSING_PARAM_DESC

Returns

  • bool: value

Returns true if successful, or false if invalid arguments are passed.

Code Examples

shared

This example enables the M4 to be fired while using a jetpack and announces it in the chat.

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

See Also

World Functions