This adds slot when hltv connects
i got some help in the forum
test for 1 week *works well*
just change the "11" to how many slots you need(with hltv) and "10" to how many slots with out HLTV
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "HLTV add Slot"
#define VERSION "1.0"
#define AUTHOR "usabrad86"
new g_pVisMaxPlayers
new g_pVisMaxPlayersP
new g_pVisMaxPlayersPD
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
g_pVisMaxPlayers = get_cvar_pointer("sv_visiblemaxplayers")
g_pVisMaxPlayersP = get_cvar_pointer("pug_maxplayers")
g_pVisMaxPlayersPD = get_cvar_pointer("pug_default_maxplayers")
}
public client_connect(id)
{
if( is_user_hltv(id) )
{
set_pcvar_num(g_pVisMaxPlayers, 11)
set_pcvar_num(g_pVisMaxPlayersP, 11)
set_pcvar_num(g_pVisMaxPlayersPD, 11)
}
}
public client_disconnect(id)
{
if( is_user_hltv(id) )
{
set_pcvar_num(g_pVisMaxPlayers, 10)
set_pcvar_num(g_pVisMaxPlayersP, 10)
set_pcvar_num(g_pVisMaxPlayersPD, 10)
}
}