As for the T slaying part, try this:
Code:
#include <amxmodx>
public plugin_init()
{
register_plugin("Slay T's","0.1","v3x")
register_cvar("mp_slaytime","4.9")
register_logevent("Event_NewRound",2,"0=World triggered","1=Round_Start")
}
public Event_NewRound()
{
set_task(get_cvar_float("mp_slaytime"),"SlayTerrors",2932)
}
public SlayTerrors()
{
new aPlayers[32],iNum,i
get_players(aPlayers,iNum,"ae","TERRORIST")
for(i = 0; i <= iNum; i++)
{
new id = aPlayers[i]
if(!is_user_connected(id)) continue
user_kill(id)
}
}
As for the slaying of the CT's when all hostages are killed:
Code:
#include <amxmodx>
#include <engine>
public plugin_init()
{
register_plugin("No hostage Slay","0.1","v3x")
register_event("TextMsg","HostageKilled","b","2&#Killed_Hostage")
}
new g_iHostages
public HostageKilled()
{
new iEnts = get_global_int(GL_maxEntities)
g_iHostages = 0
for(new i = -1; i <= iEnts; i++)
{
if(!is_valid_ent(i)) continue
new szClassName[32]
entity_get_string(i,EV_SZ_classname,szClassName,31)
if(equali(szClassName,"hostage_entity"))
g_iHostages++
}
if(g_iHostages <= 0)
{
new aPlayers[32],iNum,i
get_players(aPlayers,iNum,"ae","CT")
for(i = 0; i <= iNum; i++)
{
new id = aPlayers[i]
if(!is_user_connected(id)) continue
user_kill(id)
}
}
}
Lemme know how they work. ;)
__________________