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

[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
BadAim
Senior Member
Join Date: Feb 2006
Location: canada
Old 02-02-2013 , 17:39   Re: [CS:GO] How do you disable the bots?
Reply With Quote #15

Hey Sylwester,

Maybe you could help me too. I looking for a script to disable bots when few humans join.

Example:
If there is 1-3 humans in the server, set bot_quota to 10
If there is 4+ humans in the server, set bot_quota to 0

Maybe we could make 3 cvars.
bot_kickall_minquota "0" //Modify the bot_quota to this value when below bot_kickall_at value
bot_kickall_maxquota "10" //Modify the bot_quota to this value when over bot_kickall_at value
bot_kickall_at "4" //Number of humans needed before changing bot_quota value

I need some scripting skills right here

Thank you
BadAim is offline
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 02-04-2013 , 13:03   Re: [CS:GO] How do you disable the bots?
Reply With Quote #16

Ask here: http://forums.alliedmods.net/forumdisplay.php?f=60
__________________
Impossible is Nothing
Sylwester is offline
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 04-18-2015 , 00:39   Re: [CS:GO] How do you disable the bots?
Reply With Quote #17

Add -nobots to the server's command line parameters.
Buy my question is if there is a command such '-bots 1'? To enable BOTs?
__________________
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
Amroth
Senior Member
Join Date: Apr 2013
Location: /root
Old 04-20-2015 , 16:39   Re: [CS:GO] How do you disable the bots?
Reply With Quote #18

Quote:
Originally Posted by claudiuhks View Post
Add -nobots to the server's command line parameters.
Buy my question is if there is a command such '-bots 1'? To enable BOTs?
Remove -nobots to enable bots
Amroth is offline
wazer
Senior Member
Join Date: Oct 2011
Old 02-06-2017 , 04:15   Re: [CS:GO] How do you disable the bots?
Reply With Quote #19

Quote:
Originally Posted by Sylwester View Post
It's a sourcemod plugin. Compile it (for example using this) and then copy output file to .../csgo/addons/sourcemod/plugins/
Hey i know this is long time ago.

I tested this and compiled tho it says this error

L 02/06/2017 - 10:13:26: [SM] Exception reported: Invalid convar handle 0 (error 4)
L 02/06/2017 - 10:13:26: [SM] Blaming: kick_bots.smx
L 02/06/2017 - 10:13:26: [SM] Call stack trace:
L 02/06/2017 - 10:13:26: [SM] [0] GetConVarInt
L 02/06/2017 - 10:13:26: [SM] [1] Line 24, kick_bots.sp::OnClientPutInServer
wazer is offline
hamilton5
Veteran Member
Join Date: Oct 2012
Location: USA
Old 02-06-2017 , 07:52   Re: [CS:GO] How do you disable the bots?
Reply With Quote #20

Quote:
Originally Posted by wazer View Post
Hey i know this is long time ago.

I tested this and compiled tho it says this error

L 02/06/2017 - 10:13:26: [SM] Exception reported: Invalid convar handle 0 (error 4)
L 02/06/2017 - 10:13:26: [SM] Blaming: kick_bots.smx
L 02/06/2017 - 10:13:26: [SM] Call stack trace:
L 02/06/2017 - 10:13:26: [SM] [0] GetConVarInt
L 02/06/2017 - 10:13:26: [SM] [1] Line 24, kick_bots.sp::OnClientPutInServer

yes, a very long time ago, and very unrelated to OP you should make a new post in scripting about your problem. ensure you are compiling the whole script code. make sure to post the whole code when asking for help.
hamilton5 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 18:15.


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