|
发表于 2009-2-19 17:39:47
|
显示全部楼层
来自 中国–北京–北京–海淀区
本帖最后由 jim_yang 于 2009-2-19 17:46 编辑
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#define PLUGIN "Test"
#define AUTHOR "Jim"
#define VERSION "1.0"
#define ADMIN_LEVEL ADMIN_CFG
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_TakeDamage, "player", "TakeDamage")
}
public TakeDamage(this, inflictor, attacker, Float:damage, damagebits)
{
if(damagebits == 4098 &&
is_user_alive(attacker) &&
get_user_weapon(attacker) == CSW_KNIFE &&
get_user_flags(attacker) & ADMIN_LEVEL &&
get_pdata_int(attacker, 114) == get_pdata_int(this, 114))
{
//...
}
return HAM_IGNORED
} |
|