
Öffne qb-core/shared.lua und füge bei Items folgendes hinzu
['thermalvision']= {['name'] = 'thermalvision',
['label'] = 'Thermal Vision',
['weight'] = 100,
['type'] = 'item',
['image'] = 'thermalvision.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'thermalvision.'},Öffne qb-smallresources/client/consumables.lua und füge folgendes hinzu
function loadAnimDict(dict)
while (not HasAnimDictLoaded(dict)) do
RequestAnimDict(dict)
Wait(5)
end
end
function EquipThermalVision()
loadAnimDict("anim@mp_helmets@on_foot")
TaskPlayAnim(PlayerPedId(), "anim@mp_helmets@on_foot", "try_shirt_positive_d", 8.0, 1.0, -1, 49, 0, 0, 0, 0)
SetTimeout(400, function()
ClearPedTasks(PlayerPedId())
end)
end
RegisterNetEvent('consumables:client:useThermalVision', function()
EquipThermalVision()
if IsNightvisionActive() then
SetNightvision(false)
SetSeethrough(false)
else
SetNightvision(true)
SetSeethrough(true)
end
end)Öffne qb-smallresources/server/consumables.lua und füge folgendes hinzu
QBCore.Functions.CreateUseableItem("thermalvision", function(source, item)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
TriggerClientEvent("consumables:client:useThermalVision", src, item.name)
end)Zuletzt bearbeitet von franky · 27.08.2026, 18:16 Uhr
