GetJetpackWeaponEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
(Remove obsolete Requirements section)
 
(2 intermediate revisions by 2 users not shown)
Line 7: Line 7:


===Required Arguments===  
===Required Arguments===  
*'''weapon''' The weapon that's being checked if it's usable on a Jetpack.
*'''weapon:''' The weapon that's being checked if it's usable on a Jetpack.


===Returns===
===Returns===
Line 18: Line 18:
end
end
end)</syntaxhighlight>
end)</syntaxhighlight>
==Requirements==
 
{{Requirements|1.3.1|n/a|}}
==See Also==
==See Also==
{{World_functions}}
{{World_functions|server}}

Latest revision as of 17:05, 7 November 2024

This function checks if a weapon is usable while on a Jetpack.

Syntax

bool getJetpackWeaponEnabled(string weapon)

Required Arguments

  • weapon: The weapon that's being checked if it's usable on a Jetpack.

Returns

Returns true if the weapon is enabled, else false if the weapon isn't or invalid arguments are passed.

Example

addCommandHandler("isJPEnabled",function(ped,_,wep)
	if ped then
		outputChatBox(tostring(getJetpackWeaponEnabled(wep)),ped)
	end
end)

See Also