AE86 发表于 2006-2-4 11:01:42

回复: 【原创】娱乐型反作弊插件v1.1--2005-10-3

Enigma还有2个问题不知道能不能解决的
就是在换图后不惩罚(按道理是不可以,换图后全部数据重新载入了) 还是想问一下 ;)
现在是管理员免疫,能不能让内网玩家也免疫。

Enigmaya 发表于 2006-2-4 17:21:49

回复: 【原创】娱乐型反作弊插件v1.1--2005-10-3

Post by AE86
Enigma还有2个问题不知道能不能解决的
就是在换图后不惩罚(按道理是不可以,换图后全部数据重新载入了) 还是想问一下 ;)
现在是管理员免疫,能不能让内网玩家也免疫。


嗯,换图后所有数据重置。。。唯一的办法就是加入文件记录部分。


内网免疫。。。我就单独给你说吧,
找到下面这段。。。增加红色的代码。
**1**填入你要免疫的ip段。
**2**填入你要在菜单里显示的名称,如“内网用户”。

new ip
for(new i=offset;i<onepageplayer+offset;i++)
    {
            new username
        get_user_name(players,username,32)

              new string

        get_user_ip(players,ip,14);
        if( !contain( ip,"**1**") )
                format(string,255,"\d%d. %s (**2**) ^n",i+1-offset,username)

        if( player_flag[ players ] || teleportplayer] || playerfly])
      {
                format(string,255,"\d%d. %s (punishing) ^n",i+1-offset,username)
                //choices = ""
        }
        else if( is_user_admin(players) )
        {
                format(string,255,"\d%d. %s (Admin) ^n",i+1-offset,username)
        }
        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)
    }

AE86 发表于 2006-2-4 20:26:10

回复: 【原创】娱乐型反作弊插件v1.1--2005-10-3

收到。 :sweet_kis:sweet_kis:sweet_kis

AE86 发表于 2006-2-4 20:33:36

回复: 【原创】娱乐型反作弊插件v1.1--2005-10-3

/* AMX Mod script.
*
* Knife Arena
*
* amx_knives 1 - restricts weapons to knives
* 0 - enables all weapons
*
* NOTE: Plugin adminvote from AMX 0.9.x required!!!
*/

#include <amxmod>
#include <amxmisc>

new bool:KnifeEnabled
new option
new round

public amx_enableknife(id,level,cid) {
if (!cmd_access(id,level,cid,1))
return PLUGIN_HANDLED

new arg1
read_argv(1,arg1,3)

if (equal(arg1,"1")||equali(arg1,"on")){
KnifeEnabled = true
unpause("b","switchweapon")
}
else if (equal(arg1,"0")||equali(arg1,"off")){
KnifeEnabled = false
pause("b","switchweapon")
}
else {
console_print(id,"Knives Only Mode is %s",KnifeEnabled ? "enabled" : "disabled")
return PLUGIN_HANDLED
}

console_print(id,"Knives Only Mode %s",KnifeEnabled ? "enabled" : "disabled")
client_print(0,print_center,"Knives Only Mode Has Been %s!",KnifeEnabled ? "Enabled" : "Disabled")

engclient_cmd(0,"weapon_knife")

set_hudmessage(0, 100, 0, 0.05, 0.65, 2, 0.02, 10.0, 0.01, 0.1, 2)
show_hudmessage(0,KnifeEnabled ? "Knives Only Allowed" : "All Guns Allowed" )
return PLUGIN_HANDLED
}

public switchweapon(id){
new wpn = read_data(2)
if (wpn == CSW_C4) return PLUGIN_CONTINUE
if (round < get_cvar_num("amx_kniferound") && (wpn == CSW_HEGRENADE || wpn == CSW_SMOKEGRENADE || wpn == CSW_FLASHBANG)) return PLUGIN_CONTINUE
engclient_cmd(id,"weapon_knife")
return PLUGIN_CONTINUE
}

new votepistols[] = "\yAMX %s Knives Only Mode?\w^n^n1. Yes^n2. No"

public vote_knives(id){
new Float:voting = get_cvar_float("amx_last_voting")
if (voting > get_gametime()){
client_print(id,print_chat,"* There is already one voting...")
return PLUGIN_HANDLED
}
if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime()) {
client_print(id,print_chat,"* Voting not allowed at this time...")
return PLUGIN_HANDLED
}
new menu_msg
format(menu_msg,255,votepistols,KnifeEnabled ? "Disable" : "Enable")
new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0
set_cvar_float("amx_last_voting", get_gametime() + vote_time )
show_menu(0,(1<<0)|(1<<1),menu_msg,floatround(vote_time))
set_task(vote_time,"check_votes")
client_print(0,print_chat,"* Voting has started...")
option=option=0
return PLUGIN_HANDLED
}

public vote_count(id,key){
if ( get_cvar_float("amx_vote_answers") ) {
new name
get_user_name(id,name,31)
client_print(0,print_chat,"* %s voted %s", name, key ? "against" : "for" )
}
++option
return PLUGIN_HANDLED
}

public check_votes(id){
if (option > option){
server_cmd( "amx_knives %s", KnifeEnabled ? "off" : "on" )
client_print(0,print_chat,"* Voting successful (yes ^"%d^") (no ^"%d^").",option,option)
}
else{
client_print(0,print_chat,"* Voting failed (yes ^"%d^") (no ^"%d^").",option,option)
}
return PLUGIN_CONTINUE
}

public end_round(){
if (round >0)
round --
else
round = 0
if (!round)
pause("b","switchweapon")
else
unpause("b","switchweapon")
return PLUGIN_CONTINUE
}

public reset_round(){
round = get_cvar_num("amx_kniferound")
if (round >0) unpause("b","switchweapon")
return PLUGIN_CONTINUE
}

public reset_player(id){
if (round>0){
new sz
new len = format(sz,89," 还有%i局为刀战模式。",round)
if (round < get_cvar_num("amx_kniferound")) format(sz,89-len,"^n 但是本局您可以使用手雷.")
set_hudmessage(200,0,0,-1.0,0.35,1,6.0,12.0,0.3,0.3,5)
show_hudmessage(id,sz)
}
}

public plugin_init() {
register_plugin("Knife Arena","0.9","tcquest78")
register_cvar("amx_kniferound","2")
register_event("CurWeapon","switchweapon","be","1=1","2!29")
register_concmd("amx_knives","amx_enableknife",ADMIN_LEVEL_B,"<1|0> - knives only mode")
register_clcmd("say /voteknives","vote_knives",0,"- start voting session for knives only mode")
register_menucmd(register_menuid("Knives Only Mode?"),(1<<0)|(1<<1),"vote_count")
register_event("SendAudio", "end_round", "a", "2=%!MRAD_terwin", "2=%!MRAD_ctwin", "2=%!MRAD_rounddraw")
register_event("TextMsg", "reset_round", "a", "2&#Game_C", "2&#Game_w")
register_event("ResetHUD","reset_player","b")
round = get_cvar_num("amx_kniferound")
if (!round) pause("b","switchweapon")
return PLUGIN_CONTINUE
}
这段,第一二局刀战的。现在还没人能让它在amxx1.5以上的版本兼容。你能看出问题出在哪里吗?

Enigmaya 发表于 2006-2-5 13:28:18

回复: 【原创】娱乐型反作弊插件v1.1--2005-10-3

Post by AE86
/* AMX Mod script.
*
* Knife Arena
*
* amx_knives 1 - restricts weapons to knives
* 0 - enables all weapons
*
* NOTE: Plugin adminvote from AMX 0.9.x required!!!
*/

#include <amxmod>
#include <amxmisc>

new bool:KnifeEnabled
new option
new round

public amx_enab...


在1.6上编译通过啊。。。有什么问题??

AE86 发表于 2006-2-5 15:38:14

回复: 【原创】娱乐型反作弊插件v1.1--2005-10-3

Post by Enigmaya
在1.6上编译通过啊。。。有什么问题??
Post by 抓外挂出身
[讨论]Hydralisk发布的刀局插件 在AMXX1.5X上的兼容问题
Hydralisk 发布的刀局插件不适合AMXX1.5X版使用 加载后,每局都变成刀局了,虽然提示是正常的

有没有办法能做修改呢?让它适合 1.5X版使用?

下附带源码文件


/* AMX Mod script.
*
* Knife Arena
*
* amx_knives 1 - restricts weapons to knives
*                                        0 - enables all weapons
*
* NOTE: Plugin ...
1.5、1.6都通过,第一、二局刀局不正常。 :cool:

Enigmaya 发表于 2006-2-5 19:36:37

回复: 【原创】娱乐型反作弊插件v1.1--2005-10-3

Post by AE86
1.5、1.6都通过,第一、二局刀局不正常。 :cool:


怎么个不正常啊?

degame 发表于 2006-2-5 23:05:47

回复: 【原创】娱乐型反作弊插件v1.1--2005-10-3

插件太容易失灵了,刚才在服里惩罚了几个人,有些人根本没有被惩罚,什么反应都没有(用OP直接惩罚的)。还有些只惩罚了一局,剩下的全是显示在惩罚但其实并没有惩罚的现象。还有个家伙自己发起投票投了自己一票,结果投票也居然通过,但也是什么反应都没有,连名字都没有变。问一下楼主怎么回事?
望楼主改进一下吧
我的服因为一些原因没有升级,还是旧版本的2834
AMXX是1.6
C-D是服务器版4.29.4

degame 发表于 2006-2-5 23:06:45

回复: 【原创】娱乐型反作弊插件v1.1--2005-10-3

忘了说刚才是在满人30人的情况下测试的:cry: :cry: :cry: :cry: :cry:

AE86 发表于 2006-2-5 23:52:47

回复: 【原创】娱乐型反作弊插件v1.1--2005-10-3

Post by degame
插件太容易失灵了,刚才在服里惩罚了几个人,有些人根本没有被惩罚,什么反应都没有(用OP直接惩罚的)。还有些只惩罚了一局,剩下的全是显示在惩罚但其实并没有惩罚的现象。还有个家伙自己发起投票投了自己一票,结果投票也居然通过,但也是什么反应都没有,连名字都没有变。问一下楼主怎么回事?
望楼主改进一下吧
我的...
我用机器人测试会出现这样的情况,但是在服务器上暂时还没出现。
要不你在amxx.cfg里添加amx_pcheater_fly 2试试看    。 :brick:
页: 30 31 32 33 34 35 36 37 38 39 [40] 41 42 43 44 45 46 47 48 49
查看完整版本: 【原创】娱乐型反作弊插件v1.1--2005-10-3