Skip to content
KissLick edited this page Apr 14, 2016 · 10 revisions

Wardens can spawn a square fence for prisoners (through TG fences menu). fence

###Fences settings

ConVar Description
tg_fence_type Fence type (or turn off fence)
tg_fence_height Height of fence
tg_fence_notify Notify in chat that player crossed laser fence
tg_fence_punishlength Time in seconds to punish (color and freeze) player who crossed laser fence
tg_fence_freeze Freeze player who crossed laser fence
tg_fence_color Color player who crossed laser fence
tg_fence_punishcolor Color used on punished player

**File prefix** `[FenceMaterial ]` - Example: `[FenceMaterial 1.0 255 255 255 255] materials/cable/bf_rope.vmt`
Argument Description
width Width of the fence beam/rope
r Rendered amount of red color (0-255)
g Rendered amount of green color (0-255)
b Rendered amount of blue color (0-255)
a Rendered amount of alpha (0-255)

**File prefix** `[FenceCorner]` - Example: `[FenceCorner] models/ks/tg/ring_corner.mdl`
Note #1

We need to use two different shaders for fence material depending on fence type. For rope it's SplineRope and for beam it's for example Sprite or UnlitGeneric (beam can accept more shaders). What kind of shader your material uses is in vmt file (have a look at Source SDK - Creating material).


Note #2

You can also disable fences on certain maps. This way is better than ConVar tg_fence_type 0, because this won't precache needed models.

Example for jb_clouds_final5:
Create file jb_clouds_final5.disabled in directory configs/teamgames/fences/ (empty file is OK, the file just has to exist)