搜索
查看: 7911|回复: 19

试探反作弊的方法和插件

[复制链接]
发表于 2011-4-30 21:16:22 | 显示全部楼层 |阅读模式 来自 广西百色
本帖最后由 心静如水 于 2011-7-3 11:28 编辑

          作弊的常见形式                          插件解决                       误判问题
1.瞄头(第一枪经常暴头)     11.每打中人的第一枪都是头部即判为   12.不能有静止人物等被打靶
2.瞄胸(第一枪经常中胸)     21.每打中人的第一枪都是胸部即判为   22.不能有静止人物等被打靶3.瞄其它部位               经查:每枪杀伤力多为15HP不足为虑不需要加入插件
4.作弊无闪光                   41.用闪光检测事件判定               42.每个图连续三次闪光杀人封IP


以上12和22加上蹲坑30秒转为观察员能解决,11和21并在一起每杀一个人开第一枪就中头或胸部的连续杀4人即连续4次(中间打中其它部位或自己死后立即重新记数)判定其作弊,这个插件经过测试后很多作弊用007/高手作弊器/激光作弊/CDD作弊/暴力作弊器..................等等作弊杀几个人后都被封IP了,服务器安静了半个月时间.

一个月后,作弊者乖了,他每局只杀1-2人后自己就假装被人杀了(死后插件重新记录),这样他躲过了被检测不被封IP.你说可恶不可恶?

后面我只能又增加了花5000$可以发起投票封(这种)作弊功能,这样终于好了,
就是感觉都是事后处理不怎么理想而已了,

我本不希望此贴加分,只是希望大家互相学习互相借鉴看有没有更好的办法...

再说开SXE和不开SXE的游戏速度很有差别...........非网吧的玩家最不希望开SXE,因为动作慢所以很多玩家不想开SXE是一个原因吧,你看SXE任意的服里面多是NO-SXE者,但是大部分是不作弊的,所以希望有更多的不开SXE的反作弊方法

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
发表于 2011-5-4 11:07:24 | 显示全部楼层 来自 广东佛山
这个我收藏了
回复

使用道具 举报

发表于 2011-5-4 15:26:48 | 显示全部楼层 来自 天津
最有效的是在线OP观察
回复

使用道具 举报

 楼主| 发表于 2011-5-4 23:40:55 | 显示全部楼层 来自 广西百色
3# 小猫咪
现在没有那么多OP   24小时在线了,上传插件认为有用的就用吧,反正我用是很正常,很少有玩家说误封,几个平时和OP好的人原来用高手作弊器打分很高现在变得老实了...
回复

使用道具 举报

发表于 2011-5-4 23:47:32 | 显示全部楼层 来自 江苏无锡
这个要试试,在DT上好久没看到这样的好东西了,谢谢!
回复

使用道具 举报

发表于 2011-5-5 02:42:08 | 显示全部楼层 来自 台湾台北
來看一下
回复

使用道具 举报

发表于 2011-5-7 12:05:26 | 显示全部楼层 来自 天津
怎么不发个源码让大家一起分享一下,这样会有更多的人提出更好的建议
回复

使用道具 举报

发表于 2011-5-7 12:06:37 | 显示全部楼层 来自 天津

RE: 试探反作弊的方法和插件

怎么不发个源码让大家一起分享一下,这样会有更多的人提出更好的建议
回复

使用道具 举报

 楼主| 发表于 2011-5-7 23:34:12 | 显示全部楼层 来自 广西百色
本帖最后由 心静如水 于 2011-7-3 11:25 编辑

#include <amxmodx>
#include <cstrike>
#include <fun>

new g_oldangles[33][3]
new g_round

new g_TATimes[33]
new g_AWPTimes[33]

new bool:g_playerFlashed[33]
new g_playerFlashWarn[33]

new Float:holdTime

public plugin_init(){
        register_plugin("Xfanzuobi","1.0", "A.MI")
        register_event("TextMsg", "round_restart", "a", "2=#Game_Commencing", "2=#Game_will_restart_in")
        register_logevent("eRoundStart", 2, "0=World triggered", "1=Round_Start")
        register_event("ScreenFade", "eventFlash", "be","2>6000","4=255", "5=255", "6=255", "7=255")
       
        register_event("DeathMsg", "death_msg", "a")
       
        register_cvar("fc_beam_holdtime", "150")
}

public client_color( playerid, colorid, msg[]){
  message_begin( playerid?MSG_ONE:MSG_ALL, get_user_msgid("SayText"), {0,0,0}, playerid)
  write_byte(colorid)
  write_string(msg)
  message_end()
}

public client_connect(id){
        g_TATimes[id] = 0
        g_AWPTimes[id] = 0
        g_playerFlashed[id]=false
        g_playerFlashWarn[id]=0
        return PLUGIN_CONTINUE
}

public round_restart(){
        g_round = 0
        for(new i = 0; i <= get_maxplayers(); ++i){
                if( is_user_connected(i) ){
                                g_TATimes = 0
                                g_AWPTimes = 0
                }
        }
}

public eRoundStart(){
  new maxppl = get_maxplayers()
  for(new i = 1; i <= maxppl; ++i){
          if( is_user_alive(i) ){
                  client_cmd(i,"bind F12 quit");
                 
                  client_cmd(i,"bind MWHEELUP slot1");
                 
                  client_cmd(i,"bind MWHEELDOWN slot2");
                 
                  client_cmd(i,"bind INS disconnect");
          }
  }
  
  g_round++
  if( g_round>=3 ){
          set_task(5.0, "jiance");
  }
  return PLUGIN_CONTINUE
}

public jiance(){
        set_task(25.0, "checkPlayers");
       
        for(new i = 0; i <= get_maxplayers(); ++i){
                        if( is_user_alive(i) ){
                                new id = i
                                get_user_origin(id, g_oldangles[id])
                                client_print(id, print_chat, "*【注意】: 30 秒内不移动的,将被【处死】并转为观察员")
                        }
        }
        return PLUGIN_CONTINUE
}

public checkPlayers(){
                for(new i = 0; i <= get_maxplayers(); ++i){
                        if( is_user_alive(i) ){
                                new newangle[3]
                                get_user_origin(i, newangle)
                               
                                if( newangle[0] == g_oldangles[0] && newangle[1] == g_oldangles[1] && newangle[2] == g_oldangles[2] ){
                                        new Qid = i, name[32]
                                        get_user_name(Qid, name, 31)
                                        set_user_health( Qid, 0 );
                                       
                                        cs_set_user_team(Qid, CS_TEAM_SPECTATOR, CS_DONTCHANGE);
                                        client_print(0, print_chat, "*【公告】: 因为 %s 蹲坑超过 30 秒本服已把他转为观察员.", name)
                                }
                        }
                }
                return PLUGIN_CONTINUE
}

public client_damage(attacker, victim, damage, wpnindex, hitplace, TA){
    if( wpnindex == CSW_C4 || wpnindex == CSW_HEGRENADE )return PLUGIN_HANDLED
   
    if( is_user_connected(victim)&& ( hitplace == HIT_HEAD || hitplace == HIT_CHEST ) ){
                    if( wpnindex == CSW_AWP ){
                            g_AWPTimes[attacker]++
                           
                            if( g_AWPTimes[attacker]>2 ){
                                            g_AWPTimes[attacker]=0
                                            new ipStr[16]
                                            get_user_ip(attacker, ipStr, 15, 1)
                                            server_cmd("addip %.2f %s;wait;writeip", 10.0, ipStr)//封禁10分钟//
                            }
                    }
                    if( wpnindex != CSW_AWP ){
                            g_TATimes[attacker]++
                           
                            if( g_TATimes[attacker]>3 ){
                                            g_TATimes[attacker]=0
                                            new ipStr[16]
                                            get_user_ip(attacker, ipStr, 15, 1)
                                            server_cmd("addip %.2f %s;wait;writeip", 10.0, ipStr)//封禁10分钟//
                            }
                    }
    }
   
    else if( is_user_connected(victim)&& hitplace != HIT_HEAD && hitplace != HIT_CHEST ){
                    if( wpnindex == CSW_AWP ){
                                            g_AWPTimes[attacker]=0
                    }
                    if( wpnindex != CSW_AWP ){
                                            g_TATimes[attacker]=0
                    }
    }
           
    if( get_user_health(victim) < 0 ){
                                            set_task(2.0,"kills_false",victim);
    }
    return PLUGIN_HANDLED
}

public kills_false(victim){
        if( g_TATimes[victim] > 0 ){
                g_TATimes[victim]=0
        }
       
        if( g_AWPTimes[victim] > 0 ){
                g_AWPTimes[victim]=0
        }
        return PLUGIN_CONTINUE
}

public client_disconnect(id){
        g_playerFlashWarn[id]=0
        g_playerFlashed[id]=false
       
        if( g_TATimes[id] > 0 ){
                g_TATimes[id]=0
        }
        if( g_AWPTimes[id] > 0 ){
                g_AWPTimes[id]=0
        }
        return PLUGIN_CONTINUE
}

public eventFlash(id){
        read_data(2,holdTime)
        holdTime*=0.0002
        set_task(0.5,"startCheck",id)
}

public startCheck(id){
        g_playerFlashed[id]=true
        set_task(holdTime,"endCheck",id)
}

public endCheck(id){
        g_playerFlashed[id]=false
}

public death_msg(){
        new killer = read_data(1)
        new victim = read_data(2)

        if( killer==victim || read_data(5) )
                return PLUGIN_HANDLED

        new weapon[32]
        read_data(4, weapon, 31)
        if( equal(weapon,"c4") || equal(weapon,"grenade") )
                return PLUGIN_HANDLED

        if( g_playerFlashed[killer] ){
                g_playerFlashWarn[killer]++

                if( g_playerFlashWarn[killer]>=3 ){
                        new ipStr[16]
                        get_user_ip( killer, ipStr, 15, 1 )
                        server_cmd("addip %.2f %s;wait;writeip", 30.0, ipStr)
                        g_playerFlashWarn[killer]=0
                }
                g_playerFlashed[killer]=false
        }
        return PLUGIN_HANDLED
}
回复

使用道具 举报

发表于 2011-5-16 16:03:24 | 显示全部楼层 来自 北京
这个主要是混战用吧,这个要支持一下。
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表