Editable files
Client Editable.lua
hunger, thirst, stress = 0, 0, 0
function setEngineDamage(vehicle, damage)
SetVehicleEngineHealth(vehicle, damage)
end
function playSound(name, volume)
if config.useTgiannSound then
local data = {
soundFile = name,
soundMaxVolume = volume,
}
TriggerEvent("tgiann-sounds:play-sound", data)
else
TriggerEvent('InteractSound_CL:PlayOnOne', name, volume)
end
end
function playSyncSound(entity, name, maxDistance, volume)
if config.useTgiannSound then
local data = {
entity = entity,
soundFile = name,
checkDistance = true,
maxDistance = maxDistance,
soundMaxVolume = volume,
sync = true,
}
TriggerEvent("tgiann-sounds:play-sound", data)
else
TriggerEvent('InteractSound_CL:PlayOnOne', name, volume)
end
end
exports("seatbelt", function()
return seatbelt
end)
exports("inVehicle", function()
return inVehicle
end)
if config.framework == "esx" then
-- Need Last version ESX STATUS - https://github.com/esx-framework/esx-legacy/tree/main/%5Besx_addons%5D/esx_status
AddEventHandler('esx_status:onTick', function(data)
for i=1, #data do
if data[i].name == "hunger" then
hunger = data[i].percent
elseif data[i].name == "thirst" then
thirst = data[i].percent
end
end
end)
elseif config.framework == "qb" then
RegisterNetEvent('hud:client:UpdateNeeds')
AddEventHandler('hud:client:UpdateNeeds', function(newHunger, newThirst)
hunger = newHunger / 100
thirst = newThirst / 100
end)
RegisterNetEvent('hud:client:UpdateStress')
AddEventHandler('hud:client:UpdateStress', function(newStress)
stress = newStress
end)
end
RegisterNetEvent("tgiCore:Client:OnPlayerLoaded")
AddEventHandler("tgiCore:Client:OnPlayerLoaded", function()
firstLogin()
end)
--PMA Voice Level
talkStatus = false -- value set to true by pma if player is speaking ( NetworkIsPlayerTalking(playerId) )
RegisterNetEvent('pma-voice:setTalkingMode')
AddEventHandler('pma-voice:setTalkingMode', function(lvl)
SendNUIMessage({action = 'voicelvl', lvl = lvl})
end)
if config.enableShowMoney then
RegisterKeyMapping('+showmoney'..config.showMoneyKey, config.langs[config.lang].showMoney, 'keyboard', config.showMoneyKey)
RegisterCommand('+showmoney'..config.showMoneyKey, function()
TriggerEvent("tgiann-modernHud:showmoney", true)
end)
RegisterCommand('-showmoney'..config.showMoneyKey, function()
TriggerEvent("tgiann-modernHud:showmoney", false)
end)
endClient moneyEditable.lua
Last updated