Entity.OnGround

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:OnGround( )
Description:
Returns true if the entity is being supported by ground below it.
Returns: Boolean
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.OnGround]Entity.OnGround [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionChecks to see if someone is on the ground.
Used onNewerShared.png
Code
function OnGroundTest( ply )
	if ply:OnGround() then
		ply:PrintMessage(HUD_PRINTTALK, ply:Name() .." is on the ground safe and sound.");
	end
end
OutputPrints a message if the player is on the ground or standing on a prop.


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox