|
发表于 2004-6-16 01:48:51
|
显示全部楼层
来自 中国–黑龙江–佳木斯
这里有一个 for amx 的,我没使用过,不知道能不能工作
[PHP]
/*
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;
}
[/PHP] |
|