Garry's Mod

Garry's Mod

68 ratings
Team Gates/Walls
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
Addon Tags: Build, Roleplay
File Size
Posted
Updated
372.853 KB
16 Jul, 2017 @ 1:23pm
29 Jul, 2017 @ 2:47pm
3 Change Notes ( view )

Subscribe to download
Team Gates/Walls

Description
This should work with any gamemode. But there is still a possibility that there can be some compatability issues.
Teams will only work if the gamemode is using the default team system in Garry's Mod

This addon has a configuration file accessible if you extract the workshop addon or get the source code from the git repository[github.com]

This is a system that allows players to spawn a gate which can be customised to allow only certain people (by team, ULX/ULib Group, SteamID), vehicles and NPCs through it.
I've tried to make the system as feature-rich by default as I could, but it allows for further customisation through hooks.
Very few values are hardcoded and values that aren't can be configured (Those that aren't can be found in the entity files themselves, however I can't guarantee the quality of the system staying the same if you modify any file but the config.lua) through the config.lua file included (located in team-gates/lua/entities/ent_ryn_team_gate/).
Further configuration of the gates can be done on a gate-by-gate basis by pressing E on a gate (if you're the one who spawned it, or if you're an admin pressing E on a non-personal team gate).
The gates are respawned after cleanup, map change and server restart, however, the gates are only saved to one map (e.g. spawning a gate on gm_construct wont spawn the same gate if you change to gm_flatgrass).

The gates can be bypassed using weapons (this can be disabled in the config.lua file), currently there's two weapons with two different goals.
One intended for admin use (can only be spawned by admins, but in e.g. DarkRP can be given with a job) that allows any player that has the swep equipped to bypass any gate (depending on the server configurations).
One with a keypad-cracker style to it, after X seconds (4 by default) of attempting to bypass (left clicking on a gate), the player can pass through that gate, for y seconds (default 2).

Do note that the menu uses the default Garry's Mod derma skin (or DarkRP if it's used on a DarkRP server and the configuration isn't set to do otherwise) and every player can change the derma skin that they want their panel to use to any loaded derma skin.

Guide

  • Extensive configuration is available through a lua file, either download the addon from the git repository[github.com] or extract the workshop addon
  • As the system allows quite extensive configuration, make sure you check the config.lua file to see if there's something you want to change before using the gates.
  • After installation the team gate can be spawned in three different ways
    • Through the entities tab in the Q menu, in the "Rynoxx" category click on the "Team Gate" entity.
    • Through a toolgun
    • Through a console command: rynteamgate_spawn
  • After you've spawned a Team Gate you can configure it by pressing the interact/use key (Default E) on it
    • Team gates are automatically saved and will respawn after cleanup, map change and server restart
    • All team gates are saved on a per-map basis (e.g. spawning a gate on gm_construct wont spawn the same gate on gm_flatgrass after a map change)

Use Cases
  • Creating a vehicle-free zone
  • Creating zones for certain teams
    • Could be used as spawn areas
    • Some kind of gang zone
  • Creating an admin room/area
  • NPC safe zone (on e.g. a zombie map)
  • Creating combine fences (e.g. for HL2RP) (comes with the option to automatically put combine fences on gates)

Credits

Source Code
The source code is available on GitHub[github.com] and is released under the GNU Affero General Public License v3 (AGPL-3.0)[github.com]
This is a public release of a script I previously published on ScriptFodder

Bug reporting/Suggestions
Any bugs/errors/suggestions should be posted on GitHub[github.com], I will not be looking at the workshop comments often.
26 Comments
jojomanovavidea 16 Jan @ 10:17am 
its creating lua errors
SeraFim 13 Dec, 2023 @ 8:32am 
Who has faced the problem that it does not work?
Rynoxx  [author] 4 Jun, 2023 @ 2:40pm 
If it uses the standard team function in GMod, yes
unlikeaboss 4 Jun, 2023 @ 2:15pm 
hey is this compatible with sandbox team manager
Notispadiko 21 Jul, 2022 @ 2:01am 
it works thanks for the answer btw
Rynoxx  [author] 21 Jul, 2022 @ 12:09am 
If it uses the regular team function in GMod, yes, otherwise I don't know.
Notispadiko 20 Jul, 2022 @ 4:50pm 
does it works with team manager addon ?
Rynoxx  [author] 25 Jan, 2022 @ 1:55pm 
@notispadiko Yes, it should work with DarkRP jobs, at least it did when it was first created.
No clue if the way DarkRP jobs work have changed since then.
Notispadiko 25 Jan, 2022 @ 12:50pm 
can i use it with dark rp jobs
??