PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define VERSION "0.0.1"
#define PLUGIN "bla bla"
new mp_roundtime, mp_roundtime_addition, mp_start_t_health_addition
new Float:g_flTeStartHealth
public plugin_init()
{
register_plugin(PLUGIN, VERSION, "ConnorMcLeod")
mp_roundtime = get_cvar_pointer("mp_roundtime")
mp_roundtime_addition = register_cvar("mp_roundtime_per_ct_add", "0.75")
mp_start_t_health_addition = register_cvar("mp_start te_health_per_ct_add", "50")
RegisterHam(Ham_Spawn, "player", "CBasePlayer_Spawn_Post", true)
register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0")
}
public CBasePlayer_Spawn_Post( id )
{
if( is_user_alive(id) && get_pdata_int(id,114) == 1 )
{
set_pev(id, pev_health, g_flTeStartHealth)
set_pev(id, pev_max_health, g_flTeStartHealth)
}
}
public Event_HLTV_New_Round()
{
new players[32], num, id, ctnum
get_players(players, num, "h")
for(new i; i<num; i++)
{
id = players[i]
if( get_pdata_int(id, 114) == 2 && get_pdata_int(id, 205) != 3 )
{
++ctnum
}
}
set_pcvar_float(mp_roundtime, 1.0 + ctnum * get_pcvar_float(mp_roundtime_addition))
g_flTeStartHealth = 100.0 + ctnum * get_pcvar_num(mp_start_t_health_addition)
}
__________________