83212216 发表于 2007-6-2 11:04:12

大家看看这是哪个插件

http://www.wolong-cs.com/wolong/dispbbs.asp?boardid=7&id=2184

感觉好方便的,不要去输入那么多命令,功能又多

landyhsu 发表于 2007-6-2 14:32:21

回复: 大家看看这是哪个插件

楼主所说的插件应该是惩罚作弊插件,地址如下:

娱乐型反作弊插件v1.9

83212216 发表于 2007-6-2 16:25:16

回复: 大家看看这是哪个插件

Post by landyhsu
楼主所说的插件应该是惩罚作弊插件,地址如下:

娱乐型反作弊插件v1.9


好像不是吧
娱乐型反作弊插件v1.9是用amx_pcheater_list

amx_pcheater <authid, nick, or #userid>
这些命令

而这个插件只要say :"menu"

不过还是谢谢了。

lu0007 发表于 2007-6-2 16:53:48

回复: 大家看看这是哪个插件

Post by 83212216
好像不是吧
娱乐型反作弊插件v1.9是用amx_pcheater_list

amx_pcheater <authid, nick, or #...

我现在用的也是要输入命令的,太麻烦了,有 这个菜单管理,那是要好多了!

landyhsu 发表于 2007-6-3 20:36:28

回复: 大家看看这是哪个插件

say: menu那是玩家菜单命令,服务器只是把amx_pcheater_list命令用:
"惩罚作弊者" "amx_pcheater_list"
方式写入了:.\cstrike\addons\amxmodx\configs\plmenu.ini 文件而已,这样你用say: menu就能出现图中所显示的功能了。

lu0007 发表于 2007-6-3 21:22:58

回复: 大家看看这是哪个插件

Post by landyhsu
say: menu那是玩家菜单命令,服务器只是把amx_pcheater_list命令用:
"惩罚作弊者" "amx_pcheater_list"
方式写入了:.\cstrike\addons\amxmodx\configs\plmenu.ini 文件而已,这样你用say: menu就能出现图中所显示的功能了。
/***********************************
惩罚作弊者娱乐插件.

管理员命令:

amx_pcheater <authid, nick, or #userid> <times>
例如:amx_pcheater #23 6    惩罚userid为23的玩家6局

amx_pcheater_stop    <在下一局停止所有的惩罚>

amx_tele <authid, nick, or #userid><teleport cheater to the round of random enemy>

amx_fly<authid, nick, or #userid>   <?round>

功能开关 <1 开 | 0 关>

amx_pcheater_enable 1 <打开或关闭惩罚插件>
<1 开 | 0 关>

amx_pcheater_bind 0 <修改作弊者的键盘设置开关,请慎重打开)>
<1 开 | 0 关>

amx_pcheater_kick 0<1 开 | 0 关>
<打开则玩家被惩罚次数超过MAXPUNISHTIMES设定值将被踢出>

amx_pcheater_vote_rate 0.6   <投票成功比例>

amx_pcheater_vote 1 <打开投票>

amx_pcheater_fly 1<解除作弊玩家的武装,并送他上天>

amx_pcheater_givemoney 5000<作弊玩家传送时,谁杀死他将获得的奖金金额>

amx_pcheater_takemoney 5000   <不参与投票将被扣除的金额>

amx_pcheater_vote_money5000   <每次发起投票所需要的金额,以防止乱投票>

================
客户端命令:

say /vote_cheater<客户端发起投票>


************************************/

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

//---------------------------vote--------------------------

#define KEY1 (1<<0)
#define KEY2 (1<<1)
#define KEY3 (1<<2)
#define KEY4 (1<<3)
#define KEY5 (1<<4)
#define KEY6 (1<<5)
#define KEY7 (1<<6)
#define KEY8 (1<<7)
#define KEY9 (1<<8)
#define KEY0 (1<<9)

#define MENUTIME 15   //menu display time
#define MAXVOTETIMES 1    //max time of vote every round
#define MAXPUNISHTIMES 2//max time of punish
#define MAXREVOTETIMES 1   //max time of revote

new page = { 1, ...}
new choices
new target
new bool:voting
new count_y
new count_n
new count_p
new revote
new votetimes
new bool:counted
new roundsay[]={"第一滴血","佛光谱照","血雨腥风","五雷轰顶","天外飞仙"}
//-----------------------------------------------------------

new bool:player_flag
new punish_count
new cheater_count=0
new ip_str
new ip
new oldname
new uid
new count
new newname
new ip_name
new roundcount=0
new punishtimes
new bool:teleportplayer
new bool:playerfly
new cheatername
new index
new players, num
new fly_count

public plugin_init()
{
   register_plugin("cheating punish","1.1", "Enigmaya")
   register_concmd("amx_pcheater", "admin_pcheater",ADMIN_LEVEL_A,"<authid, nick, or #userid> <? round>")
   register_concmd("amx_pcheater_stop","admin_stop",ADMIN_LEVEL_A,"stop all of the punish at next round")
   register_cvar("amx_pcheater_enable", "1")
   register_logevent("roundstart", 2, "0=World triggered", "1=Round_Start")
   register_cvar("amx_pcheater_bind", "1")
   register_cvar("amx_pcheater_kick","0")
   //----------------teleport--------------
   register_concmd("amx_tele","admin_tele",ADMIN_LEVEL_A,"<authid, nick, or #userid>")
   //---------------fly-------------------
   register_concmd("amx_fly","admin_fly",ADMIN_LEVEL_A,"<authid, nick, or #userid> <? round>")
   register_cvar("amx_pcheater_fly","1")
   //----------------deathmsg--------------
   register_event("DeathMsg", "hook_death", "a","1>0")
   register_cvar("amx_pcheater_givemoney","5000")
   //----------------vote------------------
   register_menucmd(register_menuid("Punish cheater?"), KEY7|KEY8|KEY9, "votecount")
   register_menucmd(register_menuid("who is cheater?"), KEY1|KEY2|KEY3|KEY4|KEY5|KEY6|KEY7|KEY8|KEY9|KEY0, "choosewho")
   register_clcmd("say /vote_cheater", "before_vote")
   register_cvar("amx_pcheater_vote", "1")
   register_cvar("amx_pcheater_takemoney","3000")
   register_cvar("amx_pcheater_vote_rate", "0.6")
   register_cvar("amx_pcheater_vote_money", "5000")      
}
   


//-----------------------------connect or disconnect----------------------------------------
public client_connect(id)
{
        if(!is_user_bot(id) && get_cvar_num("amx_pcheater_enable"))
        {
                get_user_ip ( id, ip_str, 15, 1 )
                uid=get_user_userid(id)
                    for (new i=0; i<32; i++)
                {
                        if( equali(ip,ip_str) )
                        {
                                set_hudmessage ( 200, 100, 0, 0.5, 0.8, 0, 0.02, 5.0, 0.01, 0.2, 2 )
                                get_user_info(id,"name",newname,31)
//                                show_hudmessage ( 0, "%s ( %s ) is coming again.newname is %s^" ",ip_name,ip_str,newname)
                                show_hudmessage ( 0, "玩家 %s ( %s ) 再次进入.新名字是 %s^" ",ip_name,ip_str,newname)
                               
                                player_flag=true
                                teleportplayer=false
                                punish_count=0
                                return PLUGIN_HANDLED
                        }
                }
                punishtimes=0
                teleportplayer=false
                playerfly=false
                player_flag=false
                fly_count=0
        }
        return PLUGIN_HANDLED
}


public client_disconnect(id)
{
        if(player_flag || playerfly)
        {
                get_user_ip ( id, ip_str, 15, 1 )
                copy(ip,15,ip_str)
                get_user_info(id,"name",oldname,31)
                copy(ip_name,32,oldname)
                --cheater_count
        }       
}

//----------------------admin enable or disable plugin------------------------------------

public admin_stop(id, level, cid)
{
   if ( !cmd_access(id, level, cid, 1) )
      return PLUGIN_HANDLED
       
   if( get_cvar_num("amx_pcheater_enable") )
   {
           get_players(players, num)
        for(new i=0;i<num;i++)
        {
                if( player_flag[ players ] )
                {
                        player_flag[ players ]=false
                        client_cmd(players,"name ^"%s^" ",cheatername[ players ] )
                }
                if( teleportplayer[ players ] )
                {
                        new origin
                        get_user_origin(players,origin)
                        origin+=50
                        set_user_origin(players,origin)
                        teleportplayer[ players ]=false
                        set_user_rendering(players, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
                        remove_task(56789,0)
                }
                if( playerfly[ players] )
                {
                        fly_count[ players ]=0
                        set_user_rendering(players, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
                        playerfly]=false
                }
        }
        //client_print(0,print_chat," All of the punish will stop at next round!")
        client_print(0,print_chat," 所有的惩罚将在下局停止!")
   }
   
   return PLUGIN_HANDLED
}

//----------------------------admin start punish----------------------------------------

public admin_pcheater(id, level, cid)
{
   if ( !cmd_access(id, level, cid, 3) )
      return PLUGIN_HANDLED
       
   new Arg1
   new Arg2
   read_argv(1, Arg1, 31)
   read_argv(2, Arg2, 3)
   
   count = str_to_num(Arg2)
   if(count<5)count=5
   
   new player = cmd_target(id, Arg1, 4)//4 - must be alive
   if (!player)
   {
           console_print(id, " Sorry, player %s could not be found or targetted!", Arg1)
      return PLUGIN_HANDLED
   }
   if( player_flag || teleportplayer || playerfly)
   {
        console_print(id, " Oh, player %s is being punished!", Arg1)
           return PLUGIN_HANDLED
   }

   punish(player)

   return PLUGIN_HANDLED
}

//----------------------------admin start teleport---------------------

public admin_tele(id, level, cid)
{
   if ( !cmd_access(id, level, cid, 2) )
      return PLUGIN_HANDLED

   new Arg1
   read_argv(1, Arg1, 31)
   new player = cmd_target(id, Arg1, 4)//4 - must be alive
   if( !check_team(player) )
   {
           console_print(id," there is no enemy alive")
        return PLUGIN_HANDLED
   }
   if( teleportplayer || player_flag || playerfly)
   {
           console_print(id," he is being punished")
        return PLUGIN_HANDLED
   }
   before_tele(player)
   
   return PLUGIN_HANDLED
}
//---------------------------admin start fly--------------------------------------------
public admin_fly(id, level, cid)
{
   if ( !cmd_access(id, level, cid, 3) )
      return PLUGIN_HANDLED

   new Arg1
   new Arg2
   read_argv(1, Arg1, 31)
   read_argv(2, Arg2, 3)
   new player = cmd_target(id, Arg1, 4)//4 - must be alive
   if( playerfly || player_flag || teleportplayer)
   {
           console_print(id," he is being punished")
        return PLUGIN_HANDLED
   }
   fly_count = str_to_num(Arg2)
   
   before_fly(player)
   return PLUGIN_HANDLED
}


//--------------------------round event-------------------------

public roundstart()
{
    votetimes=0
    set_task(2.0 , "roundDelay")
}

public roundDelay(taskId)
{
    if ( !get_cvar_num("amx_pcheater_enable") )
      return PLUGIN_HANDLED
   
    roundcount++
   
    if( !( roundcount%5 ) || roundcount==1)
    {
           //client_print(0,print_chat, " you can ^" say /vote_cheater ^" to start a vote to punish the cheater !" )
           client_print(0,print_chat, " 你可以输入 ^" say /vote_cheater ^" 发起一次投票来惩罚作弊者 !")
                //client_print(0,print_chat, " 发起投票需要 %i $ ",get_cvar_num("amx_pcheater_vote_money") )
    }
   
    get_players(players, num)
   
    for (new i=0; i<num+1; i++)
    {
            if( teleportplayer[ i ] )
            {
                set_user_rendering(i, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
                   new origin
                get_user_origin(i,origin)
                origin+=50
                set_user_origin(i,origin)
                    client_cmd(i, "bind ^"space^" ^"+jump^"")
                teleportplayer=false
                if( task_exists(56789,0) )
                        remove_task(56789,0)
        }
        if( playerfly && !--fly_count )
        {
                set_user_gravity(i, 1.00)
                playerfly=false
                set_user_rendering(i, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
           }           
            if(player_flag)
            {
                if(!punish_count)
                {
                        get_user_name(i,cheatername,32)
                        client_cmd(i, "name ^"Cheater #00%i^" ",++cheater_count)
                        //client_cmd(i, "say ^"I am a cheater ! Oh...sorry!^"")
                        client_cmd(i, "say ^"我在作弊 ! 啊...对不起!^"")
                        if( get_cvar_num("amx_pcheater_bind") ){
                          client_cmd(i, "bind ^"w^" ^"say 对不起^"")
                          client_cmd(i, "bind ^"s^" ^"say 对不起^"")
                          client_cmd(i, "bind ^"y^" ^"say 对不起^"")
                          client_cmd(i, "bind ^"mouse1^" ^"say 对不起^"")
                          client_cmd(i, "bind ^"q^" ^"say 对不起^"")
                          client_cmd(i, "bind ^"r^" ^"say 对不起^"")
                        }
                }
                if(punish_count<count)   
                {
                        if(punish_count+1==count)
                        {
                                set_hudmessage ( 200, 100, 0, 0.1, 0.65, 0, 0.02, 3.0, 0.01, 0.2, 2 )
                                show_hudmessage ( 0, "还想再来吗 ?")
                        }
                        else
                        {
                                if(punish_count>4)
                                {
                                        set_hudmessage ( 200, 100, 0, 0.1, 0.65, 0, 0.02, 3.0, 0.01, 0.2, 2 )
                                        show_hudmessage ( 0, "NO. %i   %s",punish_count+1,roundsay)
                                }
                                else
                                {
                                        set_hudmessage ( 200, 100, 0, 0.1, 0.65, 0, 0.02, 3.0, 0.01, 0.2, 2 )
                                        show_hudmessage ( 0, "NO. %i   %s",punish_count+1,roundsay[ punish_count ])
                                }       
                        }
                }

                uid=get_user_userid(i)
                switch(punish_count)
                {
                  case 0:
                  {
                          if( get_cvar_num("amx_pcheater_fly")==1)
                        {
                                set_hudmessage ( 200, 100, 0, 0.2, 0.2, 0, 0.4, 10.0, 0.2, 0.2, 2 )
                                   show_hudmessage ( 0, "Oh... UFO !")
                                fly_count=1
                                   before_fly(i)
                        }
                        else set_user_health(i,1)
                  }
                  case 1:server_cmd("amx_slay2 #%i 3",uid)
                  case 2:server_cmd("amx_slay2 #%i 2",uid)
                  case 3:server_cmd("amx_slay2 #%i 1",uid)                               
                  case 4:
                  {
                          server_cmd("amx_rocket #%i",uid)       
                          if(punish_count+1==count)
                        {
                                player_flag=false
                        }
                  }
                  default:
                  {
                          if(punish_count==count)
                        {
                                player_flag=false
                        }
                           else server_cmd("amx_slay2 #%i 2",uid)
                  }
                }
                if(player_flag)
                  punish_count++
                else
                {
                        set_user_rendering(i, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
                        cheater_count--
                        punish_count=0
                        client_cmd(i,"name ^"%s^" ",cheatername)
                }
        }
       
        if( playerfly && !player_flag)
        {
                if( is_user_alive(i) )
                {
                        set_hudmessage ( 200, 100, 0, 0.2, 0.2, 0, 0.4, 10.0, 0.2, 0.2, 2 )
                           show_hudmessage ( 0, "Oh... UFO !")
                        before_fly(i)
                }
        }
    }       
   
    return PLUGIN_HANDLED
}


//--------------------------------------vote---------------------------------------------
public before_vote(id)
{
    if( !get_cvar_num("amx_pcheater_enable") || !get_cvar_num("amx_pcheater_vote") )
         return PLUGIN_HANDLED
          
    if(voting)       
    {
      client_print(id, print_chat, "已经有一个投票正在进行!")
        return PLUGIN_HANDLED
    }
    if(votetimes==MAXVOTETIMES)
    {
            client_print(id, print_chat," 一局只能投 %i 次票",MAXVOTETIMES)
        return PLUGIN_HANDLED
    }
   
    //need money to vote
    new pmoney=cs_get_user_money(id)
    if(pmoney < get_cvar_num("amx_pcheater_vote_money") )
    {
            client_print(id, print_chat," 你没有足够的钱发起投票!",MAXVOTETIMES)
        return PLUGIN_HANDLED
    }
    cs_set_user_money(id,pmoney-get_cvar_num("amx_pcheater_vote_money"),1)
    client_print(id,print_chat," 花费 %i $ 发起投票.",get_cvar_num("amx_pcheater_vote_money"))
    set_task(1.0,"showplayers",id)
    return PLUGIN_CONTINUE
}

public showplayers(id)
{
    revote=0
    for(new i=0;i<9;i++)
    {
      choices = ""
    }

    new menu
    //format(menu,255," who is a cheater ?( Page %d ):^n^n",page)
    format(menu,255," 谁在作弊 ?( 第 %d 页 ):^n^n",page)

    get_players(players,num)
    new onepageplayer = num-((page-1)*8)
    if(num-((page-1)*8) > 8)
            onepageplayer = 8
   
    new offset = (page * 8) - 8
   
    for(new i=offset;i<onepageplayer+offset;i++)
    {
            new username
        get_user_name(players,username,32)

              new string
        if( player_flag[ players ] || teleportplayer] || playerfly] || (get_user_flags(players) & ADMIN_IMMUNITY ))
      {
                format(string,255,"\d%d. %s (punishing) ^n",i+1-offset,username)
                //choices = ""
        }       
        else        
        {
                format(string,255,"\w%d. %s ^n",i+1-offset,username)
                new id_str
                num_to_str(players,id_str,32)
                choices = id_str
        }
        add(menu,255,string)
    }
    if(num-((page-1)*8) > 8)
    {
              choices = "Next"
          add(menu,255,"\w^n9. 下一页")
    }
    add(menu,255,"\w^n0. 返回")
   
    show_menu(id,KEY1|KEY2|KEY3|KEY4|KEY5|KEY6|KEY7|KEY8|KEY9|KEY0,menu,MENUTIME,"who is cheater?")

    return PLUGIN_CONTINUE
}

public choosewho(id,key)
{
       
    if(key == 9 && page == 1)
    {
       page=1
       return 1
    }
    else if(key == 9 && page > 1)
    {
      page -=1
      showplayers(id)
      return 1
    }

    if(equal(choices,""))
    {
      showplayers(id)
      return 1
    }

    if(key < 8)
    {
      page=1
      target = choices
      showmenu(id,target)
      return 1
    }

    if(key == 8 && equal(choices,"Next"))
    {
      page += 1
      showplayers(id)
      return 1
    }

    return 1
}

//---------------------------------punish menu--------------------------------------------
public showmenu(id,target)
{
    new menu2
    count_y=0
    count_n=0
    count_p=0
    voting=true
   
    get_players(players,num)
    for(new i=0;i<num;i++)
    {
            counted[ players ]=false
    }

    new startname,targetname
    get_user_name(id,startname,32)
    new tid=str_to_num(target)
    get_user_name(tid,targetname,32)
   
    //format(menu2, 256, "\w^" %s ^" is a cheater ? ^n\d(^"%s^" start this vote) ^n^n\w7. Yes^n8. No^n9. ^" %s ^"is a libeler ",targetname,startname,startname)
    format(menu2, 256, "\w^" %s ^" 是作弊的 ? ^n\d(^"%s^" 发起本次投票) ^n^n\w7. 是^n8. 不是^n9. ^" %s ^"在诽谤^n^n不参与投票者将被扣%i$",targetname,startname,startname,get_cvar_num("amx_pcheater_takemoney"))
    show_menu(0, KEY7|KEY8|KEY9, menu2,MENUTIME,"Punish cheater?")
    new par
    par=id
    par=tid
    set_task(float(MENUTIME+1), "voteresult",78999,par,2)
   
    return PLUGIN_CONTINUE
}

public votecount(id,key)
{

    if (key == 6)
    {
           count_y++
    }
    if (key == 7)
    {
            count_n++
    }
    if (key == 8)
    {
            count_p++
    }
    counted=true
}

//-------------------------vote result---------------------------------

public voteresult(par)//tid)
{
    new uname
    new tid=par
    votetimes++
    //get_players(players, num,"c") //without bot
    get_players(players, num)
   
    new pmoney=0
    //take money of a player who didn't vote.
    for(new i=0;i<num;i++)
    {
            if( !counted[ players ] )
        {
                pmoney=cs_get_user_money(players)-get_cvar_num("amx_pcheater_takemoney")
                if( pmoney<0)
                        pmoney=0
                cs_set_user_money(players,pmoney,1)
                //client_print(players,print_chat," server take away you %i money becase of you didn't vote",get_cvar_num("amx_pcheater_takemoney") )
                client_print(players,print_chat," 由于没有投票你将被扣除%i块钱",get_cvar_num("amx_pcheater_takemoney"))
        }
    }
   
    new Float:rate = get_cvar_float("amx_pcheater_vote_rate")
    new Float:result = num ? (float(count_y) / float(num)) : 0.0
   
    if( result>=rate )
    {
      if( player_flag )
        {
                get_user_name(tid,uname,32)
                //client_print(0,print_chat, " Oh, player ^" %s ^" is being punished!",uname)
                client_print(0,print_chat, " 玩家 ^" %s ^" 正在被惩罚!",uname)
                voting=false
                count_y=0
                count_n=0
                   return PLUGIN_HANDLED
        }
       
        set_hudmessage ( 200, 100, 0, 0.2, 0.2, 0, 0.4, 10.0, 0.2, 0.2, 2 )
            //show_hudmessage ( 0, "the result is %f% ! vote successful ! ^n^n yes ( %i ) . no ( %i ) .",result,count_y,count_n)
            show_hudmessage ( 0, "投票结果为 %f% ! 投票成功! ^n^n 是 ( %i ) . 不是 ( %i ) .",result,count_y,count_n)

        ++punishtimes
        player_flag=true
        if(result>=0.9)
          count=7
        else count=5
        punish(tid)
    }
    else
    {
            new Float:p_result=num ? (float(count_p) / float(count_y+count_n+count_p)) : 0.0
        if(p_result>=rate)
        {
                get_user_name(par,oldname,31)
                uid=get_user_userid(par)
                set_hudmessage ( 200, 100, 0, 0.2, 0.2, 0, 0.4, 10.0, 0.2, 0.2, 2 )
//                show_hudmessage ( 0, "the result is %f% ! vote failed ( need %f% ).^n^n But yes ( %i ) . no ( %i ) . libel ( %i )^n^n ^" %s ^" will be punish in 5 round !!!!",result,rate,count_y,count_n,count_p,oldname)
                show_hudmessage ( 0, "投票结果为 %f% ! 投票失败( 需要达到 %f% ).^n^n 但: 是 ( %i ) . 不是 ( %i ) . 诽谤 ( %i )^n^n ^" %s ^" 将被惩罚5局 !!!!",result,rate,count_y,count_n,count_p,oldname)
                count=5
                player_flag]=true
                punish_count]=0
               
                server_cmd("amx_bury #%i",uid)       
        }
        else
        {
                new Float:true_result=num ? (float(count_y) / float(count_y+count_n)) : 0.0
                    if(true_result>=rate && revote<MAXREVOTETIMES)
                {
                        set_hudmessage ( 200, 100, 0, 0.2, 0.2, 0, 0.4, 10.0, 0.2, 0.2, 2 )
                        //show_hudmessage ( 0, "the result is %f% ! vote failed ( need %f% ).^n^n But yes ( %i ) . no ( %i ).^n^n Please vote again !!!!",result,rate,count_y,count_n)
                        show_hudmessage ( 0, "投票结果为 %f% ! 投票失败( 需要达到 %f% ).^n^n 但: 是 ( %i ) . 不是 ( %i ).^n^n 请再投一次 !",result,rate,count_y,count_n)
                        num_to_str(tid,target,5)
                        votetimes--
                        revote++
                        showmenu(par,target)
                   }
                else
                {
                        set_hudmessage ( 200, 100, 0, 0.2, 0.2, 0, 0.4, 10.0, 0.2, 0.2, 2 )
                        //show_hudmessage ( 0, "the result is %f% ! vote failed ( need %f% ).^n^n yes ( %i ) . no ( %i ) . libel ( %i )",result,rate,count_y,count_n,count_p)
                        show_hudmessage ( 0, "投票结果为 %f% ! 投票失败( 需要达到 %f% ).^n^n是 ( %i ) . 不是 ( %i ) . 诽谤 ( %i )",result,rate,count_y,count_n,count_p)
                }
        }
       
    }
   
    count_y=0
    count_n=0
    count_p=0
    voting=false
    return PLUGIN_CONTINUE
}


//---------------------------punish------------------------------------------
punish(player)
{
        set_task(5.0,"punishdelay",player)
        return PLUGIN_CONTINUE
}

public punishdelay(player)
{
        player_flag=true
        punish_count=0
        get_user_info(player,"name",oldname,31)
        uid=get_user_userid(player)
       
        if(punishtimes>MAXPUNISHTIMES && get_cvar_num("amx_pcheater_kick"))
        {
                set_hudmessage ( 200, 100, 0, 0.2, 0.2, 0, 0.4, 10.0, 0.2, 0.2, 2 )
                //show_hudmessage ( 0, "player (%s) will be kicked !",oldname)
                show_hudmessage ( 0, "作弊者 (%s) 将被踢掉 !",oldname)
   
                server_cmd("kick #%i",uid)
                return PLUGIN_HANDLED
        }
       
        set_hudmessage ( 200, 100, 0, 0.4, 0.6, 0, 0.02, 5.0, 0.01, 0.2, 2 )
        //show_hudmessage ( 0, "One cheater ( %s ) will be punished in %i round!",oldname,count )
        show_hudmessage ( 0, "作弊者 ( %s ) 将被惩罚 %i 局!",oldname,count )
       
        set_user_rendering(player, kRenderFxGlowShell, 0, 255, 0, kRenderTransAlpha, 150)
        return PLUGIN_CONTINUE
}



//-------------------------check alive enemy-------------------------
check_team(id)
{
        if( !is_user_alive(id) )
                return 0
               
        new pteam,eteam,i       
        get_user_team(id,pteam,31)
        get_players(players,num,"a")
        for(i=0;i<num;i++)
        {
                get_user_team(players,eteam,31)
                if( !equal(eteam,pteam) )
                  break
        }
        if(i==num)
          return 0
          
        get_players(players,index,"ae",eteam)
        return index
}

//------------------------------Teleport--------------------------------------------
before_tele(id)
{
   if( !is_user_alive(id) )
        return PLUGIN_HANDLED
       
   get_user_name(id,oldname,31)
   
   set_hudmessage ( 200, 100, 0, 0.2, 0.2, 0, 0.4, 10.0, 0.2, 0.2, 2 )
   //show_hudmessage ( 0, "Oh,player ( %s ) will be teleported. ^nkill him to win %i$!",oldname,get_cvar_num("amx_pcheater_givemoney") )
   show_hudmessage ( 0, "重金悬赏:玩家 ( %s ) 将被传送 . ^n杀掉他可以得到 %i$!",oldname,get_cvar_num("amx_pcheater_givemoney") )
   client_cmd(id, "bind ^"space^" ^"say 对不起^"")       
   
   new par
   par=id
   new number=random_num(2,3)
   set_user_health(id,20)
   //glow
   set_user_rendering(id, kRenderFxGlowShell, 200, 200, 20, kRenderTransAlpha, 155)
   set_task(number*(0.5),"teleport",56789,par,1,"b")
   return PLUGIN_CONTINUE
}


public teleport(par)
{
        new id=par
        new origin
        new org1,org2
        if( !check_team(id) || !is_user_alive(id) )
        {
                remove_task(56789,0)
                teleportplayer=false
                client_cmd(id, "bind ^"space^" ^"+jump^"")
                set_user_rendering(id, kRenderFxGlowShell, 0,0, 0, kRenderTransAlpha, 255)
                return PLUGIN_HANDLED
        }
        new ran=random_num(0,index-1)
        new ranid=players
        teleportplayer=true
       
        get_user_origin(ranid,origin)
        strip_user_weapons ( id )
        org1=random_num(-150,150)
        org2=random_num(-150,150)
       
        origin+=org1
        origin+=org2
        origin-=50
        set_user_origin(id,origin)
        get_user_name(id,oldname,31)
        client_cmd(id, "bind ^"space^" ^"+jump^"")
       
        return PLUGIN_CONTINUE
}

//----------------------------death event---------------------------------------
public hook_death()
{
   new Killer = read_data(1)
   new Victim = read_data(2)
   
   if( get_cvar_num("amx_pcheater_enable") && teleportplayer && get_user_team(Victim)!=get_user_team(Killer) )
   {
           remove_task(56789,0)
           teleportplayer=false
        set_user_rendering(Victim, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
           addmoney(Killer)
   }
   if( get_cvar_num("amx_pcheater_enable") && playerfly && Victim!=Killer )
   {
           set_user_gravity(Victim, 1.00)
           //playerfly=false
        set_user_rendering(Victim, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
        addmoney(Killer)
   }
          
   return PLUGIN_HANDLED
   
}

addmoney(id)
{
        get_user_name(id,oldname,31)
        set_hudmessage ( 200, 100, 0, 0.2, 0.2, 0, 0.4, 10.0, 0.2, 0.2, 2 )
           //show_hudmessage ( 0, "player ( %s ) kill the cheater ! add %i$:) !",oldname,get_cvar_num("amx_pcheater_givemoney") )
           show_hudmessage ( 0, "玩家 ( %s ) 杀死作弊者 ! 得到 %i$ 奖金:) !",oldname,get_cvar_num("amx_pcheater_givemoney") )
           new kmoney=cs_get_user_money(id)
           cs_set_user_money ( id,kmoney+get_cvar_num("amx_pcheater_givemoney"), 1 )
}
       
//--------------------------fly--------------------------------------------
before_fly(id)
{
        set_task(6.0,"fly",id)
}

public fly(id)
{
        if( !is_user_alive(id) )
                return PLUGIN_HANDLED
               
        get_user_name(id,oldname,31)
   
           set_hudmessage ( 200, 100, 0, 0.2, 0.2, 0, 0.4, 10.0, 0.2, 0.2, 2 )
//           show_hudmessage ( 0, "Oh,player ( %s ) is in the sky. ^nkill him to win %i$!",oldname,get_cvar_num("amx_pcheater_givemoney") )
           show_hudmessage ( 0, "作弊者 ( %s ) 在天上. ^n杀死他将赢得 %i$!",oldname,get_cvar_num("amx_pcheater_givemoney") )
           set_user_rendering(id, kRenderFxGlowShell, 255, 50, 0, kRenderTransAlpha, 255)       

        set_user_gravity(id,-0.5)
        client_cmd(id, "+jump;wait;wait;-jump")
        strip_user_weapons ( id )
        playerfly=true
        return PLUGIN_HANDLED
}


这是cheating_punish.sma 的源码! 在附件中附上了!
根本没这个命令的啊!!!

landyhsu 发表于 2007-6-4 09:10:20

回复: 大家看看这是哪个插件

楼上的,你给出的是经人修改过的惩罚作弊者插件,原来的源码请看我2楼给出的链接,里面就有amx_pcheater_list命令,原作者已经写得很清楚啦。

请在仔细看一下后再提问吧???
页: [1]
查看完整版本: 大家看看这是哪个插件