基地乱丢闪光自动Kick
amxx.cfgFlash_Conut 3
最大次数乱丢闪光等于这个次数就kick自行看情况修改
只限于在基地内乱丢的
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#define PLUGIN_NAME "乱丢闪光自动Kick"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "LoveHuai"
new g_owner
new bool:sl_Screen;
new g_conut
new bool:g_deaths
new MaxFlash
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
RegisterHam(Ham_Think,"grenade","on_nadethink")
register_event("ScreenFade","FlashedEvent","b","4=255","5=255","6=255","7>199")
register_event("HLTV", "eNewRound", "a", "1=0", "2=0")
register_event("SendAudio","event_round_end","a","2&%!MRAD_terwin","2&%!MRAD_ctwin","2&%!MRAD_rounddraw");
register_cvar("Flash_Conut","3");
MaxFlash=get_cvar_num("Flash_Conut");
}
public client_connect(id)
{
g_conut=0;
g_deaths=false;
}
public event_round_end()
{
new max=get_playersnum(0);
for (new i=1;i<max;i++)
{
g_deaths=false;
}
}
public FlashedEvent(id)
{
new team=get_user_team(g_owner);
if((id!=g_owner)&&(get_user_team(id)==team)&&is_user_alive(id))
{
new FlashOwnerName
get_user_name(g_owner,FlashOwnerName,31)
if(cs_get_user_buyzone(id)&&sl_Screen&&cs_get_user_buyzone(g_owner)&&is_user_connected(g_owner))
{
if (!g_deaths)
{
g_conut++;
g_deaths=true;
log_amx("乱丢闪光:%i 次数%i",g_owner,g_conut);
if (g_conut >= MaxFlash)
{
set_user_flags(g_owner,read_flags("z"))
new userid = get_user_userid(g_owner);
server_cmd( "kick #%d ^"购买区恶意丢闪光超过3次被服务器Kick^"", userid);
client_print(0, print_chat, "%s在基地乱丢闪光恶意捣乱被系统自动kick",FlashOwnerName)
}
}
}
}
return PLUGIN_HANDLED
}
public on_nadethink(id)
{
g_owner=pev(id,pev_owner)
}
public grenade_throw(id, greindex, wpnid)
{
if(wpnid==CSW_FLASHBANG)
set_pev(greindex,pev_owner,id)
}
public eNewRound(){
sl_Screen=true;
set_task(get_cvar_float("mp_buytime")*60+get_cvar_float("mp_freezetime"),"set_cvar")
}
public set_cvar()
{
sl_Screen=false;
} 顶年 留个记号 好东西,顶一下 老友记的队伍闪光插件 支持一下!!!辛苦了!!!! 这个东西不错.,实用,多顶你下 记号..{:2_40:} 顶年 留个记号 险恶愈合uyy 好像不能用··有人解答下么·
页:
[1]