From 33efce3281b16a5e1efe7a4947960bcb1fced567 Mon Sep 17 00:00:00 2001 From: Reicito Date: Thu, 4 Mar 2021 00:48:27 -0500 Subject: [PATCH] Added fire & and other things --- mood.lua | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/mood.lua b/mood.lua index 6c1a5e9..fd734c6 100644 --- a/mood.lua +++ b/mood.lua @@ -10,6 +10,14 @@ AddEventHandler('populationPedCreating', function(x, y, z, model, overrideCalls) overrideCalls.setModel(71929310) --clown model hash disables peds? wtf end) + + +local fireIntensity = 5.0 + +local fireOffsetX = 870.97 +local fireOffsetY = -527.44 +local fireOffsetZ = 57.0 + Citizen.CreateThread(function() while true do Citizen.Wait(0) @@ -25,13 +33,26 @@ Citizen.CreateThread(function() SetPedShootRate(GetPlayerPed(-1), 0) DisableFirstPersonCamThisFrame() + + --Fire glows + DrawLightWithRangeAndShadow( + fireOffsetX, --X + fireOffsetY, --Y + fireOffsetZ, --Z + 255, --RED + 60, --GREEN + 5, --BLUE + 5.00, --RANGE + fireIntensity, --INTENSITY + 50.00) --SHADOW + end end) Citizen.CreateThread(function() while true do Citizen.Wait(100) - + -- Disable ambient sounds StartAudioScene("CHARACTER_CHANGE_IN_SKY_SCENE") @@ -58,6 +79,57 @@ Citizen.CreateThread(function() end end) +local fireCoords = vec3(878.30, -512.88, 59.00) + +Citizen.CreateThread(function() + while true do + Citizen.Wait(100) + + fireOffsetX = fireCoords.x+math.random()*1 + + fireOffsetY = fireCoords.y+math.random()*1 + + fireOffsetZ = fireCoords.z+math.random()*1 + + fireIntensity = 3+math.random()*1 + + end +end) + + + + +function CreateFire() + + local particleDictionary = "core" + local particleName = "fire_wrecked_car" + + + RequestNamedPtfxAsset(particleDictionary) + + while not HasNamedPtfxAssetLoaded(particleDictionary) do + Citizen.Wait(0) + end + + UseParticleFxAssetNextCall(particleDictionary) + + StartParticleFxLoopedAtCoord(particleName, fireCoords, 0.00, 0.00, 0.00, 1.00, 0, 0, 0, 0) + + StartScriptFire(fireCoords, 25, false) + +end + +CreateFire() + +Citizen.CreateThread(function() + while true do + Citizen.Wait(1000) + --StartParticleFxLoopedAtCoord("fire_wrecked_car", 870.97, -527.44, 56.89, 0.0, 0.0, 0.0, 100.0, false, false, false, 0) + --StartScriptFire(870.97, -527.44, 56.89, 25, false) + + end +end) + function UpdateMood( newMood ) currentMood = newMood