Garry's Mod Wiki

ENTITY:CanProperty

  boolean ENTITY:CanProperty( Player ply, string property )

Description

Controls if a property can be used on this entity or not.

This hook will only work in Sandbox derived gamemodes that do not have SANDBOX:CanProperty overridden.

This hook will work on ALL entities, not just the scripted ones (SENTs)

Arguments

1 Player ply
Player, that tried to use the property
2 string property
Class of the property that is tried to use, for example - bonemanipulate

Returns

1 boolean
Return false to disallow using that property, return true to allow.

You must return a value. Not returning anything can cause unexpected results.