Garry's Mod Wiki

Revision Difference

Entity:IsPlayer#526365

<function name="IsPlayer" parent="Entity" type="classfunc"> <description>Checks if the entity is a player or not.</description> <realm>Shared</realm> <rets> <ret name="" type="boolean">Whether the entity is a player.</ret> </rets> </function> <example> <description>Checks if two entities are players.</description> <code> print( player.GetByID( 1 ):IsPlayer() ) print( ents.FindByClass( "prop_physics" )[ 1 ]:IsPlayer() ) </code> <outputfixedwidth>Fixed width</outputfixedwidth> <output> &lt;nowiki&gt;true⤶ false&lt;/nowiki&gt;⤶ true<br/>⤶ false⤶ </output> </example>