SetGravity: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server client function}} | |||
==Description== | ==Description== | ||
This function sets the | This function sets the server's gravity level. Note that this does not effect players and their vehicles; to set player gravity use [[setPlayerGravity]]. | ||
==Syntax== | ==Syntax== | ||
Line 7: | Line 8: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''level''': The level of gravity ( default is | *'''level''': The level of gravity ( default is '''0.008''' ) | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function grav ( | function grav ( sourcePlayer, command, level ) | ||
setGravity ( | setGravity ( tonumber(level) ) | ||
end</syntaxhighlight> | end | ||
addCommandHandler ( "setgravity", grav ) | |||
</syntaxhighlight> | |||
==See Also== | ==See Also== | ||
{{World functions}} | {{World functions}} |
Revision as of 11:47, 16 August 2007
Description
This function sets the server's gravity level. Note that this does not effect players and their vehicles; to set player gravity use setPlayerGravity.
Syntax
setGravity ( float level )
Required Arguments
- level: The level of gravity ( default is 0.008 )
Example
function grav ( sourcePlayer, command, level ) setGravity ( tonumber(level) ) end addCommandHandler ( "setgravity", grav )
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