Request OnUnloadAmmo hook (Rust)

Discussion in 'Feature Suggestions' started by Kunazai, Jan 16, 2018.

  1. public class BaseProjectile : AttackEntity
    upload_2018-1-16_14-53-3.png

    Code:
    object[] objArray = new object[] { ownerPlayer, component };
    if (Interface.CallHook("OnUnloadAmmo", objArray) != null)
    {
        return;
    }
    I need this to track the item entity of ammo created when the/a gun is unloaded. Can also be used to prevent specific weapons from being emptied if one desired.

    Also, I tried OnSwitchAmmo, OnReloadMagazine, and OnReloadWeapon hooks and they all ran for their scenarios, but not when you manually unload a weapon.

    I apologize if there is another way to accomplish this already.