|
发表于 2010-9-1 23:46:32
|
显示全部楼层
|阅读模式
来自 中国–广西–百色–右江区
开这个插件就不要开血腥插件了...CS1.6........
每局开始T和CT各自动找出死亡最多的玩家给他隐身,
打死隐身的人被封IP10分钟.
#include <amxmodx>
#include <cstrike>
#include <fun>
new t_invis[33]
new ct_invis[33]
public plugin_init(){
register_plugin("Invisible","0.1","A.MI")
register_logevent("newRound", 2, "0=World triggered", "1=Round_Start")
register_event("SendAudio","end_round","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
register_event("DeathMsg","HUD_death","a")
server_cmd("mp_playerid 1");
return PLUGIN_CONTINUE
}
public client_connect(id){
t_invis[id] = 0
ct_invis[id] = 0
return PLUGIN_CONTINUE
}
public client_disconnect(id){
if( t_invis[id] ){
t_invis[id] = 0
}
if( ct_invis[id] ){
ct_invis[id] = 0
}
return PLUGIN_CONTINUE
}
public end_round(){
new pp_players = get_maxplayers()
for(new i=0; i<= pp_players; ++i){
if( is_user_connected(i)&& t_invis ){
t_invis = 0
set_user_rendering(i,kRenderFxNone,0,0,0,kRenderTransAlpha,255)
}
if( is_user_connected(i)&& ct_invis ){
ct_invis = 0
set_user_rendering(i,kRenderFxNone,0,0,0,kRenderTransAlpha,255)
}
}
}
public newRound(){
set_task(5.0,"giveccc");
return PLUGIN_CONTINUE
}
public giveccc(){
new thewho = 0, ifrag, nub8 = 0
new maxppl = get_maxplayers()
for(new i=0; i<= maxppl; ++i){
if( is_user_alive(i)&& get_user_team(i)==2 ){
ifrag = get_user_deaths(i)
if( ifrag > nub8 ){
nub8 = ifrag
thewho = i
}
}
}
if( thewho ){
ct_invis[thewho] = 1
set_user_rendering(thewho,kRenderFxNone,0,0,0,kRenderTransAlpha,0)
}
set_task(1.0,"givettt")
return PLUGIN_CONTINUE
}
public givettt(){
new it = 0, mfrag, nub8 = 0
new maxppl = get_maxplayers()
for(new i=0; i<= maxppl; ++i){
if( is_user_alive(i)&& get_user_team(i)==1 ){
mfrag = get_user_deaths(i)
if( mfrag > nub8 ){
nub8 = mfrag
it = i
}
}
}
if( it ){
t_invis[it] = 1
set_user_rendering(it,kRenderFxNone,0,0,0,kRenderTransAlpha,0)
}
return PLUGIN_CONTINUE
}
public HUD_death(){
new killer = read_data(1)
new victim = read_data(2)
new sWeapon[32]
read_data(4,sWeapon,31)
if( is_user_connected(victim)&& t_invis[victim] ){
t_invis[victim] = 0
set_user_rendering(victim,kRenderFxNone,0,0,0,kRenderTransAlpha,255)
if( equal(sWeapon,"c4") || equal(sWeapon,"hegrenade") ) return PLUGIN_HANDLED
if( is_user_connected(killer) ){
new ipStr[16]
get_user_ip(killer, ipStr, 15, 1)
server_cmd("addip %.2f %s;wait;writeip", 10.0, ipStr) // 封 IP 10分钟 //
}
}
if( is_user_connected(victim)&& ct_invis[victim] ){
ct_invis[victim] = 0
set_user_rendering(victim,kRenderFxNone,0,0,0,kRenderTransAlpha,255)
if( equal(sWeapon,"c4") || equal(sWeapon,"hegrenade") ) return PLUGIN_HANDLED
if( is_user_connected(killer) ){
new ipStr[16]
get_user_ip(killer, ipStr, 15, 1)
server_cmd("addip %.2f %s;wait;writeip", 10.0, ipStr) // 封 IP 10分钟 //
}
}
return PLUGIN_CONTINUE
} |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|