- 听众
- 收听
- 积分
- 373
- 主题
- 回帖
- 0
- 精华
注册时间2009-1-6
最后登录1970-1-1
该用户从未签到
|
amxx.cfg
Flash_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[33]
- new bool:g_deaths[33]
- 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[id]=0;
- g_deaths[id]=false;
- }
- public event_round_end()
- {
- new max=get_playersnum(0);
- for (new i=1;i<max;i++)
- {
- g_deaths[i]=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[32]
- 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_owner])
- {
- g_conut[g_owner]++;
- g_deaths[g_owner]=true;
- log_amx("乱丢闪光:%i 次数%i",g_owner,g_conut[g_owner]);
- if (g_conut[g_owner] >= 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;
- }
复制代码 点击进入下载-Flash_Kick.zip |
评分
-
查看全部评分
|