Fires
Last updated
Last updated
Two In One: This script supports ESX & QBCore, with a single purchase.
This script adds the ability to use lighters to start fires on your ESX or QBCore server! Simply provide players with a way of obtaining a lighter item (add it to a shop, for example). Players can then use their lighter to start a fire in front of them, following an optional animation and progress bar. These fires are not just an effect and do cause damage to players and objects (such as vehicles), as a fire should. Customize features in the config file, such as the name of the lighter item, command for admins to stop nearby fires, timing to light fires, etc.
The script will automatically detect use of qb-core and es_extended, so you don't need to do anything to set your framework. Useable items and admin commands will be generated using QBCore or ESX functions, based on which framework it detects. Only if you have customized the names of these frameworks, will you need to change their setting in the config file.
Upload the script to your server's "resources" folder (or any [sub_directory])
Configure settings to your needs in config.lua
Ensure the script is starting in your server.cfg
Add the lighter item to your items table
ESX ONLY! QBCore comes with a lighter already!
Use the lighter item to start a fire. Admins (or all players based on a config setting) can use a command to stop all nearby fires. By default, the command is;
/firestop
Config = {}
Config.LighterItem = "lighter" -- Name of the lighter item | Default: "lighter"
Config.StopFireCommand = "firestop" -- Command name to stop nearby fires (for those that stop syncing correctly) | Default: "firestop"
Config.CommandDescription = "Stop nearby fires" -- Description for the stop fire command | Default: "Stop nearby fires"
Config.ProgressBarText = "Lighting Fire" -- Action text for the progress bar | Default: "Lighting Fire"
Config.EnableCommand = true -- Whether to allow the stop command for all players (false makes it admin only) | Default: true
Config.UseProgressBars = true -- Use progress bars while lighting a fire (currently supports QBCore only) | Default: true
Config.DoAnimation = true -- Play animation while lighting a fire | Default: true
Config.DisableMovement = false -- Prevent players moving while lighting a fire | Default: false
Config.LightTime = 2 -- Time (seconds) for lighting a fire | Default: 2
Config.BurnTime = 1800 -- Time (seconds) before a fire goes out on it's own | Default: 1800
Config.MaxSpread = 25 -- Max number of objects the fire can spread to (0-25) | Default: 25
Config.DistanceForward = 2.5 -- Distance in front of the player to light the fire (2 or 3 works best) | Default: 2.5
Config.QBCoreScriptName = "qb-core" -- The name of the QBCore resource (Don't edit unless you changed the name of qb-core) | Default: "qb-core"
Config.ESXScriptName = "es_extended" -- The name of the ESX resource (Don't edit unless you changed the name of es_extended) | Default: "es_extended"
Config.OldESX = false -- If using the old esx:getSharedObject event, instead of the export function, make this true | Default: false
Code is accessible
No
Subscription-based
No
Lines (approximately)
~200
Requirements
ESX or QBCore
Support
Yes