Hey there!
We found this script for fire from @Deziel0495. https://forum.cfx.re/t/release-meth-lab-fire/6821
So, now we’re looking for a script or help with a script that can STOP the script fires.
We’ve seen RemoveScriptFire(fireHandle), but what is the “fireHandle” part???
We’ve tried stopFireInRange(x, y, z, radius), but it doesn’t work.
All we have for starting the fire is StartScriptFire (x, y, z, 25, true). Still learning scripting and have no idea what the “fireHandle” would be. The other you posted didn’t work either :-/ (Thanks for responding, btw!!!)
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local Fire = nil
if IsControlPressed(1, 38) then
Fire = StartScriptFire (-800.0, -3002.0, 13.0, 25, true)
Citizen.Trace("value :" ..Fire)
end
if IsControlPressed(1, 28) then
RemoveScriptFire(Fire)
end
end
end)
I attempted the script you posted with the “RemoveScriptFire(Fire)” but the fire still will not go away.
Here is what i got so far - for testing:
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
local Fire = nil
if (GetClockHours() == 20 and GetClockMinutes() == 0 and GetClockSeconds() > 5 and GetClockSeconds() < 7) then
Fire = StartScriptFire(1420.16, 3611.53, 38.0179, 25, true)
Citizen.Trace(“value :” …Fire)
end
if (GetClockHours() == 20 and GetClockMinutes() == 1 and GetClockSeconds() > 10 and GetClockSeconds() < 50) then
RemoveScriptFire(Fire)
end
end
end)
Fire = {}
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlPressed(1, 38) then
table.insert(Fire,StartScriptFire (1420.16, 3611.53, 38.0179, 25, true))
end
if IsControlPressed(1, 27) then
for i=1,#Fire do
Citizen.Trace("RemoveScriptFire ! " .. Fire[i])
RemoveScriptFire(Fire[i])
end
Fire = {}
end
end
end)
Should not put it in a while but in an event you call that when you want to add lights in a while its add loop with a key if no you will lose id of the fire
Fire = {}
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsControlPressed(1, 38) then
table.insert(Fire,StartScriptFire (1420.16, 3611.53, 38.0179, 25, true))
end
if IsControlPressed(1, 27) then
for i=1,fire do
Citizen.Trace("RemoveScriptFire ! " … Fire[i])
RemoveScriptFire(Fire[i])
end
Fire = {}
end
end