If you wanna know is player hit in any mean you can use hamsandwich's "Ham_TakeDamage"
Example:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>
#define PLUGIN "Damage Detect"
#define VERSION "1.0"
#define AUTHOR "CodeMaster"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_TakeDamage,"player","hook_damage",0) // if you want post check change 0 to 1
}
public hook_damage(id,inflictor_id,attacker_id,Float:damage,damagebits) {
// Your code here...
// inflictor_id represents "weapon" id, so maybe if melee attacks has id like custom weapon,
// you could use:
if(inflictor_id > 30) { //Higher than highest standard weapon id?
// if it was kung fu?
}
return HAM_HANDLED
}
I'm HIGHLY unsure about that inflictor part, cause I never used melee attacks, but Ham_TakeDamage detects any sort of damage so it still may come handy.
Cheers ;)
Nidza
__________________