Skip to content

Commit

Permalink
Added fire
Browse files Browse the repository at this point in the history
& and other things
  • Loading branch information
Reicito committed Mar 4, 2021
1 parent 01f90ee commit 33efce3
Showing 1 changed file with 73 additions and 1 deletion.
74 changes: 73 additions & 1 deletion mood.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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")

Expand All @@ -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
Expand Down

0 comments on commit 33efce3

Please sign in to comment.