Try this :
Code:
#include <amxmodx>
#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "Author"
new cvar_max_bots, cvar_bot_quota
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
cvar_max_bots = register_cvar("amx_botnubmer", "6")
cvar_bot_quota = get_cvar_pointer("bot_quota")
}
public client_connect(id)
if(!is_user_bot(id))
check_playernumber()
public client_disconnect(id)
if(!is_user_bot(id))
check_playernumber()
check_playernumber()
{
new players[32], inum, maxbots = get_pcvar_num(cvar_max_bots)
get_players(players, inum, "c")
if( inum < maxbots )
set_pcvar_num(cvar_bot_quota, maxbots - inum)
else
set_pcvar_num(cvar_bot_quota, 0)
}