SetGravity: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 24: | Line 24: | ||
addCommandHandler ( "setgravity", grav ) | addCommandHandler ( "setgravity", grav ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==Issues== | |||
[https://github.com/multitheftauto/mtasa-blue/issues/1428 setGravity overrides setPedGravity] | |||
==See Also== | ==See Also== |
Revision as of 20:18, 5 May 2020
This function sets the server's gravity level.
Syntax
bool setGravity ( float level )
Required Arguments
- level: The level of gravity (default is 0.008).
Returns
Returns true if gravity was changed, false otherwise.
Example
function grav ( sourcePlayer, command, level ) local level = tonumber(level) if (not level) then return end setGravity ( tonumber(level) ) end addCommandHandler ( "setgravity", grav )
Issues
setGravity overrides setPedGravity
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