Outdoors API Reference
Callbacks (server)
metaden-outdoors:server:requestNonce- Registered through bridge callback support when available.
- Params:
(action: string) - Returns:
nonce: string | nil - Allowed actions:
cookMeat,searchForMaterial,fillBottle,gutSnake,gutLizard.
Network events (server)
metaden-outdoors:server:requestNonceEvent- Event-based fallback for nonce retrieval when callback helpers are unavailable.
- Params:
(action: string, requestId: string) - Response transport is internal and not part of the public contract.
metaden-outdoors:server:requestCookingSkillData- Params:
(requestId: string) - Responds via an internal client response event and returns current cooking skill data used by the cooking menu when
Config.UseMetaDenSkills = true. - Returns
nilwhen skills integration is disabled or unavailable.
- Params:
metaden-outdoors:server:cookMeat- Params:
(name: string, nonce: string) - Validates nonce + cooldown + required recipe items.
- Removes required ingredients and gives cooked item.
- Params:
metaden-outdoors:server:searchForMaterial- Params:
(lootableId: string, nonce: string) lootableIdmust be a canonicalConfig.Lootables[*].id.- Validates nonce + cooldown.
- Uses the matching
Config.Lootablesentry for required-item checks, weighted rewards, and optional bonus pools.
- Params:
metaden-outdoors:server:GutSnake- Params:
(slot: number, nonce: string) - Validates nonce + cooldown.
- Requires a knife item in inventory.
- Removes source item from slot and gives
snakemeat+snakeskin.
- Params:
metaden-outdoors:server:GutLizard- Params:
(slot: number, nonce: string) - Validates nonce + cooldown.
- Requires a knife item in inventory.
- Removes source item from slot and gives
lizardmeat+lizardskin.
- Params:
metaden-outdoors:server:fillBottle- Params:
(slot: number, nonce: string) - Validates nonce + cooldown.
- Removes empty bottle from slot and gives
dirtywater.
- Params:
Network events (client)
metaden-outdoors:client:FillBottle- Params:
(slot: number) - Performs nearby-water and river-like checks client-side.
- Requests nonce and triggers server bottle fill event on success.
- Params:
metaden-outdoors:client:GutSnake- Params:
(slot: number) - Handles local gut flow and requests nonce before triggering server gut event.
- Params:
metaden-outdoors:client:GutLizard- Params:
(slot: number) - Handles local gut flow and requests nonce before triggering server gut event.
- Params:
Commands
/<Config.PlayerAnimationCommand> [setName]- No args: lists available animation sets.
- With
setName: selects that search animation set for the player. - Falls back to
Config.DefaultSearchAnimationSetwhen no player override is set.
Integration examples
1) ox_lib callback nonce → searchForMaterial (rock_pile)
lua
local lootableId = "rock_pile"
lib.callback('metaden-outdoors:server:requestNonce', false, function(nonce)
if not nonce then return end
TriggerServerEvent('metaden-outdoors:server:searchForMaterial', lootableId, nonce)
end, 'searchForMaterial')2) MetaBridge callback nonce → cookMeat
lua
local recipeName = "cookedsnake"
MetaBridgeClient.requestCallback('metaden-outdoors:server:requestNonce', function(nonce)
if not nonce then return end
TriggerServerEvent('metaden-outdoors:server:cookMeat', recipeName, nonce)
end, 'cookMeat')3) requestNonceEvent fallback example
lua
local pending = {}
RegisterNetEvent('metaden-outdoors:client:receiveNonce', function(requestId, nonce)
local resume = pending[requestId]
if not resume then return end
pending[requestId] = nil
resume(nonce)
end)
local function requestNonceFallback(action, cb)
local requestId = ('%s:%d'):format(action, GetGameTimer())
pending[requestId] = cb
TriggerServerEvent('metaden-outdoors:server:requestNonceEvent', action, requestId)
end
requestNonceFallback('searchForMaterial', function(nonce)
if not nonce then return end
TriggerServerEvent('metaden-outdoors:server:searchForMaterial', 'rock_pile', nonce)
end)4) Canonical Config.Lootables id usage
lua
Config.Lootables = {
{
id = "rock_pile",
enabled = true,
props = { "prop_rock_1_a" }
},
{
id = "fallen_log",
enabled = true,
props = { "prop_log_01" }
}
}
local chosenLootableId = "rock_pile"
TriggerServerEvent('metaden-outdoors:server:searchForMaterial', chosenLootableId, nonce)5) ox_inventory item action → client FillBottle
lua
exports('empty_bottle', function(event, item, inventory, slot)
if event ~= 'usingItem' then return end
TriggerEvent('metaden-outdoors:client:FillBottle', slot)
end)Lifecycle hooks
QBCore:Client:OnPlayerLoaded→ initializes all target interactions.playerSpawned(client) → primes skill state.onResourceStart(current resource) → initializes targets and primes skill state.onResourceStart(metaden-skills) → re-primes skill state.playerDropped(server) → clears cooldown and nonce state.
External events triggered by this resource
ian-health:server:IncreaseDirty(after cooking)ian-health:server:increaseStress(after yoga)
Skills integration
- Cooking XP is granted through
exports['metaden-skills']:AddExperience(identifier, 'cooking', amount)on successful cooking. - When
Config.UseMetaDenSkills = true, cooking menu progression reads current cooking XP throughmetaden-outdoors:server:requestCookingSkillDataand unlocks recipes byrecipe.cookingthreshold.
External APIs Used
metabridge
Used through MetaBridge/MetaBridgeClient or fallback exports:
requestCallbackregisterCallbackaddTargetModelgetItemImagegetItemLabelgetItemCountremoveItemaddItemgetItemFromSlotnotifyprogressBarregisterContextshowContext
GTA natives (direct animation)
TaskStartScenarioInPlaceTaskPlayAnimClearPedTasksClearPedSecondaryTaskClearPedTasksImmediately
