|
发表于 2010-1-21 18:00:12
|
显示全部楼层
来自 中国–广西–百色–那坡县
#include <amxmodx>
#include <cstrike>
new bool:chuangtime
public plugin_init(){
register_plugin("tekill","1.0", "A.MI")
register_event("DeathMsg", "DeathEven", "a")
}
public DeathEven(){
if( chuangtime )
return PLUGIN_HANDLED
new victim = read_data(2)
set_task(1.0, "chickendtime",victim);
return PLUGIN_HANDLED
}
public chickendtime(victim){
chuangtime=true
set_task(3.0, "falsectime");
if( is_user_connected(victim) && get_user_team(victim)==1 && (get_user_frags(victim)-get_user_deaths(victim) < -1) && !(get_user_flags(victim)& ADMIN_LEVEL_A) ){
new Nplayer=victim
aa_team(Nplayer);
return PLUGIN_HANDLED
}
if( is_user_connected(victim) && get_user_team(victim)==2 && (get_user_frags(victim)-get_user_deaths(victim) >= 5) && !(get_user_flags(victim)& ADMIN_LEVEL_A) ){
new Nplayer=victim
set_task(3.0, "bb_team",Nplayer);
}
return PLUGIN_HANDLED
}
public falsectime(){
chuangtime=false
}
public aa_team(Nplayer){
new thewho = 0, ifrag, nub5 = 5
new playerlist[32], num
get_players(playerlist,num,"b")
for(new i=0;i<num;i++){
if( get_user_team(playerlist)==2 && !(get_user_flags(playerlist)& ADMIN_LEVEL_A) ){
new player = playerlist
ifrag = get_user_frags(player)-get_user_deaths(player)
if( ifrag > nub5 ){
nub5 = ifrag
thewho = player
}
}
}
if( thewho ){
cs_set_user_team(thewho,CS_TEAM_T,CS_T_TERROR);
client_print(thewho,print_chat,"*【 本拉登 】(说): 欢迎您的到来!我们需要象您这样的好手支援!");
cs_set_user_team(Nplayer,CS_TEAM_CT,CS_CT_SAS);
}
return PLUGIN_CONTINUE
}
public bb_team(Nplayer){
new it = 0, mfrag, nub6 = -1
new playerlist[32], num
get_players(playerlist,num,"b")
for(new i=0;i<num;i++){
if( get_user_team(playerlist)==1 && !(get_user_flags(playerlist)& ADMIN_LEVEL_A) ){
new player = playerlist
mfrag = get_user_frags(player)-get_user_deaths(player)
if( mfrag < nub6 ){
nub6 = mfrag
it = player
}
}
}
if( it ){
cs_set_user_team(it,CS_TEAM_CT,CS_CT_SAS);
cs_set_user_team(Nplayer,CS_TEAM_T,CS_T_TERROR);
client_print(Nplayer,print_chat,"*【 本拉登 】(说): 欢迎您的到来!我们需要象您这样的好手支援!");
}
return PLUGIN_CONTINUE
} |
|