Entity.IsPlayer

From GMod Wiki

Revision as of 17:21, 27 September 2009 by Dlaor (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax Entity:IsPlayer( )
Description:
Returns true if the entity is a Player.
Returns: Boolean
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.IsPlayer]Entity.IsPlayer [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionReturns if a object is a player
Used onNewerShared.png
Code
if attacker:IsPlayer() then -- If the attacker is a player then
	return false -- Dont let the player take damage if the attacker is a player
end
OutputBool


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox