getPedGravity | Multi Theft Auto: Wiki Skip to content

getPedGravity

Client-side
Server-side
Shared

Pair: setPedGravity

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns the current gravity for the specified ped. The default gravity is 0.008.

Syntax

getPedGravity ( )

Code Examples

server

This example outputs the gravity of the player who entered the 'showGravity' command.

function showGravity ( thePlayer )
local gravity = getPedGravity ( thePlayer )
outputChatBox ( "Your gravity: " .. tostring(gravity), thePlayer )
end
addCommandHandler ( "showGravity", showGravity )

See Also