DIXIELAND WIRD GELADEN SICHTBARE GRAFIKEN WERDEN VORBEREITET
Sichtbare Grafiken werden gesucht …0%
COMMUNITY FORUM

[QBCore] Thermalvision benutzbar machen!

FiveM › FiveM Codingbereich · 0 Antworten · 44 Aufrufe

FORUM FiveM FiveM Codingbereich[QBCore] Thermalvision benutzbar machen!
← ZUR KATEGORIE
STARTBEITRAG
Eingebundenes Bild




Ö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
ANTWORTEN

DEINE ANTWORT

Zum Antworten musst du dich mit Discord anmelden. Danach werden die Antwortrechte dieses Bereichs anhand deiner Discord-Rollen geprüft.

MIT DISCORD ANMELDEN