Exports
Weapon ownership
SetWeaponOwnershipCheck, for inventories Hydra cannot read by itself.
SetWeaponOwnershipCheck (server)
Hydra checks that a weapon in a player's hand is one they own. It reads ox_inventory, Qbox, QBCore and ESX by itself. For any other inventory, give Hydra a function that answers the question:
exports.HydraAC:SetWeaponOwnershipCheck(function(source, weaponHash)
-- return true if the player owns this weapon, false if not,
-- or nil if you cannot tell (then nothing is recorded)
return MyInventory.HasWeapon(source, weaponHash)
end)Call it once when your inventory starts. Returning nil is always safe: Hydra records nothing when the answer is unknown.