Description: Specifies which inventory management system your server uses.
Options:
"ESX": Use this if your server runs the ESX framework.
"OX": Select this for the OX framework.
"QB": Choose this for the QB framework.
"CUSTOM": Opt for a custom solution if you're using a non-standard inventory system.
StatusFramework:
Description: Determines the framework used for managing player status such as hunger and thirst.
Options:
"ESX": For servers using the ESX status management.
"QB": For servers using the QB framework.
"CUSTOM": For a custom status management solution.
PlayerLoadedEvent:
Description: Specifies the event triggered when a player loads into the server.
Options:
"esx:playerLoaded": Use this if your server runs the ESX framework.
"QBCore:Client:OnPlayerLoaded": Select this for the QB framework.
"CUSTOM": Use a custom event if your server uses a non-standard player loading process.
Item:
Description: Defines the name or ID of the smart watch item in the inventory system. This is used to reference the smart watch within the game's item management.
Options:
"watch": The default name for the smart watch item.
false: Disables the item if not required.
City:
Description: Name of your city as it will appear in the weather app on the smart watch.
Example: "Los Santos"
OpenKey:
Description: Defines the key used to open the smart watch interface.
Default: "F5"
Lowlevelnotification:
Description: Configuration settings for low-level notifications related to health, thirst, and hunger.
Fields:
sound: Enables or disables sound notifications. (true/false)
flash: Enables or disables the flashing of the smart watch screen. (true/false)
screenflash: Enables or disables the flashing of the game screen. (true/false)
TimerScreenFlashAndSound: Duration (in milliseconds) for how long the screen flash and sound will be active.
health: Threshold percentage for health below which the notification triggers. (-1 to disable)
thirst: Threshold percentage for thirst below which the notification triggers. (-1 to disable)
hunger: Threshold percentage for hunger below which the notification triggers. (-1 to disable)
weatherTypes:
Description: Contains definitions for various weather conditions, including temperature and icons for day and night.
Fields:
temp: The temperature associated with the weather type (in degrees Celsius).
dayIcon: The icon used to represent the weather during the day.
nightIcon: The icon used to represent the weather at night.
label: A descriptive label for the weather condition.
function HasItem(item)
QBCore = exports['qb-core']:GetCoreObject()
local p = promise.new()
QBCore.Functions.TriggerCallback('QBCore:HasItem', function(result)
p:resolve(result)
end, item)
return Citizen.Await(p)
end
function ItemInInventory()
if Config.Item then
local count = 0
if Config.Inventory == "OX" then
count = exports.ox_inventory:GetItemCount(Config.Item)
elseif Config.Inventory == "ESX" then
ESX = exports["es_extended"]:getSharedObject()
local inventory = ESX.GetPlayerData().inventory
if inventory ~= nil then
for i=1, #inventory, 1 do
if inventory[i].name == Config.Item then
count = inventory[i].count
end
end
end
elseif Config.Inventory == "QB" then
count = HasItem(Config.Item)
else
print("Setup custom invetory")
end
if count > 0 then
return true
end
return false
else
return true
end
end
local thirst = 0
local hunger = 0
if Config.StatusFramework == "QB" then
RegisterNetEvent('hud:client:UpdateNeeds')
AddEventHandler('hud:client:UpdateNeeds', function(newHunger, newThirst)
hunger = newHunger
thirst = newThirst
end)
end
function getplayerdata()
if Config.StatusFramework == "ESX" then
TriggerEvent('esx_status:getStatus', 'hunger', function(status)
hunger = math.floor(status.getPercent())
end)
TriggerEvent('esx_status:getStatus', 'thirst', function(status)
thirst = math.floor(status.getPercent())
end)
elseif Config.StatusFramework ~= "CUSTOM" then
print("Setup custom status framework")
end
return {thirst = thirst, hunger= hunger,armor = GetPedArmour(PlayerPedId()), health = GetEntityHealth(PlayerPedId())-100}
end
Here you can customize if you have a custom framework!