SetJetpackWeaponEnabled: Difference between revisions
Jump to navigation
Jump to search
(→Syntax) |
mNo edit summary |
||
Line 4: | Line 4: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool setJetpackWeaponEnabled(string weapon, | <syntaxhighlight lang="lua">bool setJetpackWeaponEnabled(string weapon, bool enabled)</syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua">addCommandHandler("setJPEnabled",function(ped,_,wep,enabled) | <syntaxhighlight lang="lua">addCommandHandler("setJPEnabled",function(ped,_,wep,enabled) | ||
if enabled == "true" then | if enabled == "true" then | ||
setJetpackWeaponEnabled(wep,true) | setJetpackWeaponEnabled(wep,true) |
Revision as of 19:44, 10 July 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
addCommandHandler("setJPEnabled",function(ped,_,wep,enabled) if enabled == "true" then setJetpackWeaponEnabled(wep,true) outputChatBox("You just enabled the Jetpack Weapons.",ped) elseif enabled == "false" then setJetpackWeaponEnabled(wep,false) outputChatBox("You just disabled the Jetpack Weapons.",ped) else outputChatBox("SYNTAX: '/setJPEnabled theWeapon enabled" end end)
Requirements
This template will be deleted.
See Also
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getPlayerBlurLevel
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight
- setPlayerBlurLevel