Entity.GetGravity

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:GetGravity( )
Description:
Gets the players gravity in float(ex. if sv_gravity is 600 and ply:GetGravity is 0.5, then the gravity for the player, is 300)
Returns: Float
In Object: Entity
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.GetGravity]Entity.GetGravity [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionReturns the player's gravity to numbers
Used onNewerServer.png
Code
 
function ReturnGravity( ply )
    local ServerGravity = 800
    local PlayerGravity = ply:GetGravity()
 
    Msg("Your gravity on the server is: "..tostring(ServerGravity*PlayerGravity).."!")
end
Output"Your gravity on the server is: 400!"

Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox