Hey, guys.
I am using code for reduce damage from bullets with check.
So, I have entity anomalies.
How can I make damage check only for one entity/anomaly?
I have no idea what you are talking about, but you need a () after "IsBulletDamage"
Compare the callback entity to your desired entity
I need this, but for entity
Try this:
[CODE]if SERVER then
function Sykarabotai( target, dmginfo )
if ( target:IsPlayer() and dmginfo:IsBulletDamage() and target:GetModel() == "models/stalkertnb2/psz9d_duty2.mdl" ) then
dmginfo:ScaleDamage( 0.048 )
end
return true -- Without it the damages won't probably be registered
end
hook.Add("EntityTakeDamage","Sykarabotai",Sykarabotai)
end[/CODE]
[QUOTE=xDShot;49116321]Try this:
CODE[/QUOTE]
Returning true completely blocks the damage event, for this it shouldn't return anything.