Raised This Month: $168 Target: $400
 42% 

[CSGO] Client limiter


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Wilczek
AlliedModders Donor
Join Date: Oct 2012
Location: Poland
Plugin ID:
4650
Plugin Version:
0.6.1
Plugin Category:
Server Management
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 05-28-2015 , 18:45   [CSGO] Client limiter
    Reply With Quote #1

    Description:
    Client limiter is a simple plugin to deal with players connecting to a theoretically full server. It doesn't allow clients to connect beyond sv_visiblemaxplayers value, but of course it also supports reserved flags.

    Installation:
    Just put it in the /plugins folder and load.

    Reserved slots:
    By default this plugin assumes there are no reserved slots. If you want to change that behavior, use cvar sm_admin_slots to set hidden slots.

    Also, the plugin dynamically grants flags to clients based on the configs/admin_slots.txt file. It's handy when you want to give a reserved slot to a non-admin player, but SourceBans overwrite your config every day.

    Client limiter doesn't kick clients to make a room for a player with reserved slot access. If the server is completely full, then it's full.

    Changelog:
    HTML Code:
    v. 0.6.1
    - Bugfixes (thanks irepz and Foskitox)
    
    v. 0.6
    - Syntax updated to SM 1.7
    - renamed variables to better illustrate what data they hold
    - dropped dependency of sv_visiblemaxplayers
    - added an autocreation of admin_slots.txt file

    Known bugs:

    Clients with dynamically granted flags are treated like admins, therefore their actions aren't stored in a general log file (L20150529.log etc.), but new file admin_nickname_steamid.log is created. I really don't know how to fix that.
    Attached Files
    File Type: sp Get Plugin or Get Source (clientlimiter061.sp - 513 views - 3.7 KB)
    __________________

    Last edited by Wilczek; 12-08-2015 at 05:40. Reason: Update
    Wilczek is offline
    Ejziponken
    AlliedModders Donor
    Join Date: Apr 2008
    Old 05-28-2015 , 20:12   Re: [CSGO] Client limiter
    Reply With Quote #2

    Nice. Gonna try this tomorrow.
    __________________
    Ejziponken is offline
    asherkin
    SourceMod Developer
    Join Date: Aug 2009
    Location: OnGameFrame()
    Old 05-28-2015 , 20:47   Re: [CSGO] Client limiter
    Reply With Quote #3

    You possibly want to be using GetMaxHumanPlayers() rather than the value of sv_visiblemaxplayers.

    I've also removed the binary attachment since it compiles fine on the forum.
    __________________
    asherkin is offline
    0sama
    Junior Member
    Join Date: Oct 2011
    Location: Argentina
    Old 05-28-2015 , 22:04   Re: [CSGO] Client limiter
    Reply With Quote #4

    With this plugin i can have 1 hidden slots? like 24/24 and if 1 admin want to join to the server show's 25/24?

    Another question, how is the format of "configs/admin_slots.txt"? Can you give me a example, i don't know how is.

    Greetings.
    __________________



    __Web_

    Last edited by 0sama; 05-29-2015 at 16:30.
    0sama is offline
    nguyenbaodanh
    AlliedModders Donor
    Join Date: Jun 2007
    Location: HCMC, Vietnam
    Old 05-29-2015 , 03:29   Re: [CSGO] Client limiter
    Reply With Quote #5

    Quote:
    Originally Posted by 0sama View Post
    With this plugin i can have 1 hidden slots? like 24/24 and if 1 admin want to join to the server show's 24/25?

    Another question, how is the format of "configs/admin_slots.txt"? Can you give me a example, i don't know how is.

    Greetings.
    same question
    __________________
    nguyenbaodanh is offline
    Wilczek
    AlliedModders Donor
    Join Date: Oct 2012
    Location: Poland
    Old 05-29-2015 , 04:16   Re: [CSGO] Client limiter
    Reply With Quote #6

    Quote:
    Originally Posted by asherkin View Post
    You possibly want to be using GetMaxHumanPlayers() rather than the value of sv_visiblemaxplayers.
    I haven't tried using GetMaxHumanPlayers(), but there is a bug in CSGO that allows to connect more clients than theoretically possible. I've seen 27 players on my 22-slot server with no obvious reason. That's just a wild guess, but wouldn't it return MAXPLAYERS value in that case?

    Quote:
    Originally Posted by 0sama View Post
    With this plugin i can have 1 hidden slots? like 24/24 and if 1 admin want to join to the server show's 24/25?
    Sure - just set sm_admin_slots to 1. After an admin connects, it will show 25/24 in the server browser.

    Quote:
    Originally Posted by 0sama View Post
    Another question, how is the format of "configs/admin_slots.txt"? Can you give me a example, i don't know how is.
    It's just a simple file with SteamID list, and you can add commentaries.

    admin_slots.txt:
    Code:
    STEAM_1:0:1234567    // nickname1
    STEAM_1:1:1234567    // nickname2
    STEAM_1:0:1234569    // nickname3
    __________________
    Wilczek is offline
    asherkin
    SourceMod Developer
    Join Date: Aug 2009
    Location: OnGameFrame()
    Old 05-29-2015 , 06:00   Re: [CSGO] Client limiter
    Reply With Quote #7

    Quote:
    Originally Posted by Wilczek View Post
    I haven't tried using GetMaxHumanPlayers(), but there is a bug in CSGO that allows to connect more clients than theoretically possible. I've seen 27 players on my 22-slot server with no obvious reason. That's just a wild guess, but wouldn't it return MAXPLAYERS value in that case?
    No, CS:GO has a fixed MaxClients of 64, GetMaxHumanPlayers should return the correct configured count. If GetMaxHumanPlayers is also wrong in cases where it happens, that would actually hint at the source of the bug, but give it a shot!
    __________________
    asherkin is offline
    Ejziponken
    AlliedModders Donor
    Join Date: Apr 2008
    Old 05-29-2015 , 13:12   Re: [CSGO] Client limiter
    Reply With Quote #8

    L 05/29/2015 - 19:127: [SM] Native "IsEndOfFile" reported: invalid handle 0 (error: 4)
    L 05/29/2015 - 19:127: [SM] Displaying call stack trace for plugin "clientlimiter.smx":
    L 05/29/2015 - 19:127: [SM] [0] Line 113, /groups/sourcemod/upload_tmp/textSRczK4.sp::LoadSteamIDList()
    L 05/29/2015 - 19:127: [SM] [1] Line 25, /groups/sourcemod/upload_tmp/textSRczK4.sp::OnPluginStart()

    Edit: Nvm got that error when admin_slots.txt is missing.
    __________________

    Last edited by Ejziponken; 05-29-2015 at 13:14.
    Ejziponken is offline
    Ejziponken
    AlliedModders Donor
    Join Date: Apr 2008
    Old 05-31-2015 , 16:38   Re: [CSGO] Client limiter
    Reply With Quote #9

    Just to check if im correct..

    If I set
    sm_admin_slots 2
    sv_visiblemaxplayers 20

    There will be 2 hidden slots for admins? Do I need to change the actually amount of players in the server gamemodes_server.txt to 22? Or 20?
    __________________
    Ejziponken is offline
    Wilczek
    AlliedModders Donor
    Join Date: Oct 2012
    Location: Poland
    Old 05-31-2015 , 19:19   Re: [CSGO] Client limiter
    Reply With Quote #10

    Yes, there will be 2 hidden slots. Value of "maxplayers" parameter in gamemodes_server.cfg should represent the overall number of available slots - in your case it should be 22.
    __________________
    Wilczek is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 03:21.


    Powered by vBulletin®
    Copyright ©2000 - 2017, vBulletin Solutions, Inc.
    Theme made by Freecode