gimicze / firescript

OneSync Infinity compatible fire script for FiveM.
https://forum.cfx.re/t/release-fire-script-onesync/1751606
GNU General Public License v3.0
87 stars 35 forks source link

ESX Legacy, Random Fires / Dispatch is not working. #18

Closed ItsVinnyX closed 10 months ago

ItsVinnyX commented 2 years ago

Describe the bug Dispatch doesn't appear. I would like to also use these alerts for dispatch if possible... https://github.com/thelindat/linden_outlawalert

Using fresh install.

Expected behavior Dispatch should appear in chat. If you could show me how to get it working withhttps://github.com/thelindat/linden_outlawalert that would be awesome.

Screenshots Also, what is this? image

Server (please complete the following information):

ItsVinnyX commented 2 years ago

Also, fires are not appearing when spawned for players.

gimicze commented 2 years ago

I would like to also use these alerts for dispatch if possible...

You may edit the code to your liking and needs, I won't do this though oficially as I don't really have time to even maintain my repositories.

Here's the part you might be interested in should you try to achieve this yourself (the link only leads to the first line of the segment I mean): https://github.com/gimicze/firescript/blob/bda2fd33e82edf1f899f90f09667b1737cb1c2d8/server/fire.lua#L159

Dispatch should appear in chat.

Could you provide your config.lua file, quoted in a code block? It's likely that you don't get dispatch messages simply because it isn't set up properly, as they work just fine on my local test server.

Also, which version of ESX are you using? (I assume you are referring to v1-final?)

EDIT (almost forgot):

Also, what is this?

This only happens if you restart the script while you're connected on the server. You don't have to worry about it - nothing's wrong.

ItsVinnyX commented 2 years ago

I would like to also use these alerts for dispatch if possible...

You may edit the code to your liking and needs, I won't do this though oficially as I don't really have time to even maintain my repositories.

Here's the part you might be interested in should you try to achieve this yourself (the link only leads to the first line of the segment I mean):

https://github.com/gimicze/firescript/blob/bda2fd33e82edf1f899f90f09667b1737cb1c2d8/server/fire.lua#L159

Dispatch should appear in chat.

Could you provide your config.lua file, quoted in a code block? It's likely that you don't get dispatch messages simply because it isn't set up properly, as they work just fine on my local test server.

Also, which version of ESX are you using? (I assume you are referring to v1-final?)

EDIT (almost forgot):

Also, what is this?

This only happens if you restart the script while you're connected on the server. You don't have to worry about it - nothing's wrong.

I am using ESX Legacy.

Here is my config.lua


--       FIRE SCRIPT v1.7.6       --
--  by GIMI (+ foregz, Albo1125)  --
--      License: GNU GPL 3.0      --
--================================--

Config = {}

Config.Fire = {
    fireSpreadChance = 10, -- Out of 100 chances, how many lead to fire spreading? (not exactly percents)
    maximumSpreads = 35,
    spawner = { -- Requires the use of the built-in dispatch system
        enableOnStartup = true,
        interval = 1800000, -- Random fire spawn interval (set to nil or false if you don't want to spawn random fires) in ms 1800000 (30 Minutes)
        chance = 100, -- Fire spawn chance (out of 100 chances, how many lead to spawning a fire?); Set to values between 1-100
        players = 3, -- Sets the minimum number of players subscribed to dispatch for the spawner to spawn fires.
        firefighterJobs = { -- If using ESX (Config.Dispatch.enableESX), you can specify which players will count as firefighters in Config.Fire.spawner.players above; If not using ESX you can set this to nil
            ["ambulance"] = true -- Always set the job name in the key, value has to be true
        }
    }
}

Config.Dispatch = {
    enabled = true, -- Set this to false if you don't want to use the default dispatch system
    timeout = 6500, -- The amount of time in ms to delay the dispatch after the fire has been created
    storeLast = 5, -- The client will store the last five dispatch coordinates for use with /remindme <dispatchNumber>
    clearGpsRadius = 20.0, -- If you don't want to automatically clear the route upon arrival, leave this to false
    removeBlipTimeout = 400000, -- The amount of time in ms after which the dispatch call blip will be automatically removed
    playSound = true,
    enableESX = {'ambulance', 'police'} -- Set to a ESX job / jobs you want to be automatically subscribed to dispatch; Set to nil or false if you don't want to use this
}```
gimicze commented 2 years ago

Thank you for the config.

I suppose there aren't any errors in console from the script? (Both server and client)

Your config seems to be fine. Could you try subscribing yourself to dispatch manually using /firedispatch add <your server ID> and see if you get the dispatch messages then?

Also, what do you mean by the second message in this issue?

ItsVinnyX commented 2 years ago

Thank you for the config.

I suppose there aren't any errors in console from the script? (Both server and client)

Your config seems to be fine. Could you try subscribing yourself to dispatch manually using /firedispatch add <your server ID> and see if you get the dispatch messages then?

Also, what do you mean by the second message in this issue? It works but not all the time, with no errors. Sometimes it'll dispatch but others not.

gimicze commented 1 year ago

This may have been resolved by 242593f2bea0068dd955202cfb0922f7a1d36694