Which hook should be use:OnRocketLaunched or OnPlayerAttack??
how to get the damage value and change it?
Solved Changing rocket damage? (C#)
Discussion in 'Rust Development' started by Vector 2, Jun 16, 2015.
-
Rockets won't trigger the OnPlayerAttack hook, if you'd open up the Explosives modifier plugin you'll see how I modify the damage dealt by rockets with the OnRocketLaunched hook.
-
Thank you! I get it. There is a TimedExplosive class.
Code:void OnRocketLaunched(BasePlayer player, BaseEntity entity) { var explosive = entity as TimedExplosive; if (!explosive) return; foreach (var damage in explosive.damageTypes) damage.amount *= RocketDamageModifier / 100; explosive.explosionRadius *= RocketRadiusModifier / 100; }
Last edited by a moderator: Jun 16, 2015