Skip to content

Commands & Usage

gimicze edited this page Oct 6, 2021 · 17 revisions

Here I'll try to explain what each of the commands available does and which arguments they need.

Whitelist system

There is a whitelist system, which specifies which players (steam IDs) can use the fire script. You can bypass the whitelist by adding ace permission firescript.all to the player's group. Should you use ESX, insert your jobs into the config and the script will do the rest for you :-)

Adding a user to the WL

/firewl <action> <playerID> Adds or removes the specified player to the WL

  • <action>: add / remove - specifies the action

  • <playerID>: int - the player ID

    Requires: command.firewl ace permission

Reloading the WL

/firewlreload Reloads the whitelist from the config (discards any in-game changes)

        Requires: command.firewlreload ace permission

/firewlsave Saves the whitelist from the game to the whitelist.json file

        Requires: command.firewlsave ace permission

Starting a fire

There are currently two options on how to create a fire.

  1. Create a fire at your location instantly.
  2. Pre-define a fire and start it later on.

Creating a fire at your location

/startfire <spread> <chance> <dispatch> Starts a fire at the issuer's location

  • <spread>: 0 - ∞ (but stay low, for the sake of the server and your machine) - how many times can the fire spread? - leave it at 0 if you only want one flame to be created.

  • <chance>: 0 - 100 - how many chances out of 100 does the fire spread? (not exactly percentage)

  • <dispatch>: true / false (default: false) - should the script trigger dispatch?

  • <dispatchMessage>: string (default: auto-generated) - sets a custom dispatch message (leave empty to generate automatically)

    Returns: fireID - Note that the identifier is required to stop one specific fire.

Pre-defining a fire (creating a scenario) and then starting it

First, we need to register a new fire configuration (scenario).

/registerscenario <x> <y> <z> Registers a new pre-defined fire (scenario)

  • <x>: int - (optional) specifies the x coordinate of dispatch call - leave empty to use your character's position
  • <y>: int - (optional) specifies the y coordinate of dispatch call - leave empty to use your character's position
  • <z>: int - (optional) specifies the z coordinate of dispatch call - leave empty to use your character's position

        Returns: scenarioID- Note that the identifier is required to stop one specific scenario.

Now, let's add some flames (sources of fire).

/addflame <scenarioID> <spread> <chance> <x> <y> <z> Adds a flame to a scenario

  • <scenarioID> - the scenario identifier

  • <spread>: 0 - ∞ (but stay low, for the sake of the server and your machine) - how many times can the flame spread?

  • <chance>: 0 - 100 - how many chances out of 100 does the flame spread? (not exactly percentage)

  • <x>: int - (optional) specifies the x coordinate of the flame - leave empty to use your character's position

  • <y>: int - (optional) specifies the y coordinate of the flame - leave empty to use your character's position

  • <z>: int - (optional) specifies the z coordinate of the flame - leave empty to use your character's position

    Returns: flameID - Note that the identifier is required to remove it from the registered fire.

You can also remove the flame from the "registered fire" by:

/removeflame <scenarioID> <flameID> Removes a flame from a scenario

  • <scenarioID>: int - the scenario identifier
  • <flameID>: int - the flame identifier

Finally, let's start the fire.

/startscenario <scenarioID> <triggerDispatch> Starts a scenario

  • <scenarioID>: int - the scenario identifier
  • <triggerDispatch>: true / false (default: false) - should the script trigger dispatch when the fire gets started? (dispatch coords will be set to the coords where the fire was registered)

Don't need the configuration anymore? Let's remove it!

/removescenario <scenarioID> Removes a scenario

  • <scenarioID>: int - the scenario identifier

Stopping a fire manually

There are three ways of killing a fire manually (instead of extinguishing it).

  1. Stopping a particular fire by its ID.
  2. Stopping a group of fires (scenarios) spawned by the /startscenario command.
  3. Stopping all fires at once.

Stopping a particular fire

/stopfire <fireID> Stops a particular fire

  • <fireID>: int - the fire identifier

Stopping a scenario

/stopscenario <scenarioID> Stops a scenario

  • <scenarioID>: int - the scenario identifier

Stopping all fires at once

/stopallfires Stops all the fires

Dispatch system

Adding a user to the WL

/firedispatch <action> <playerID> Subscribes or unsubscribes the specified player to/from the dispatch manually

  • <action>: add / remove / scenario - specifies the action

  • <playerID/scenarioID>: int - the player ID / the scenario ID (in case of par. #1 being scenario)

  • <dispatchMessage>: string (default: auto-generated) - sets and saves a custom message for the specified scenario (use only with par. #1 scenario)

    Requires: command.firedispatch ace permission

    Note: You can (and should) use the fireDispatch:registerPlayer event to subscribe/unsubscribe players.

Setting GPS to a specific dispatch call

/remindme <dispatchID> Sets waypoint to the specified dispatch call

  • <dispatchID>: int - the dispatch call id (number)

Removing the navigation to the last call

/cleardispatch Clears the navigation to the last call

  • <dispatchID>: int - (optional) the dispatch call id (number) - if you send this parameter, the script will also remove the fire blip from the map.

Random Fire Spawner

/randomfires <action> <p2> Manages the random fire spawner

  • <action>: add / remove / enable / disable - specifies the action

    add - adds specified scenario into the spawner;
    remove - opposite of add;
    
    enable - enables the fire spawner (if not already);
    disable - opposite of enable
    
  • <p2>: int - (optional) registered fire identifier

    Requires: whitelist or firescript.all ace permission

Steps to get the fire spawner working

  • register a fire (create a scenario) and remember the ID;
  • use /randomfires add <ID> to add the registered fire in the spawner; (replace with the registered fire's ID)
  • use /randomfires enable to start the spawner (if not started already; you can also let the spawner be started automatically in the config)

Notes

  • the spawner will not work unless conditions specified in the config are met