properties.CanBeTargeted

From Garry's Mod
Jump to: navigation, search
 properties.CanBeTargeted( )

Contents

Description

Returns true if given entity can be targeted by the player via the properties system.

This should be used serverside in your properties to prevent abuse by clientside scripting.

Arguments

Entity ent

The entity to test

Arguments

Player ply

If given, will also perform a distance check based on the entity's Orientated Bounding Box.

Returns

boolean

True if entity can be targeted, false otherwise
Personal tools
Navigation