The Wildlife Hunting & Dynamic Market Fivem Resource immerses players in the wilds of Los Santos, where they can hunt the diverse wildlife for their valuable meat and pelts.
These animal products can then be sold using the dynamic in-game market, or players can hold on to them until the market is in their favor for even more profit, providing additional roleplay opportunities for those who wish to immerse themselves in the virtual economy.
Immersive Island-Wide Hunting: Players can experience immersive hunting anywhere on the island, collecting meats and pelts from a large diverse list of the locally spawning wildlife.
Skill Progression: Developers can implement their servers leveling system to allow players to level up their hunting skills to increase the chances of obtaining high-quality pelts from their kills.
SafetyFeature: Developers can enable a âsafetyâ mode for a specified hunting weapon, which will disable its ability to shoot and deal damage unless itâs aimed at an animal, allowing players to get access to a weapon without having to worry about them using them against players.
Dynamic In-Game Economy: A responsive market system ensures that as animal products are sold, their value decreases to prevent repetitive grinding, encouraging player to diverse their hunting plans.
Performance Optimization: This resource operates efficiently, running only when needed, and isnât excessively performance intensive.
Note: This resource does not spawn any peds, players hunt the local animal peds that are spawned naturally by the game, if none are spawning you may have a resource or custom map blocking them from spawning.
Customizable
The resource has been built from the ground up to be easily customizable, both the escrow and non-escrow versions. This customizability includes all framework-dependent features, notifications, locations, negative/positive market effects, and more.
This resource also utilizes a built-in version of DCLS, a dynamic client localization system that allows for better player accessibility.
looks good. does the resource create the animals itself or does it use the ones that the server spawned? if the latter, then they are generated very quickly. If a player knocks down animals with transport, will he be able to get items from them?
looks good. does the resource create the animals itself or does it use the ones that the server spawned?
The resource doesnât spawn any peds, players hunt the naturally spawning peds that are created by the game automatically.
If a player knocks down animals with transport, will he be able to get items from them?
The resource has a specific check to make sure the animal hasnât been killed by getting rammed or run over by a vehicle, if it has it wonât reward the player with any items and will inform them that âThe animal is far too damaged to get any sellable productsâ.
It doesnât include out of the box support for qs-inventory, but the server config is setup to allow you to easily add compatibility. Iâve included a snippet of the functions that are defined in the server config so you can see how itâs setup by default.
Server config snippet
-- Function to get the count of an item in a player's inventory (server side)
Config.GetItemCount = function(source, item)
-- For ESX
if ESX then
local xPlayer = ESX.GetPlayerFromId(source)
if not xPlayer then return 0 end
local item = xPlayer.getInventoryItem(item)
return item and item.count or 0
-- For QBCore
elseif QBCore then
local Player = QBCore.Functions.GetPlayer(source)
if not Player then return 0 end
local item = Player.Functions.GetItemByName(item)
return item and item.amount or 0
-- For custom framework
else
return 0
end
end
-- Function to remove an item from a player's inventory
Config.RemoveItem = function(source, item, amount)
if not amount or amount <= 0 then return end
-- For ESX
if ESX then
local xPlayer = ESX.GetPlayerFromId(source)
if not xPlayer then return false end
xPlayer.removeInventoryItem(item, amount)
return true
-- For QBCore
elseif QBCore then
local Player = QBCore.Functions.GetPlayer(source)
if not Player then return false end
Player.Functions.RemoveItem(item, amount)
return true
-- For custom framework
else
return true
end
end
-- Function to check if the player can carry an item
Config.CanCarryItem = function(source, item, amount)
if not amount or amount <= 0 then return false end
-- For ESX
if ESX then
local xPlayer = ESX.GetPlayerFromId(source)
if not xPlayer then return false end
return xPlayer.canCarryItem(item, amount)
-- For QBCore
elseif QBCore then
return true -- QBCore auto checks this in the add item function
-- For custom framework
else
return true
end
end
-- Function to give an item to a player
Config.AddItem = function(source, item, amount)
if not amount or amount <= 0 then return end
-- For ESX
if ESX then
local xPlayer = ESX.GetPlayerFromId(source)
if not xPlayer then return false end
xPlayer.addInventoryItem(item, amount)
return true
-- For QBCore
elseif QBCore then
local Player = QBCore.Functions.GetPlayer(source)
if not Player then return false end
Player.Functions.AddItem(item, amount)
return true
-- For custom framework
else
return true
end
end