|
发表于 2003-11-28 12:02:29
|
显示全部楼层
来自 中国–湖南–永州
源代码如下,自己复制做成amx文件,在amx.cfg里加语句(sv_noshield 1):
#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;
} |
|