[CS:GO] How do you disable the bots?


Post New Thread Reply   
 
Thread Tools Display Modes
mattpker
Junior Member
Join Date: Aug 2012
Old 08-23-2012 , 12:28   Re: [CS:GO] How do you disable the bots?
Reply With Quote #11

Quote:
Originally Posted by Sylwester View Post
I had same problem on armsrace server and fixed it with this:
PHP Code:
#include <sourcemod>

public Plugin:myinfo = {
    
name "Bot Crash Prevention",
    
author "Sylwester",
    
description "prevents server from adding too many bots when players switch teams",
    
version "1.0"
}

new 
Handle:g_Cvar_bot_quota INVALID_HANDLE;
new 
g_bot_quota
new g_max_players

public OnConfigsExecuted(){
    
g_Cvar_bot_quota FindConVar("bot_quota");
    
g_bot_quota GetConVarInt(g_Cvar_bot_quota);
    
g_max_players GetMaxClients();
}

public 
OnClientPutInServer(client){
    if(!
IsFakeClient(client))
        return;
        
    if(
g_bot_quota GetConVarInt(g_Cvar_bot_quota))
        
SetConVarInt(g_Cvar_bot_quotag_bot_quota);
    
    new 
icount;
    for(
1i<=g_max_playersi++)
        if(
IsClientInGame(i) && GetClientTeam(i)>1)
            
count++;
            
    if(
count<g_bot_quota)
        return;
    
    new 
String:name[32]
    if(!
GetClientName(clientname31))
        return;
    
ServerCommand("bot_kick %s"name);

Thanks, but can I get some instructions on how I can use this script?
mattpker is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 08-23-2012 , 12:59   Re: [CS:GO] How do you disable the bots?
Reply With Quote #12

It's a sourcemod plugin. Compile it (for example using this) and then copy output file to .../csgo/addons/sourcemod/plugins/
__________________
Impossible is Nothing
Sylwester is offline
mattpker
Junior Member
Join Date: Aug 2012
Old 08-23-2012 , 13:19   Re: [CS:GO] How do you disable the bots?
Reply With Quote #13

Thank you very much! I will try it when I get home today.

I have also submitted a trouble ticket with Valve to see if this can get fixed.
mattpker is offline
mattpker
Junior Member
Join Date: Aug 2012
Old 08-23-2012 , 19:33   Re: [CS:GO] How do you disable the bots?
Reply With Quote #14

It works!!!! Thank you so much Sylwester!
mattpker is offline
Reply



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 06:16.


Powered by vBulletin®
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Theme made by Freecode Sponsored by Layered Technologies
Freecode