Raised This Month: $ Target: $400
 0% 

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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 #10

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
 



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 04:32.


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