SetAircraftMaxHeight: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function changes the maximum flying height of aircraft. ==Syntax== <syntaxhighlight lang="lua"> bool setAircraftMaxHeight ( float Height ) </syntaxhighlight> ===R...") |
ThePiotrek (talk | contribs) m (Error fixed) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | {{Server client function}} | ||
This function changes the maximum flying height of aircraft. | This function changes the maximum flying height of aircraft. | ||
Line 9: | Line 10: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''Height''' | *'''Height''' The height you want aircraft to be able to go. | ||
===Returns=== | ===Returns=== | ||
Line 21: | Line 22: | ||
local height = tonumber ( ve1 ) | local height = tonumber ( ve1 ) | ||
if height then | if height then | ||
local wert = setAircraftMaxHeight ( height ) | if height > 0 then | ||
local wert = setAircraftMaxHeight ( height ) | |||
if wert == true then | |||
outputChatBox ( "Aircraft height set!", 0, 200, 0 ) | |||
else | |||
outputChatBox ( "Error to set Aircraft height!", 255, 0, 0 ) | |||
end | |||
else | else | ||
outputChatBox ( " | outputChatBox ( "Value must be above 0", 255, 0, 0 ) | ||
end | end | ||
else | else | ||
outputChatBox ( "Error to set Aircraft | outputChatBox ( "Error to set Aircraft height!", 255, 0, 0 ) | ||
end | end | ||
end | end |
Latest revision as of 14:57, 6 September 2016
This function changes the maximum flying height of aircraft.
Syntax
bool setAircraftMaxHeight ( float Height )
Required Arguments
- Height The height you want aircraft to be able to go.
Returns
Returns true if successful, false otherwise.
Example
Click to collapse [-]
ClientThis example shows you a command to set your maximum aircraft height.
function setAircraftHeight ( command, ve1 ) local height = tonumber ( ve1 ) if height then if height > 0 then local wert = setAircraftMaxHeight ( height ) if wert == true then outputChatBox ( "Aircraft height set!", 0, 200, 0 ) else outputChatBox ( "Error to set Aircraft height!", 255, 0, 0 ) end else outputChatBox ( "Value must be above 0", 255, 0, 0 ) end else outputChatBox ( "Error to set Aircraft height!", 255, 0, 0 ) end end addCommandHandler ( "aircraft", setAircraftHeight )
See Also
- areTrafficLightsLocked
- createSWATRope
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getBirdsEnabled
- getCloudsEnabled
- getCoronaReflectionsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGarageBoundingBox
- getGaragePosition
- getGarageSize
- getGravity
- getGroundPosition
- getHeatHaze
- getInteriorFurnitureEnabled
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getNearClipDistance
- getOcclusionsEnabled
- getPedsLODDistance
- getPlayerBlurLevel
- getRainLevel
- getRoofPosition
- getScreenFromWorldPosition
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getVehiclesLODDistance
- getWeather
- getWindVelocity
- getWorldFromScreenPosition
- getZoneName
- isAmbientSoundEnabled
- isGarageOpen
- isLineOfSightClear
- isWorldSoundEnabled
- isWorldSpecialPropertyEnabled
- processLineOfSight
- removeWorldModel
- resetAmbientSounds
- resetBlurLevel
- resetColorFilter
- resetCoronaReflectionsEnabled
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetNearClipDistance
- resetPedsLODDistance
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetVehiclesLODDistance
- resetWindVelocity
- resetWorldSounds
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setAmbientSoundEnabled
- setBirdsEnabled
- setCloudsEnabled
- setColorFilter
- setCoronaReflectionsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorFurnitureEnabled
- setInteriorSoundsEnabled
- setJetpackMaxHeight
- setMinuteDuration
- setMoonSize
- setNearClipDistance
- setOcclusionsEnabled
- setPedsLODDistance
- setPlayerBlurLevel
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightsLocked
- setTrafficLightState
- setVehiclesLODDistance
- setWeather
- setWeatherBlended
- setWindVelocity
- setWorldSoundEnabled
- setWorldSpecialPropertyEnabled
- testLineAgainstWater