Files
Elite-Gaming-FiveM/resources/SmartFires/cl_exports.lua
T
KingMcDonalds 1d8db21f18 fixing mlopd
2026-03-28 00:24:08 -07:00

59 lines
1.3 KiB
Lua

function IsFireNearby(range)
if range == nil then range = 15.0 end
for k, v in pairs(fires) do
local coords = GetEntityCoords(PlayerPedId())
if v.active then
local distance = #(coords - v.coords)
if distance < range then
return true
end
end
end
return false
end
exports("IsFireNearby", IsFireNearby)
function IsSmokeNearby(range)
if range == nil then range = 15.0 end
for k, v in pairs(smoke) do
local coords = GetEntityCoords(PlayerPedId())
if v.active then
local distance = #(coords - v.coords)
if distance < range then
return true
end
end
end
return false
end
exports("IsSmokeNearby", IsSmokeNearby)
-- This will only work if you are using HoseLS (or an alternative hose)
-- This will not work if you are using SmartHose, our paid hose
function SetFoamEnabled(enabled)
foam = enabled
end
exports("SetFoam", SetFoamEnabled)
function IsFireStillActive(id)
if fires[id] ~= nil then
return true
end
end
exports("IsFireStillActive", IsFireStillActive)
function GetAllFires()
return fires
end
exports("GetAllFires", GetAllFires)
function GetAllSmokes()
return smoke
end
exports("GetAllSmokes", GetAllSmokes)