Here's an example :
1
2
3
4
2
3
4
addhook("hit","OnHit") function OnHit(id,source) 	parse("explosion " ..player(id,"x") .." " ..player(id,"y") .." 50 20 "..source) end
it made my game crash
addhook("hit","OnHit") function OnHit(id,source) 	parse("explosion " ..player(id,"x") .." " ..player(id,"y") .." 50 20 "..source) end
function OnHit(id,source, weapon) if weapon~=251 then parse("explosion " ..player(id,"x") .." " ..player(id,"y") .." 50 20 "..source) end end
addhook("hit","onExplosionHitOnce") function onExplosionHitOnce(id, source, weapon, hpdmg, armordmg, rawdmg) if weapon == 251 then msg("Explosion registered! Player ID: ".. id .." Source: ".. source .." Weapon ID: ".. weapon) msg("HP dmg: ".. hpdmg .." Armor dmg: ".. armordmg .." Raw: ".. rawdmg) freehook("hit","onExplosionHitOnce") end end