Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*#################################################
- ### Simple damage scaling
- #################################################*/
- hook.Add("EntityTakeDamage", "ScalePlayerDamage", function( target, dmginfo )
- if target:IsPlayer() then -- Target is player?
- local bullet_scale = 0.5 -- Bullets do half damage
- local explosion_scale = 0.25 -- Explosions do 1/4 damage
- if dmginfo:IsBulletDamage() then
- dmginfo:ScaleDamage( bullet_scale )
- end
- if dmginfo:IsExplosionDamage() then
- dmginfo:ScaleDamage( explosion_scale )
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement