Garry's Mod Wiki

properties.CanBeTargeted

properties.CanBeTargeted

  boolean properties.CanBeTargeted( Entity ent, Player ply )

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

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.

Returns

1 boolean
True if entity can be targeted, false otherwise

Special Pages


Wikis

?

Render Time: 20ms

DB GetPage 3
Generate Html 3
SaveChanges (1) 6
Render Body 0
Render Sidebar 6