Please add
Code:public void Reload() { if (Interface.CallHook("OnTurretReload", (object) this) != null) return; foreach (Item obj in this.inventory.itemList) { if (obj.info.itemid == this.ammoType.itemid && obj.amount > 0) { this.ammoItem = obj; break; } } }and this prevents using items not from selfstorage, so could this possibly be changed toCode:AutoTurret: public bool HasAmmo() { if (this.ammoItem != null && this.ammoItem.amount > 0) return this.ammoItem.parent == this.inventory; return false; }
Code:AutoTurret: public bool HasAmmo() { if (this.ammoItem != null && this.ammoItem.amount > 0) return true; return false; }
Request OnTurretReload hook (Rust)
Discussion in 'Feature Suggestions' started by wazzzup, Dec 28, 2017.