SetJetpackWeaponEnabled: Difference between revisions
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 setJetpackWeaponEnabled(weapon-Type, player thePlayer)</...") |
(→Syntax) |
||
Line 4: | Line 4: | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua">bool setJetpackWeaponEnabled(weapon | <syntaxhighlight lang="lua">bool setJetpackWeaponEnabled(string weapon, player thePlayer)</syntaxhighlight> | ||
===Required Arguments=== | ===Required Arguments=== | ||
Line 11: | Line 11: | ||
===Returns=== | ===Returns=== | ||
Returns true, else false if invalid arguments are passed. | Returns true, else false if invalid arguments are passed. | ||
==Example== | ==Example== |
Revision as of 19:39, 10 July 2012
This function sets a weapon usable while using the Jetpack.
Syntax
bool setJetpackWeaponEnabled(string weapon, player thePlayer)
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 type(wep) == "number" then wep = getWeaponNameFromID(wep) end 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