SetWindVelocity: Difference between revisions
Jump to navigation
Jump to search
(Cleaned up the grammar & example.) |
mNo edit summary |
||
Line 17: | Line 17: | ||
==Example== | ==Example== | ||
<section name="Client" class="client" show="true"> | |||
This example shows how to make a simple /windVelocity command. | This example shows how to make a simple /windVelocity command. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local function windVelocityCommand(_, x, y, z) | local function windVelocityCommand(_, x, y, z) |
Revision as of 20:58, 18 April 2012
This function changes the wind velocity.
Syntax
bool setWindVelocity ( float velocityX, float velocityY, float velocityZ )
Required Arguments
- velocityX: The velocity of the wind along the x axis
- velocityY: The velocity of the wind along the y axis
- velocityZ: The velocity of the wind along the z axis
Returns
Returns true if successful, false otherwise.
Example
Click to collapse [-]
ClientThis example shows how to make a simple /windVelocity command.
local function windVelocityCommand(_, x, y, z) -- Ensure all arguments are valid (default to 0 otherwise) x = tonumber(x) or 0 y = tonumber(y) or 0 z = tonumber(z) or 0 -- Set the wind velocity, and inform the user of the change. setWindVelocity(x, y, z) outputChatBox("* Wind velocity set to ("..x..", "..y..", "..z..").", 0, 255, 0) end addCommandHandler("windVelocity", windVelocityCommand)
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