Accessible files
Here you can find all the files which can be edite to make the asset compatible with your server.
config.lua
----------------------------------------------------------------------------------------------
-------------------------------------| BRUTAL HUNTING :) |------------------------------------
----------------------------------------------------------------------------------------------
--[[
Hi, thank you for buying our script, We are very grateful!
For help join our Discord server: https://discord.gg/85u2u5c8q9
More informations about the script: https://docs.brutalscripts.com
--]]
Config = {
Core = 'ESX', -- ESX / QBCORE | Other core setting on the 'core' folder and the client and server utils.lua
Target = 'default', -- 'default' / 'oxtarget' / 'qb-target'
BrutalNotify = true, -- Buy here: (4€+VAT) https://store.brutalscripts.com | Or set up your own notify >> cl_utils.lua
BrutalKeys = true, -- Buy here: (15€+VAT) https://store.brutalscripts.com | Or set up your own if you're using a different vehicle key >> cl_utils.lua
LocallyInvisible = true, -- true or false | If your ANTICHEAT ban the player with 'Invisible' reason, set to false!
SkinningKnifes = {'WEAPON_KNIFE', 'WEAPON_SWITCHBLADE', 'WEAPON_DAGGER'}, -- Weapon that must be in the player's hand during the loot
HunterSwitchCommand = 'hunterswitch', -- Command to player switch between the hunter types | Legal / Illegal
WeaponAnimation = true, -- If your server has preemption/unload weapon animation, set this to true.
TimeFormat = '%d/%m/%Y',
HunterLicence = {Use = true, Command = 'hlicence'}, -- Hunter licence card open command
UndoHunterLicence = {Use = true, Command = 'uhl', CopJobs ={'police', 'sheriff'}}, -- For cops to undo player hunter licence
Hunter = {
Model = 'cs_hunter', -- Hunter npc model
Coords = vector4(471.2939, 2607.4661, 44.4772, 7.8951), -- Hunter npc coords
CarSpawn = vector4(462.9324, 2607.1968, 43.2730, 359.6967), -- Car spawn place
CarModel = "sadler", -- We used this vehicle in the video: https://www.gta5-mods.com/vehicles/jeep-wrangler-unlimited-jk-2013-add-on-tuning
CarDepositAmount = 1000, -- Car deposit money amount (0 = off)
Blip = {use = true, label = 'Hunter', size = 1.0, sprite = 141, color = 44},
CarBlip = {use = true, label = 'Hunter Car', size = 0.7, sprite = 227, color = 24},
},
HuntingAreas = {
[1] = {
Coords = vector4(-574.0483, 4899.7842, 170.6186, 229.7645),
Animals = {
vector3(-407.8195, 4966.6255, 176.2681),
vector3(-600.4664, 5068.8169, 135.6393),
vector3(-682.3632, 4985.8433, 175.9928),
vector3(-665.5093, 4839.5254, 209.6504),
vector3(-526.8015, 4876.8916, 170.3767),
vector3(-595.7777, 4833.8965, 189.3171),
vector3(-608.4785, 4983.2363, 141.0815),
vector3(-628.8176, 5096.6523, 130.8865),
vector3(-597.4748, 4864.7163, 187.7305),
},
Radius = 300.0,
ZoneBlip = {use = true, color = 68, label = 'Hunting Zone', size = 0.8, sprite = 141 },
RadiusBlip = {use = true, color = 47, alpha = 200},
AnimalBlip = {use = true, color = 0, size = 0.65, sprite = 128},
},
-- You can add more...
},
Animals = {
-- Legal Animals
[1] = {
Model = "a_c_rabbit_01",
Label = "Rabbit",
Type = 'legal',
XP = 1,
Items = {
{item = "leather", label = 'Leather', amount = {min = 1, max = 2}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
{item = "meat", label = 'Meat', amount = {min = 1, max = 2}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
}
},
[2] = {
Model = "a_c_chickenhawk",
Label = "Chicken Hawk",
Type = 'legal',
XP = 1,
Items = {
{item = "feather", label = 'Feather', amount = {min = 1, max = 2}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
{item = "meat", label = 'Meat', amount = {min = 1, max = 2}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
}
},
[3] = {
Model = "a_c_cormorant",
Label = "Cormorant",
Type = 'legal',
XP = 1,
Items = {
{item = "feather", label = 'Feather', amount = {min = 1, max = 3}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
{item = "meat", label = 'Meat', amount = {min = 2, max = 3}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
}
},
[4] = {
Model = "a_c_boar",
Label = "Wild boar",
Type = 'legal',
XP = 2,
Items = {
{item = "leather", label = 'Leather', amount = {min = 2, max = 4}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
{item = "meat", label = 'Meat', amount = {min = 3, max = 5}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
}
},
-- Illegal Animals
[5] = {
Model = "a_c_coyote",
Label = "Coyote",
Type = 'illegal',
XP = 2,
Items = {
{item = "coyote_leather", label = 'Coyote Leather', amount = {min = 2, max = 4}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
{item = "meat", label = 'Meat', amount = {min = 2, max = 4}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
}
},
[6] = {
Model = "a_c_panther",
Label = "Panther",
Type = 'illegal',
XP = 4,
Items = {
{item = "panther_leather", label = 'Panther Leather', amount = {min = 2, max = 4}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
{item = "meat", label = 'Meat', amount = {min = 2, max = 4}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
}
},
[7] = {
Model = "a_c_deer",
Label = "Wild deer",
Type = 'illegal',
XP = 3,
Items = {
{item = "leather", label = 'Leather', amount = {min = 3, max = 6}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
{item = "meat", label = 'Meat', amount = {min = 3, max = 6}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
{item = "antler", label = 'Antler', amount = {min = 1, max = 1}, chance = {['bad'] = 40, ['good'] = 60, ['perfect'] = 80}},
}
},
-- You can add more...
},
LevelSystem = {
[1] = {
LevelUP = 30,
NewAnimal = {7000, 15000},
LootTime = {8000, 12000},
Animals = {1,2,3},
},
[2] = {
LevelUP = 60,
NewAnimal = {6000, 13000},
LootTime = {7000, 11000},
Animals = {1,2,3,4},
},
[3] = {
LevelUP = 120,
NewAnimal = {5000, 11000},
LootTime = {6000, 10000},
Animals = {1,2,3,4,5},
},
[4] = {
LevelUP = 240,
NewAnimal = {4000, 9000},
LootTime = {5000, 9000},
Animals = {3,4,5,7},
},
[5] = {
LevelUP = 0,
NewAnimal = {3000, 8000},
LootTime = {5000, 8000},
Animals = {4,5,6,7},
},
-- You can add more levels with specific configuration
},
ShopItems = {
-- You can't give the same Item to two different Items in the shop
[1] = {item = 'weapon_knife', label = 'Skinning Knife', price = 100},
[2] = {item = 'weapon_switchblade', label = 'Switchblade', price = 120},
[3] = {item = 'weapon_pistol', label = 'Pistol', price = 1000},
[4] = {item = 'ammo-9', label = 'Ammo 9', price = 5},
--[5] = {item = 'weapon_sniperrifle', label = 'Hunter Sniper', price = 20000},
},
SellItems = {
Legal = {
--['ITEM'] = PRICE
['leather'] = 100,
['feather'] = 50,
['meat'] = 200
},
Illegal = {
Model = 'a_m_m_eastsa_01', -- Illegal items seller npc model
Coords = vector4(-288.3044, 6299.3696, 31.4922, 39.9611), -- Illegal items seller npc coords
Items = {
--['ITEM'] = PRICE
['antler'] = 400,
['panther_leather'] = 600,
['coyote_leather'] = 500
}
}
},
WeaponDamages = {
{category = "unarmed", type = 'bad'},
{category = "melee", type = 'bad'},
{category = "pistol", type = 'bad'},
{category = "subgun", type = 'good'},
{category = "shootgun", type = 'bad'},
{category = "rifle", type = 'good'},
{category = "snip", type = 'perfect'}
},
-----------------------------------------------------------
-----------------------| TRANSLATE |-----------------------
-----------------------------------------------------------
MoneyForm = '$',
Waiting = 'Waiting...',
Texts = {
[1] = {'To open hunting menu, press ~w~[~g~E~w~]', 38}, -- 'TEXT', 'CONTROL' Controls: https://docs.fivem.net/docs/game-references/controls/
[2] = {'To skin the animal, press ~w~[~g~E~w~]', 38},
[3] = {'Get out of the car and find an animal', 38},
[4] = {'Drive to the huntingzone', 38},
[5] = {'To sell the illegal items, press ~w~[~g~E~w~]', 38},
},
TargetTexts = { -- Open Text, Icon, Distance
[1] = {'Open Hunter Menu', 'fa-solid fa-circle-exclamation', 2},
[2] = {'Skin the Animal', 'fa-solid fa-sun', 2},
[3] = {'Sell the illegal items', 'fa-solid fa-cart-shopping', 2},
},
Notify = {
[1] = {"HUNTING", "You have to do it with you skinning knife", 5000, "error"}, -- Error = notify type, "Your pet is still alive!" = Message, 5000 = time, 5000 = 5 sec
[2] = {"HUNTING", "You got:", 6000, "success"}, -- TYPE, MESSAGE, TIME
[3] = {"HUNTING", "The animal just has run away", 6000, "info"},
[4] = {"HUNTING", "You have got the Hunting Licence!", 6000, "info"},
[5] = {"HUNTING", "Your Hunting Licence has been withdrawn!", 6000, "info"},
[6] = {"HUNTING", "You don't have Hunting Licence!", 6000, "info"},
[7] = {"HUNTING", "The vehicle spawn place isn't clear!", 6000, "info"},
[8] = {"HUNTING", "You already have a Hunting Licence!", 6000, "info"},
[9] = {"HUNTING", "Get in the car and follow the instructions.", 6000, "info"},
[10] = {"HUNTING", "You are already hunting!", 6000, "info"},
[11] = {"HUNTING", "You are already working on getting your licence!", 6000, "info"},
[12] = {"HUNTING", "You don't have any items!", 6000, "info"},
[13] = {"HUNTING", "You are not a Cop!", 6000, "error"},
[14] = {"HUNTING", "The deposit on the car has been deducted:<b>", 6000, "info"},
[15] = {"HUNTING", "You got your deposit back:<b>", 6000, "info"},
[16] = {"HUNTING", "You don't have enough money to pay the Deposit!<b>", 6000, "info"},
[17] = {"HUNTING", "<br>You spent:<b>", 6000, "info"},
[18] = {"HUNTING", "You don't have enough money!", 6000, "info"},
[19] = {"HUNTING", "Get out of the car!", 6000, "error"},
[20] = {"HUNTING", "You have already skinning the animal!", 6000, "error"},
[21] = {"HUNTING", "Drop off your vehicle at the vehicle drop-off point!", 6000, "error"},
[22] = {"HUNTING", "Successful action!", 6000, "success"},
},
}
client-utils.lua
-- Buy here: (4€+VAT) https://store.brutalscripts.com
function notification(title, text, time, type)
if Config.BrutalNotify then
exports['brutal_notify']:SendAlert(title, text, time, type)
else
-- Put here your own notify and set the Config.BrutalNotify to false
-- Default ESX Notify:
-- TriggerEvent('esx:showNotification', text)
-- Default QB Notify:
-- TriggerEvent('QBCore:Notify', text, 'primary', 5000)
-- OKOK Notify:
-- exports['okokNotify']:Alert(title, text, time, type, false)
end
end
function VehicleSpawnUtil(vehicle) -- It fills the car's tank
-- Set vehicle MAX fuel
SetVehicleFuelLevel(vehicle, 100.0)
DecorSetFloat(vehicle, "_FUEL_LEVEL", GetVehicleFuelLevel(vehicle))
-- Set vehicle color
SetVehicleExtraColours(vehicle, 0, 0)
SetVehicleColours(vehicle, 53, 53)
-- Set vehicle plate
SetVehicleNumberPlateText(vehicle, 'HUNT'..math.random(0001,9999))
-- Vehicle Keys
local plate = GetVehicleNumberPlateText(vehicle)
if Config.BrutalKeys and GetResourceState("brutal_keys") == "started" then
exports.brutal_keys:addVehicleKey(plate, plate)
end
if Config['Core']:upper() == 'QBCORE' then
TriggerEvent("vehiclekeys:client:SetOwner", GetVehicleNumberPlateText(vehicle))
end
end
function VehicleDeleteUtil(vehicle)
local plate = GetVehicleNumberPlateText(vehicle)
if Config.BrutalKeys and GetResourceState("brutal_keys") == "started" then
exports.brutal_keys:removeKey(plate, true)
end
end
function SetUnarmedWeapon()
Citizen.CreateThread(function()
while not Looted do
SetCurrentPedWeapon(PlayerPedId(), GetHashKey('WEAPON_UNARMED'), true)
Citizen.Wait(1)
end
end)
end
function PetDied(ped)
local died = false
if IsEntityDead(ped) then
died = true
end
return died
end
function OpenMenuUtil()
DisplayRadar(true)
-- Here you can add a trigger to enable your HUD system
end
function CloseMenuUtil()
DisplayRadar(false)
-- Here you can add a trigger to hide your HUD system
end
function DrawText3D(x, y, z, text)
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry("STRING")
SetTextCentre(true)
AddTextComponentString(text)
SetDrawOrigin(x,y,z, 0)
DrawText(0.0, 0.0)
local factor = (string.len(text)) / 370
DrawRect(0.0, 0.0+0.0125, 0.025+ factor, 0.03, 0, 0, 0, 75)
ClearDrawOrigin()
end
server-utils.lua
-- Buy here: (4€+VAT) https://store.brutalscripts.com
function notification(source, title, text, time, type)
if Config.BrutalNotify then
TriggerClientEvent('brutal_notify:SendAlert', source, title, text, time, type)
else
TriggerClientEvent('brutal_pets:client:DefaultNotify', text)
end
end
function PlayerNameFunction(source)
return GetPlayerName(source)
end
client-core.lua
Core = nil
if Config['Core']:upper() == 'ESX' then
local _esx_ = 'new' -- 'new' / 'old'
if _esx_ then
Core = exports['es_extended']:getSharedObject()
else
while Core == nil do
TriggerEvent('esx:getSharedObject', function(obj) Core = obj end)
Citizen.Wait(0)
end
end
LoadedEvent = 'esx:playerLoaded'
TSCB = Core.TriggerServerCallback
function PlayerJobFunction()
return Core.GetPlayerData().job.name
end
function GetClosestPlayerFunction()
return Core.Game.GetClosestPlayer()
end
elseif Config['Core']:upper() == 'QBCORE' then
Core = exports['qb-core']:GetCoreObject()
LoadedEvent = 'QBCore:Client:OnPlayerLoaded'
TSCB = Core.Functions.TriggerCallback
function PlayerJobFunction()
return Core.Functions.GetPlayerData().job.name
end
function GetClosestPlayerFunction()
return Core.Functions.GetClosestPlayer()
end
end
server-core.lua
Core = nil
if Config['Core']:upper() == 'ESX' then
local _esx_ = 'new' -- 'new' / 'old'
if _esx_ == 'new' then
Core = exports['es_extended']:getSharedObject()
else
Core = nil
TriggerEvent('esx:getSharedObject', function(obj) Core = obj end)
while Core == nil do
Citizen.Wait(0)
end
end
RESCB = Core.RegisterServerCallback
GETPFI = Core.GetPlayerFromId
RUI = Core.RegisterUsableItem
function GetIdentifier(source)
local xPlayer = GETPFI(source)
while xPlayer == nil do
Citizen.Wait(1000)
xPlayer = GETPFI(source)
end
return xPlayer.identifier
end
function GetPlayerByIdentifier(identifier)
return Core.GetPlayerFromIdentifier(identifier)
end
function GetAccountMoney(source,account)
local xPlayer = GETPFI(source)
if account == 'bank' then
return xPlayer.getAccount(account).money
elseif account == 'money' then
return xPlayer.getMoney()
end
end
function AddMoneyFunction(source, account, amount)
local xPlayer = GETPFI(source)
if account == 'bank' then
xPlayer.addAccountMoney('bank', amount)
elseif account == 'money' then
xPlayer.addMoney(amount)
end
end
function RemoveAccountMoney(source, account, amount)
local xPlayer = GETPFI(source)
if account == 'bank' then
xPlayer.removeAccountMoney('bank', amount)
elseif account == 'money' then
xPlayer.removeMoney(amount)
end
end
function GetItemCount(source, item)
local xPlayer = GETPFI(source)
if xPlayer.getInventoryItem(item) == nil then
print("^1PROBLEM!^7 The ^3" ..item.. "^7 item is not created.")
return 0
end
if _esx_ == 'new' then
return xPlayer.getInventoryItem(item).count
else
if string.sub(item, 0, 6):lower() == 'weapon' then
local loadoutNum, weapon = xPlayer.getWeapon(item:upper())
if weapon then
return true
else
return false
end
else
return xPlayer.getInventoryItem(item).count
end
end
end
function RemoveItem(source, item, amount)
local xPlayer = GETPFI(source)
if _esx_ == 'new' then
xPlayer.removeInventoryItem(item, amount)
else
if string.sub(item, 0, 6):lower() == 'weapon' then
xPlayer.removeWeapon(item)
else
xPlayer.removeInventoryItem(item, amount)
end
end
end
function AddItem(source, item, count)
local xPlayer = GETPFI(source)
if _esx_ == 'new' then
xPlayer.addInventoryItem(item, count)
else
if string.sub(item, 0, 6):lower() == 'weapon' then
xPlayer.addWeapon(item, 90)
else
xPlayer.addInventoryItem(item, count)
end
end
end
function GetPlayerNameFunction(source)
local name
if Config.SteamName then
name = GetPlayerName(source)
else
local xPlayer = GETPFI(source)
name = xPlayer.getName() or 'No Data'
end
return name
end
function GetPlayerSex(source)
local xPlayer = GETPFI(source)
return xPlayer.get("sex")
end
function GetPlayerJob(source)
local xPlayer = GETPFI(source)
return xPlayer.job.name
end
function GetPlayerInfo(source)
local xPlayer = GETPFI(source)
local PlayerName = xPlayer.getName() or 'No Data'
local BirthDate = xPlayer.get("dateofbirth")
return PlayerName, BirthDate
end
elseif Config['Core']:upper() == 'QBCORE' then
Core = exports['qb-core']:GetCoreObject()
RESCB = Core.Functions.CreateCallback
GETPFI = Core.Functions.GetPlayer
RUI = Core.Functions.CreateUseableItem
function GetIdentifier(source)
local xPlayer = GETPFI(source)
while xPlayer == nil do
Citizen.Wait(1000)
xPlayer = GETPFI(source)
end
return xPlayer.PlayerData.citizenid
end
function GetPlayerByIdentifier(identifier)
return Core.Functions.GetPlayerByCitizenId(identifier)
end
function GetPlayersFunction()
return Core.Functions.GetPlayers()
end
function GetAccountMoney(source, account)
local xPlayer = GETPFI(source)
if account == 'bank' then
return xPlayer.PlayerData.money.bank
elseif account == 'money' then
return xPlayer.PlayerData.money.cash
end
end
function AddMoneyFunction(source, account, amount)
local xPlayer = GETPFI(source)
if account == 'bank' then
xPlayer.Functions.AddMoney('bank', amount)
elseif account == 'money' then
xPlayer.Functions.AddMoney('cash', amount)
end
end
function GetItemCount(source, item)
local xPlayer = GETPFI(source)
local items = xPlayer.Functions.GetItemByName(item)
local item_count = 0
if items ~= nil then
item_count = items.amount
else
item_count = 0
end
return item_count
end
function RemoveAccountMoney(source, account, amount)
local xPlayer = GETPFI(source)
if account == 'bank' then
xPlayer.Functions.RemoveMoney('bank', amount)
elseif account == 'money' then
xPlayer.Functions.RemoveMoney('cash', amount)
end
end
function RemoveItem(source, item, amount)
local xPlayer = GETPFI(source)
xPlayer.Functions.RemoveItem(item, amount)
end
function AddItem(source, item, count)
local xPlayer = GETPFI(source)
xPlayer.Functions.AddItem(item, count)
end
function GetPlayerNameFunction(source)
local name
if Config.SteamName then
name = GetPlayerName(source)
else
local xPlayer = GETPFI(source)
name = xPlayer.PlayerData.charinfo.firstname..' '..xPlayer.PlayerData.charinfo.lastname
end
return name
end
function GetPlayerSex(source)
local xPlayer = GETPFI(source)
local sex = xPlayer.PlayerData.charinfo.gender
if sex == 0 then
sex = 'm'
else
sex = 'f'
end
return sex
end
function GetPlayerJob(source)
local xPlayer = GETPFI(source)
return xPlayer.PlayerData.job.name
end
function GetPlayerInfo(source)
local xPlayer = GETPFI(source)
local PlayerName = xPlayer.PlayerData.charinfo.firstname..' '..xPlayer.PlayerData.charinfo.lastname
local BirthDate = xPlayer.PlayerData.charinfo.birthdate
return PlayerName, BirthDate
end
end
Last updated
Was this helpful?