|
发表于 2008-3-6 12:58:26
|
显示全部楼层
来自 中国–广东–惠州
回复: 再找到一个去C4的插件
[php]
#include <amxmod>
#include <engine>
public dropbomb(id)
{
if(get_cvar_num("amx_nobomb") == 1)
{
new clip, ammo
new wpn_id=get_user_weapon(id, clip, ammo)
if (wpn_id == CSW_C4 )
{
client_cmd(id,"weapon_c4")
client_cmd(id,"drop")
set_hudmessage(222, 70,0, -1.0, 0.3, 0, 0.0, 6.0, 1.0, 1.0, 2)
show_hudmessage(id,"We dont plant bombs here, we kill here")
strip_c4(id)
}
}
return PLUGIN_HANDLED
}
/*这是Rulzy版主restwpns_fight.amxx插件里的去掉C4函数*/
public strip_c4(id)
{
new weaponbox, bomb = find_ent_by_class(-1, "weapon_c4")
if(bomb && (weaponbox = entity_get_edict(bomb, EV_ENT_owner)) > get_maxplayers())
{
remove_entity(weaponbox)
remove_entity(bomb)
message_begin(MSG_ALL, get_user_msgid("BombPickup"))
message_end()
}
}
//---------------------------------------------------------------------
public plugin_init()
{
register_plugin("No Bomb","1.0","Freecode")
register_event("CurWeapon","dropbomb","b")
register_cvar("amx_nobomb","0")
}
//---------------------------------------------------------------------
[/php] |
|