Entity.GetGravity

From GMod Wiki

Revision as of 13:00, 22 August 2010 by Jespercal (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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