GetWindVelocity: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function gets the wind velocity in San Andreas. ==Syntax== <syntaxhighlight lang="lua"> int, int, int getWindVelocity ( ) </syntaxhighlight> ===Returns=== *'''vel...") |
CrosRoad95 (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
{{Server client function}} | {{Server client function}} | ||
This function gets the wind velocity in San Andreas. | This function gets the wind velocity in San Andreas. | ||
{{Note|The function will return ''false'' server-side if wind velocity has not been set before the function is called.}} | |||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> |
Latest revision as of 16:53, 20 May 2020
This function gets the wind velocity in San Andreas.
Syntax
int, int, int getWindVelocity ( )
Returns
- velocityX: The velocity on the x-coordinate or false if the wind velocity is default.
- velocityY: The velocity on the y-coordinate or nil if the wind velocity is default.
- velocityZ: The velocity on the z-coordinate or nil if the wind velocity is default.
Example
This example returns the wind velocity to a player if they use the command 'getwindvelocity'.
function commandGetWindVelocity(player, command) local vx, vy, vz = getWindVelocity() if (vx) then outputChatBox("Wind Velocity X:"..vx.." Y:"..vy.." Z:"..vz, player, 255, 255, 0) else outputChatBox("Wind velocity is default.", player, 255, 255, 0) end end addCommandHandler("getwindvelocity", commandGetWindVelocity)
See Also
- createSWATRope
- getBirdsEnabled
- getCoronaReflectionsEnabled
- getGarageBoundingBox
- getGaragePosition
- getGarageSize
- getGroundPosition
- getInteriorFurnitureEnabled
- getNearClipDistance
- getPedsLODDistance
- getRoofPosition
- getScreenFromWorldPosition
- getVehiclesLODDistance
- getWorldFromScreenPosition
- isAmbientSoundEnabled
- isLineOfSightClear
- isWorldSoundEnabled
- processLineOfSight
- resetAmbientSounds
- resetBlurLevel
- resetColorFilter
- resetCoronaReflectionsEnabled
- resetNearClipDistance
- resetPedsLODDistance
- resetVehiclesLODDistance
- resetWorldSounds
- setAmbientSoundEnabled
- setBirdsEnabled
- setColorFilter
- setCoronaReflectionsEnabled
- setInteriorFurnitureEnabled
- setInteriorSoundsEnabled
- setNearClipDistance
- setPedsLODDistance
- setVehiclesLODDistance
- setWorldSoundEnabled
- testLineAgainstWater
- 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