-
Notifications
You must be signed in to change notification settings - Fork 36
Commands & Usage
Here I'll try to explain what each of the commands available does and which arguments they need.
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 :-)
/firewl <action> <playerID>
Adds or removes the specified player to the WL
-
<action>
: add / remove - specifies the action -
<playerID>
: int - the player IDRequires:
command.firewl
ace permission
/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
There are currently two options on how to create a fire.
- Create a fire at your location instantly.
- Pre-define a fire and start it later on.
/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.
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 positionReturns: 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
There are three ways of killing a fire manually (instead of extinguishing it).
- Stopping a particular fire by its ID.
- Stopping a group of fires (scenarios) spawned by the
/startscenario
command. - Stopping all fires at once.
/stopfire <fireID>
Stops a particular fire
-
<fireID>
: int - the fire identifier
/stopscenario <scenarioID>
Stops a scenario
-
<scenarioID>
: int - the scenario identifier
/stopallfires
Stops all the fires
/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 permissionNote: You can (and should) use the
fireDispatch:registerPlayer
event to subscribe/unsubscribe players.
/remindme <dispatchID>
Sets waypoint to the specified dispatch call
-
<dispatchID>
: int - the dispatch call id (number)
/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.
/randomfires <action> <p2>
Manages the random fire spawner
-
<action>
: add / remove / enable / disable - specifies the actionadd - 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 identifierRequires: whitelist or
firescript.all
ace permission
- 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)
- the spawner will not work unless conditions specified in the config are met
Fire Script v1.7.0 by GIMI under the GNU GPL 3 license