ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setGravity

Function

setGravity

ServerWorldIdentical to MTA:SA

Changes the gravity strength in the game world for every player. The default is 0.008; a smaller value gives higher jumps and longer car flights (e.g. 0.004 = half of Earth's). The game accepts values above 0 and below 1.

Syntax

bool setGravity(float g)

Arguments

gfloat
Gravity strength, 0.008 by default.

Returns

true on success.

Example

addCommandHandler("ksiezyc", function()
    setGravity(0.0013)
end)

See also