Garry's Mod

Garry's Mod

146 ratings
Only Allow Friends
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Tool
File Size
Posted
Updated
4.393 KB
12 Oct, 2015 @ 8:14pm
2 Jul, 2016 @ 7:12pm
8 Change Notes ( view )

Subscribe to download
Only Allow Friends

In 1 collection by Cédric GÉRILLE [GiletJaune]
MR: Serveur Garry's Mod Jeu en 2D
11 items
Description
Allow your friends only to connect! See in Workshop for instructions.

Introduction
This addon has been written so you can allow your friends only to connect to your game or to your server, with no required password. It simply acts as a filter.

[curse.com]

Instructions
This addon needs to be configured in order to work.
Type !oaf in chat, a menu will appear. Complete fields and follow instructions.
You must be the owner (on non-dedicated) or a superadmin (on dedicated) to see the menu.
Please note that it does not work identically on a non-dedicated game and on a dedicated server.
If you want to have no password anymore then it is up to you: remove any sv_password parameter after configuring this addon and restart your server.

Requirements
- Your friend list must have its visibility set to public.
- Of course, your router and your firewall(s) must be configured in order to allow incoming connections to the UDP port 27015 or to the hl2.exe from Garry's Mod. If you have chosen another port then use the right port number. The usual message in case of a wrong firewall / router configuration is
Connection failed after 4 retries.

Default behavior
If not configured:
- Non-dedicated: it will reject every new connection except the owner.
- Dedicated: it will allow everyone so at least someone can connect.
If errors with the friend list (or bad configuration):
- In most cases everyone should be rejected except the owner.

Behavior on error
This addon needs to contact the Steam API every time a user tries to join. However there is a 60-second cache to prevent contacting the Steam API too often.
If this addon fails to contact the Steam API, if your friend list is not public or if you put bad configuration information, then an error will happen.
If the Steam API could not be successfully contacted at least once after the last map change then only the owner will be allowed.
Please do not blame me if the Steam API fails as I simply can do nothing about it!

How to prevent my game from being listed?
There are 3 possibilities to avoid listing:
Best solution (dedicated only): Modify your firewall settings to prevent Garry's Mod from contacting Steam servers by blocking outgoing packets with the source port UDP 26901. I recommend blocking a few next ports (26902, 26903, etc) as well. If the port 26901 is already used (more than 1 running Source game), this port will be set to the next available port (26902, 26903, etc). If you get VAC errors, tell me.
Bad solution: Disable the master requests (command line option -nomaster): your server will not respond, but people can join using the connect console command. It may not be what you want and I guess that your server will still be listed by Steam even though it does not appear with usual software.
Very bad solution: Set your game to LAN only (convar sv_lan set to 1 or command line option +sv_lan 1). It is probably not what you want.
67 Comments
gornon freidman 31 Jan, 2023 @ 3:43pm 
very outdated addon now that we have friends only
404_coffee.exe 20 Nov, 2022 @ 7:36pm 
but peer to peer is nerd talk and I do not know how to speak nerd.
Yummer 9 May, 2020 @ 11:25am 
you can just make your game peer to peer friends only
69ArmyBug 20 Oct, 2019 @ 8:13am 
can you make a ttt version of this
crabbyease 11 May, 2019 @ 12:01am 
bruh make a Allow some other players to connect thing
Leausi 10 Apr, 2019 @ 6:05pm 
I didn't know that anybody could join a server that I host, I thought that friends were the only ones who could
IM A FOKEN LEGEND 20 Apr, 2017 @ 11:48pm 
Allow RSA
(UNIT 32) Officer W Tony 11 Jul, 2016 @ 9:05am 
does it go on start new game?
Alarm 24 May, 2016 @ 6:37am 
сука вот ты придется удалять я не хочу чтобы frendly были combine неправильно вель дура
Chiεf Firmino™ 25 Jan, 2016 @ 4:43pm 
Does it work?