Exports & Hooks
Use your folder name instead of kartik-hunting if you renamed the resource.
🖥️ Client exports
exports['kartik-hunting']:OpenJournal(tab) -- 'ledger', 'contracts', 'compendium', 'satchel', 'camp', 'expeditions'
exports['kartik-hunting']:StartTracking() -- same as /track
exports['kartik-hunting']:IsTracking() -- true while the player follows a trail
exports['kartik-hunting']:IsScentCovered() -- true while cover scent is on🗄️ Server exports
exports['kartik-hunting']:GetReputation(source) -- xp, rank, label, next rank, perks
exports['kartik-hunting']:AddReputation(source, amount) -- negative to take away🪝 Hooks
These files are yours to edit. Keep a copy of them when you update the resource.
bridge/custom/server/hooks.lua
| Function | When it runs |
|---|---|
OnAnimalHarvested(source, result) | After an animal is skinned, butchered, harvested or taken from a trap |
OnContractCompleted(source, contract) | After a contract is handed in |
OnRankUp(source, rank, label) | When a hunter reaches a new rank |
OnRareHarvested(source, rare, quality) | After a trophy or legendary is skinned. rare is its id from shared/rare.lua |
result holds action, species, label, rare ('trophy', 'legendary' or nil), quality, reasons, items, xp and remaining.
contract holds template, kind, target, amount, quality, fresh, cash, xp, rank, giver and giverLabel.
function OnRankUp(source, rank, label)
if rank == 8 then
-- give a title, a horse or a role
end
endbridge/custom/client/hud.lua
| Function | When it runs |
|---|---|
CustomToggleHud(show) | false when the journal or a vendor opens, true when it closes. Hide your own HUD here |
CustomNotify(message, kind) | For every notification. Send it to your own system and return true to skip the built-in one |
function CustomNotify(message, kind)
exports['my-notify']:Show(message, kind)
return true
end