AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   [CSGO]Force mp_autoteambalance 0 (https://forums.alliedmods.net/showthread.php?t=201189)

thenumb3rguy 11-18-2012 08:09

[CSGO]Force mp_autoteambalance 0
 
2 Attachment(s)
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)


Zephyrus 11-18-2012 09:33

Re: [CSGO]Force mp_autoteambalance 0
 
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);



thenumb3rguy 11-18-2012 10:00

Re: [CSGO]Force mp_autoteambalance 0
 
Quote:

Originally Posted by Zephyrus (Post 1839892)
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.

Powerlord 11-20-2012 10:23

Re: [CSGO]Force mp_autoteambalance 0
 
Isn't mp_autoteambalance controlled by gamemodes_server.txt like the majority of cvars in CS:GO?

thenumb3rguy 11-20-2012 20:47

Re: [CSGO]Force mp_autoteambalance 0
 
I dont think so. I have tried putting mp_autoteambalance 0 in server.cfg, it wont work.

winniethepooh 11-22-2012 20:16

Re: [CSGO]Force mp_autoteambalance 0
 
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.

thenumb3rguy 11-24-2012 22:25

Re: [CSGO]Force mp_autoteambalance 0
 
didnt work for me though

TnTSCS 11-25-2012 03:20

Re: [CSGO]Force mp_autoteambalance 0
 
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

xLiaMz 12-28-2012 08:04

Re: [CSGO]Force mp_autoteambalance 0
 
Quote:

Originally Posted by TnTSCS (Post 1843315)
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.

TnTSCS 12-28-2012 12:05

Re: [CSGO]Force mp_autoteambalance 0
 
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


All times are GMT -4. The time now is 13:33.

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