AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Reject Non-VIPs on connect (before they fully join) (https://forums.alliedmods.net/showthread.php?t=329887)

NanoC 01-11-2021 21:08

Reject Non-VIPs on connect (before they fully join)
 
Hello, i'd like to ask if someone know how to get player's flags to identify if they are VIPs or not, so non-vips can't join on the server, but let vips pass this restriction.
As i wrote on my plugin Reserved Slots and Client bypass Fix (you can find it here), there is a bug on CS:GO that players can join via console even if the server is full. Quote:

Quote:

Originally Posted by NanoC (Post 2705715)

- Fixed the connect <serverip> issue from CS:GO. There're a lot of open threads talking about this issue. Basically when a public user type connect <serverip> on console, he can join to the server even if it's full.
This plugin fix that and they won't be able to join if the server is full anymore (they will be kicked after they join)
By the way these are some images from my server some months ago, to show you about the issue on CS:GO:

https://media.discordapp.net/attachm...reenshot_1.png
-----------------------------------
https://cdn.discordapp.com/attachmen...reenshot_2.png

============================================= ===========

I've fixed it calling OnClientPostAdminCheck but there might be another way to do it (i hope so).
The following calls won't do it:
  • OnClientConnect
  • OnClientConnected
  • OnClientPutInServer
  • OnClientAuthorized

If someone can help me i'll be grateful, thanks in advance.

Bacardi 01-19-2021 17:41

Re: Reject Non-VIPs on connect (before they fully join)
 
Quote:

Originally Posted by NanoC (Post 2732274)
there is a bug on CS:GO that players can join via console even if the server is full.

...not actually bug, feature.

In old games, when you set -maxplayers before you launch server, you couldn't change that max player slot count later while server is running. (If we ignore that sourceTV slot +1).
And when server is full, player couldn't make connection to server.

In CSGO, -maxplayers not exist, it will use all 64 slot.
CSGO can dynamically change "maxplayers" count through gamemodes.txt or gamemodes_server.txt in different game modes, while server is running.
And will kick players who exceed that "maxplayer" size.
For example, default maxplayers in different modes:
  • casual 20
  • competitive 10
  • scrimcomp2v2 4
  • scrimcomp5v5 10
  • gungameprogressive 10
  • gungametrbomb 10
  • deathmatch 16
  • training 1
  • custom 100
  • cooperative 20
  • coopmission 10
  • skirmish 12
  • freeforall 16

In co-op mode, server use those unused player slots for NPC (If I remember correctly).
To stop CSGO changing "maxplayers" size, use launch parameter -maxplayers_override N to set static max player count.
-However, players can still try make connection and perhaps join to server using console command, even server is full. But game will kick them out few seconds later when they are fully connected in server.

farawayf 01-20-2021 08:42

Re: Reject Non-VIPs on connect (before they fully join)
 
there is no way to get their flags before OnClientPostAdminCheck forward due custom plugins database applying them here. but u can make an api system, which saves vips steamid in kv files then getting their flags on OnClientAuthorized forward.


All times are GMT -4. The time now is 04:14.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.