View Single Post
usabrad86
Junior Member
Join Date: Jun 2009
Location: Florida
Old 07-02-2009 , 07:00   Re: [YAP] - Yet Another PUG
Reply With Quote #63

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(PLUGINVERSIONAUTHOR)
    
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_pVisMaxPlayers11)
    
set_pcvar_num(g_pVisMaxPlayersP11)
    
set_pcvar_num(g_pVisMaxPlayersPD11)
    
    }
}

public 
client_disconnect(id)
{
    if( 
is_user_hltv(id) )
    {
    
set_pcvar_num(g_pVisMaxPlayers10)
    
set_pcvar_num(g_pVisMaxPlayersP10)
    
set_pcvar_num(g_pVisMaxPlayersPD10)
    }

usabrad86 is offline
Send a message via AIM to usabrad86