Garry's Mod Wiki


boolean properties.CanBeTargeted( Entity ent, Player ply )


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.


1 Entity ent
The entity to test
2 Player ply
If given, will also perform a distance check based on the entity's Orientated Bounding Box.


1 boolean
True if entity can be targeted, false otherwise

Page Links

Special Pages



Render Time: 38ms

Session 0
DB GetPage 5
Generate Html 10
SaveChanges 9
Render Body 0
Render Sidebar 11