Garry's Mod Wiki

Revision Difference

Entity:IsPlayer#514654

<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>⤶ &amp;lt;nowiki&amp;gt;true⤶ false&amp;lt;/nowiki&amp;gt;⤶ </output>⤶ ⤶ </example>