Raised This Month: $12 Target: $400
 3% 

[CSGO]Force mp_autoteambalance 0


Post New Thread Reply   
 
Thread Tools Display Modes
Author
thenumb3rguy
Senior Member
Join Date: Oct 2012
Location: Hong Kong
Plugin ID:
3372
Plugin Version:
Plugin Category:
Server Management
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    A simple plugin that forces mp_autoteambalance to be 0
    Unapprover:
    Reason for Unapproving:
    Very simple, working around a specific issue that was resolved.
    Old 11-18-2012 , 08:09   [CSGO]Force mp_autoteambalance 0
    Reply With Quote #1

    This is my first attempt of creating a plugin, this fixes a problem on my server that server.cfg won't override mp_autoteambalance. Easy n simple.


    Changelog
    Code:
    1.0 18/11/2012 First Release
    1.1 18/11/2012 Updated for optimizing (thanks to Zephyrus)
    Attached Files
    File Type: sp Get Plugin or Get Source (teambalance.sp - 1037 views - 425 Bytes)
    File Type: smx teambalance.smx (1.9 KB, 497 views)

    Last edited by thenumb3rguy; 12-29-2012 at 13:21.
    thenumb3rguy is offline
    Zephyrus
    Cool Pig B)
    Join Date: Jun 2010
    Location: Hungary
    Old 11-18-2012 , 09:33   Re: [CSGO]Force mp_autoteambalance 0
    Reply With Quote #2

    PHP Code:
    #include <sourcemod>

    public Plugin:myinfo 
    {
            
    name "Team balance fix",
            
    author "Hours Played, Inc.",
            
    description "Fix for uneven teams",
            
    version "1.0"
    };

    public 
    OnPluginStart()
    {
        
    HookConVarChange(FindConVar("mp_autoteambalance"), Changed)
    }

    public 
    Changed(Handle:cvar, const String:oldValue[], const String:newValue[])
    {
         
    SetConVarInt(cvar0);

    __________________
    Taking private C++/PHP/SourcePawn requests, PM me.
    Zephyrus is offline
    thenumb3rguy
    Senior Member
    Join Date: Oct 2012
    Location: Hong Kong
    Old 11-18-2012 , 10:00   Re: [CSGO]Force mp_autoteambalance 0
    Reply With Quote #3

    Quote:
    Originally Posted by Zephyrus View Post
    PHP Code:
    #include <sourcemod>
     
    public Plugin:myinfo 
    {
            
    name "Team balance fix",
            
    author "Hours Played, Inc.",
            
    description "Fix for uneven teams",
            
    version "1.0"
    };
     
    public 
    OnPluginStart()
    {
        
    HookConVarChange(FindConVar("mp_autoteambalance"), Changed)
    }
     
    public 
    Changed(Handle:cvar, const String:oldValue[], const String:newValue[])
    {
         
    SetConVarInt(cvar0);

    Thanks, I have updateded it with your code.
    thenumb3rguy is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 11-20-2012 , 10:23   Re: [CSGO]Force mp_autoteambalance 0
    Reply With Quote #4

    Isn't mp_autoteambalance controlled by gamemodes_server.txt like the majority of cvars in CS:GO?
    __________________
    Not currently working on SourceMod plugin development.
    Powerlord is offline
    thenumb3rguy
    Senior Member
    Join Date: Oct 2012
    Location: Hong Kong
    Old 11-20-2012 , 20:47   Re: [CSGO]Force mp_autoteambalance 0
    Reply With Quote #5

    I dont think so. I have tried putting mp_autoteambalance 0 in server.cfg, it wont work.
    thenumb3rguy is offline
    winniethepooh
    SourceMod Donor
    Join Date: Sep 2012
    Old 11-22-2012 , 20:16   Re: [CSGO]Force mp_autoteambalance 0
    Reply With Quote #6

    You shouldn't need a plugin for this.

    Values in the server.cfg can be overwritten by gamemodes_XXXXX.cfg where XXXXXX is your gametype.


    gamemodes_XXXXX.cfg gets overwritten on update so use gamemodes_XXXXX_server.cfg to override values there.

    Last edited by winniethepooh; 11-23-2012 at 15:05.
    winniethepooh is offline
    thenumb3rguy
    Senior Member
    Join Date: Oct 2012
    Location: Hong Kong
    Old 11-24-2012 , 22:25   Re: [CSGO]Force mp_autoteambalance 0
    Reply With Quote #7

    didnt work for me though
    thenumb3rguy is offline
    TnTSCS
    AlliedModders Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 11-25-2012 , 03:20   Re: [CSGO]Force mp_autoteambalance 0
    Reply With Quote #8

    this might be a good work around but if it is a locked cvar and won't remain set to what you want when put in the config file specified in gamemode_server.txt (don't put it in server.cfg btw) then you should file a bug report to have the cvar addressed
    __________________
    View my Plugins | Donate
    TnTSCS is offline
    xLiaMz
    Member
    Join Date: Sep 2012
    Old 12-28-2012 , 08:04   Re: [CSGO]Force mp_autoteambalance 0
    Reply With Quote #9

    Quote:
    Originally Posted by TnTSCS View Post
    this might be a good work around but if it is a locked cvar and won't remain set to what you want when put in the config file specified in gamemode_server.txt (don't put it in server.cfg btw) then you should file a bug report to have the cvar addressed
    How would it look in gamemode_server.txt ? because atm its all spaced out?

    Edit - At the moment this plugin doesn't work for me.

    Last edited by xLiaMz; 12-28-2012 at 08:05.
    xLiaMz is offline
    TnTSCS
    AlliedModders Donor
    Join Date: Oct 2010
    Location: Undisclosed...
    Old 12-28-2012 , 12:05   Re: [CSGO]Force mp_autoteambalance 0
    Reply With Quote #10

    since this plugin was posted, a small change was made to gamemode_server.txt where in that file it references a config file it will execute... You should put the CVar in that config file for it to execute...

    example
    __________________
    View my Plugins | Donate
    TnTSCS 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 09:26.


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