#include <amxmodx>
#include <amxmisc>
#include <engine>
public plugin_init()
{
........
register_touch("weaponbox", "player", "Touch_Weapon")
register_touch("weapon_shield", "player", "Touch_Shield")
}
public Touch_Weapon(ent, id)
{
if(!is_user_connected(id) || !is_user_alive(id)) return PLUGIN_CONTINUE
new model[32]
entity_get_string(ent, EV_SZ_model, model, 31)
if(equali(model, "models/w_deagle.mdl"))
{
//根据枪的模型,判断是什么枪。
//如果允许玩家捡枪,return PLUGIN_CONTINUE
//如果不允许玩家捡枪,return PLUGIN_HANDLED
}
}
public Touch_Shield(ent, id)
{
if(!is_user_connected(id) || !is_user_alive(id)) return PLUGIN_CONTINUE
//如果允许玩家盾牌,return PLUGIN_CONTINUE
//如果不允许玩家盾牌,return PLUGIN_HANDLED
}
|