Closed Nebual closed 1 year ago
Minimum functionality required for a Prop Protection to be implemented.
Example minimalist Prop Protection that would treat all tools (including "tool_wiring" & "use" & "physgun") the same, and only allows the Entity's owner player to trace:
[Event( "player.cantool" )] public static void OnCanTool( CanToolParams canToolParams ) { if ( canToolParams.entity.GetPlayerOwner().IsValid() && canToolParams.player != canToolParams.entity.GetPlayerOwner() ) { canToolParams.preventDefault = true; } }
Minimum functionality required for a Prop Protection to be implemented.
Example minimalist Prop Protection that would treat all tools (including "tool_wiring" & "use" & "physgun") the same, and only allows the Entity's owner player to trace: