diff --git a/resources/[inventory]/nordi_hookah/client.lua b/resources/[inventory]/nordi_hookah/client.lua index 827e8ee76..396d93c95 100644 --- a/resources/[inventory]/nordi_hookah/client.lua +++ b/resources/[inventory]/nordi_hookah/client.lua @@ -159,49 +159,23 @@ function PrepareShisha(selectedShisha) end) end --- Smoke shisha function with animation and prop +-- Smoke shisha function with only animation (no prop) function SmokeShisha(selectedShisha) local ped = PlayerPedId() - local propName = "v_corp_lngestoolfd" -- Dieses Modell wird von irgendwo auf dem Server geladen - local propBone = 18905 -- Rechte Hand - -- Angepasste Position und Rotation für bessere Platzierung - local propCoords = vector3(0.10, 0.03, 0.05) - local propRotation = vector3(100.0, 0.0, 40.0) - - -- Bessere Rauch-Animation - local animDict = "timetable@gardener@smoking_joint" - local animName = "smoke_idle" - - -- Request model and animation - RequestModel(GetHashKey(propName)) - while not HasModelLoaded(GetHashKey(propName)) do - Wait(0) - end + -- Rauch-Animation ohne Prop + local animDict = "amb@world_human_aa_smoke@male@idle_a" + local animName = "idle_c" + -- Request animation RequestAnimDict(animDict) while not HasAnimDictLoaded(animDict) do Wait(0) end - -- Create and attach prop - local prop = CreateObject(GetHashKey(propName), 0.0, 0.0, 0.0, true, true, true) - AttachEntityToEntity(prop, ped, GetPedBoneIndex(ped, propBone), propCoords.x, propCoords.y, propCoords.z, propRotation.x, propRotation.y, propRotation.z, true, true, false, true, 1, true) - -- Play animation TaskPlayAnim(ped, animDict, animName, 8.0, -8.0, -1, 49, 0, false, false, false) - -- Füge Raucheffekt hinzu - local smokeParticle = "exp_grd_bzgas_smoke" - RequestNamedPtfxAsset("core") - while not HasNamedPtfxAssetLoaded("core") do - Wait(0) - end - - UseParticleFxAssetNextCall("core") - local smoke = StartParticleFxLoopedOnEntityBone(smokeParticle, prop, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, GetEntityBoneIndexByName(prop, "ATTACH_POINT"), 0.05, false, false, false) - SetParticleFxLoopedAlpha(smoke, 0.3) - -- Progress bar for smoking QBCore.Functions.Progressbar("smoke_shisha", selectedShisha.label.." rauchen...", Config.SmokeTime or 30000, false, true, { disableMovement = false, @@ -209,10 +183,8 @@ function SmokeShisha(selectedShisha) disableMouse = false, disableCombat = true, }, {}, {}, {}, function() -- Success - -- Clean up animation and prop + -- Clean up animation ClearPedTasks(ped) - DeleteObject(prop) - StopParticleFxLooped(smoke, 0) -- Apply effects after smoking is complete TriggerEvent("evidence:client:SetStatus", "weedsmell", 300) @@ -221,12 +193,9 @@ function SmokeShisha(selectedShisha) end, function() -- Cancelled -- Clean up if cancelled ClearPedTasks(ped) - DeleteObject(prop) - StopParticleFxLooped(smoke, 0) end) end - -- Debug Event RegisterNetEvent('shisha-script:debug') AddEventHandler('shisha-script:debug', function(msg)