GetGravity

From Multi Theft Auto: Wiki
Revision as of 17:13, 31 July 2007 by Jbeta (talk | contribs) (Checked, minor fixes)
Jump to navigation Jump to search

This function returns the current gravity level for the context in which it is called (server or client).

Syntax

getGravity()

Example

This serverside command outputs the serverside gravity level.

function getGravityLevel( playerSource )
    local gravity = getGravity()
    outputConsole ( "The gravity is currently set to "..gravity, playerSource )
end
-- attach the 'getGravityLevel' function to the "gravity" command
addCommandHandler ( getGravityLevel, "gravity" )

See Also

Shared