hacker900 发表于 2003-12-14 10:11:51

[求助] 斑竹,帮帮忙!![分享]

我找到了禁止盾牌插件的原代码了,就是不止到怎么把它编译成.amx文件,麻烦斑竹编译,谢谢!!!
有两个:
一。No Shields Plugin
/*
   No Shields Plugin

   Author: Andey

   Description:
   Set cvar sv_noshield to 1 to make shields unaviable in game.
   When shields are unaviable you can still buy them however they get dropped.
   They also get dropped when picking them up.
   Shields get unaviable one round after setting sv_noshild to 1.

   set cvar sv_noshield 0 to make shields aviable again.
   Shields get aviable again one round after setting sv_noshield to 1.

   P.S.
   I quess there would be a better solution to do that but I don't get it.
   at least this one works.
*/

#include <amxmod>
#include <amxmisc>

public plugin_init()
{
   register_plugin("No Shields","0.1","Andey")
   register_cvar("sv_noshield","0");
   register_event("ResetHUD","new_round","b");
}

public client_connect(id)
{
   if(get_cvar_num("sv_noshield")==1)
   {
      new param;
      param=id;
      set_task(0.1,"noshield",id+100,param,1,"b");
   }
   return PLUGIN_CONTINUE;
}

public client_disconnect(id)
{
   remove_task(id+100);
                return PLUGIN_CONTINUE;
}
public new_round(id)
{
   
   remove_task(id+100);
   if(get_cvar_num("sv_noshield")==1)
   {
      new param;
      param=id;
      set_task(0.1,"noshield",id+100,param,1,"b");
   }
   return PLUGIN_HANDLED;
}

public noshield(param[])
{
   new id=param;
   client_cmd(id,"drop weapon_shield");
   return PLUGIN_HANDLED;
}

hacker900 发表于 2003-12-14 10:12:53

二。Steam (1.6) Shield restriction
#include <amxmod>

public shield_r(id) {
new team
get_user_team(id,team,32)
if (equal(team,"CT")){
   set_hudmessage(200, 100, 0, -1.0, 0.3, 0, 1.0, 5.0, 0.1, 0.2, 3)
   show_hudmessage(id,"Buying this item is currently restricted")
   client_cmd(id,"echo Buying this item is currently restricted")
}
return PLUGIN_HANDLED
}


public plugin_init() {
   register_plugin("Shield Restriction","1.0","Demandred & Pimp Daddy (OoTOAoO)")
   register_clcmd("shield","shield_r",-1,"shield")
   server_cmd("amx_restrict item 8")
}

hacker900 发表于 2003-12-14 10:20:56

哈哈,我自己搞定了,分享给大家

love10000 发表于 2003-12-14 11:35:32

cs1.6禁了盾牌还不如去玩1.5了,对机器要求又高,我的同事c466的机器,版载显卡,玩1.5好的很,1.6嘛......

love10000 发表于 2003-12-14 11:39:01

不好意思,没打玩就提交了,只是想表示虽然不喜欢1.6禁盾,但对楼主的做法还是强烈支持!!

36688747 发表于 2009-6-5 09:58:28

对楼主的做法还是强烈支持!!
页: [1]
查看完整版本: [求助] 斑竹,帮帮忙!![分享]