Safe Zone air vehicles whitelist, updated holograms and scripts.
+ Updated Safe-Zones to whitelist air vehicles from being stopped. + Latest version of wl_wars2x police radar. + Updated weapon restrictions. + Fire-Scripts updated to latest version.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
--================================--
|
||||
-- FIRE SCRIPT v1.7.3 --
|
||||
-- FIRE SCRIPT v1.7.6 --
|
||||
-- by GIMI (+ foregz, Albo1125) --
|
||||
-- License: GNU GPL 3.0 --
|
||||
--================================--
|
||||
@@ -41,11 +41,11 @@ function Fire:create(coords, maximumSpread, spreadChance)
|
||||
while spread do
|
||||
Citizen.Wait(2000)
|
||||
local index, flames = highestIndex(self.active, fireIndex)
|
||||
if flames ~= 0 and flames <= maximumSpread then
|
||||
if flames ~= 0 and flames <= maximumSpread and self.active[fireIndex] ~= nil then
|
||||
for k, v in ipairs(self.active[fireIndex]) do
|
||||
index, flames = highestIndex(self.active, fireIndex)
|
||||
local rndSpread = math.random(100)
|
||||
if count ~= 0 and flames <= maximumSpread and rndSpread <= spreadChance then
|
||||
if flames <= maximumSpread and rndSpread <= spreadChance then
|
||||
local x = self.active[fireIndex][k].x
|
||||
local y = self.active[fireIndex][k].y
|
||||
local z = self.active[fireIndex][k].z
|
||||
@@ -56,9 +56,12 @@ function Fire:create(coords, maximumSpread, spreadChance)
|
||||
coords = vector3(x + xSpread, y + ySpread, z)
|
||||
|
||||
self:createFlame(fireIndex, coords)
|
||||
elseif flames > maximumSpread then
|
||||
spread = false
|
||||
break
|
||||
end
|
||||
end
|
||||
elseif flames == 0 then
|
||||
elseif flames == 0 or self.active[fireIndex] == nil then
|
||||
break
|
||||
end
|
||||
end
|
||||
@@ -101,14 +104,8 @@ end
|
||||
function Fire:removeFlame(fireIndex, flameIndex)
|
||||
if self.active[fireIndex] and self.active[fireIndex][flameIndex] then
|
||||
self.active[fireIndex][flameIndex] = nil
|
||||
if type(next(self.active[fireIndex])) == "string" and self.activeBinds[fireIndex] then
|
||||
self.binds[self.activeBinds[fireIndex]][fireIndex] = nil
|
||||
|
||||
if self.activeBinds[fireIndex] == self.currentRandom and next(self.binds[self.activeBinds[fireIndex]]) == nil then
|
||||
self.currentRandom = nil
|
||||
end
|
||||
|
||||
self.activeBinds[fireIndex] = nil
|
||||
if type(next(self.active[fireIndex])) == "string" then
|
||||
self:remove(fireIndex)
|
||||
end
|
||||
end
|
||||
TriggerClientEvent('fireClient:removeFlame', -1, fireIndex, flameIndex)
|
||||
@@ -122,6 +119,7 @@ function Fire:removeAll()
|
||||
end
|
||||
end
|
||||
self.active = {}
|
||||
self.activeBinds = {}
|
||||
self.binds = {}
|
||||
self.currentRandom = nil
|
||||
end
|
||||
@@ -164,9 +162,13 @@ function Fire:startRegistered(registeredFireID, triggerDispatch, dispatchPlayer)
|
||||
Config.Dispatch.timeout,
|
||||
function()
|
||||
if Config.Dispatch.enabled then
|
||||
Dispatch.expectingInfo[dispatchPlayer] = true
|
||||
if self.registered[registeredFireID].message ~= nil then
|
||||
Dispatch:create(self.registered[registeredFireID].message, dispatchCoords)
|
||||
else
|
||||
Dispatch.expectingInfo[dispatchPlayer] = true
|
||||
TriggerClientEvent('fd:dispatch', dispatchPlayer, dispatchCoords)
|
||||
end
|
||||
end
|
||||
TriggerClientEvent('fd:dispatch', dispatchPlayer, dispatchCoords)
|
||||
end
|
||||
)
|
||||
end
|
||||
@@ -308,6 +310,7 @@ end
|
||||
|
||||
function Fire:loadRegistered()
|
||||
local firesFile = loadData("fires")
|
||||
self.random = {}
|
||||
if firesFile ~= nil then
|
||||
for index, fire in pairs(firesFile) do
|
||||
for _, flame in pairs(fire.flames) do
|
||||
@@ -316,22 +319,12 @@ function Fire:loadRegistered()
|
||||
if fire.dispatchCoords then
|
||||
fire.dispatchCoords = vector3(fire.dispatchCoords.x, fire.dispatchCoords.y, fire.dispatchCoords.z)
|
||||
end
|
||||
if fire.random == true then
|
||||
self.random[index] = true
|
||||
end
|
||||
end
|
||||
self.registered = firesFile
|
||||
self:updateRandom()
|
||||
else
|
||||
saveData({}, "fires")
|
||||
end
|
||||
end
|
||||
|
||||
function Fire:updateRandom() -- Creates a table containing all fires with random flag enabled
|
||||
self.random = {}
|
||||
if not (self.registered and next(self.registered) ~= nil) then
|
||||
return
|
||||
end
|
||||
for k, v in pairs(self.registered) do
|
||||
if v.random == true then
|
||||
self.random[k] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user