搜索
查看: 2663|回复: 5

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

[复制链接]
发表于 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[1];
      param[0]=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[1];
      param[0]=id;
      set_task(0.1,"noshield",id+100,param,1,"b");
   }
   return PLUGIN_HANDLED;
}

public noshield(param[])
{
   new id=param[0];
   client_cmd(id,"drop weapon_shield");
   return PLUGIN_HANDLED;
}
 楼主| 发表于 2003-12-14 10:12:53 | 显示全部楼层 来自 中国–湖南–娄底
二。Steam (1.6) Shield restriction
#include <amxmod>

public shield_r(id) {
new team[32]
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","[AoL]Demandred & Pimp Daddy (OoTOAoO)")
   register_clcmd("shield","shield_r",-1,"shield")
   server_cmd("amx_restrict item 8")
}
回复

使用道具 举报

 楼主| 发表于 2003-12-14 10:20:56 | 显示全部楼层 来自 中国–湖南–娄底
哈哈,我自己搞定了,分享给大家

本帖子中包含更多资源

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

×
回复

使用道具 举报

发表于 2003-12-14 11:35:32 | 显示全部楼层 来自 中国–江苏–南京–秦淮区
cs1.6禁了盾牌还不如去玩1.5了,对机器要求又高,我的同事c466的机器,版载显卡,玩1.5好的很,1.6嘛......
回复

使用道具 举报

发表于 2003-12-14 11:39:01 | 显示全部楼层 来自 中国–江苏–南京–秦淮区
不好意思,没打玩就提交了,只是想表示虽然不喜欢1.6禁盾,但对楼主的做法还是强烈支持!!
回复

使用道具 举报

发表于 2009-6-5 09:58:28 | 显示全部楼层 来自 中国–广东–深圳–罗湖区
对楼主的做法还是强烈支持!!
回复

使用道具 举报

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

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