GetJetpackWeaponEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server function}} This function sets a weapon usable while using the Jetpack. ==Syntax== <syntaxhighlight lang="lua">bool getJetpackWeaponEnabled(string weapon)</syntaxhighlight> ===Requi...")
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Server function}}
{{Server function}}
This function sets a weapon usable while using the Jetpack.
This function checks if a weapon is usable while on a Jetpack.


==Syntax==  
==Syntax==  
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===

Latest revision as of 17:13, 25 September 2012

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)

Requirements

Minimum server version 1.3.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.3.1" />

See Also

Shared