The lighter item / command allows your players to set fire to the nearest dumpster.
Please note that your resource folder should be named 'smartfires' for our exports to work properly
We have added integration with QBCore, ESX, vRP and OX Inventory to make a working lighter item:
Enabling the lighter
Head to the config.lua file and set lighterEnabled to true at the top of the file. You can then either setup the lighter as an item (with a framework below), or as a command.
Choosing your framework
Below the lighterEnabled option, you can set your desired framework for the lighters:
lighterFramework = {
command = { -- This section allows you to use the lighter without a framework, instead as a command
commandEnabled = true,
-- This is a cooldown for the command usage
cooldown = {
enabled = true,
duration = 5000, -- 5 seconds cooldown (set in milliseconds)
},
commandName = "lighter", -- The command name to use the lighter
-- Setup permissions for the lighter command only
permissions = {
acePermissions = {
enabled = false,
-- This enables ace permissions on the lighter command
},
-- We've added ESX integration. All you need to do is enable it below and configure which jobs can use the command
ESX = {
enabled = false,
checkJob = {
enabled = true, -- Enable this to use ESX job check
jobs = {"fire", "firefighter"} -- A user can have any of the following jobs, allowing you to add multiple
}
},
-- We've added vRP integration. All you need to do is enable it below. Then, configure if you wish to check for groups or permissions, or even both
vRP = {
enabled = false,
checkGroup = {
enabled = false, -- Enable this to use vRP group check
groups = {"fire", "admin"}, -- A user can have any of the following groups, meaning you can add different jobs
},
checkPermission = {
enabled = false, -- Enable this to use vRP permission check
permissions = {"player.kick"} -- A user can have any of the following permissions, allowing you to add multiple
},
},
-- We've added QBCore integration. All you need to do is enable it below. Then, configure if you wish to check for jobs or permissions, or even both
QBCore = {
enabled = false,
checkJob = {
enabled = false, -- Enable this to use QBCore job check
jobs = {"fire"}, -- A user can have any of the following jobs, meaning you can add different jobs
},
checkPermission = {
enabled = false, -- Enable this to use QBCore permission check
permissions = {"god"}, -- A user can have any of the following permissions, allowing you to add multiple
},
},
QBX = {
enabled = false,
checkJob = {
enabled = false, -- Enable this to use QBX job check
jobs = {"fireman"}, -- A user can have any of the following jobs, meaning you can add different jobs
}
},
},
},
-- These are the frameworks that will be used to check if the player has a lighter in their inventory
oxInventory = false,
QBCore = false,
ESX = false,
vRP = false,
},
Lighter Command
In the section above, you can simple enable the lighter command, allowing your players to use /lighter in-game, to set fire to the nearest dumpster.
You can also enable a cooldown, meaning players cannot spam the command and create lots of fires. This cooldown is set in milliseconds in the lighterFramework section above.
You can also set the lighter command name in this section.
OX_Inventory Lighter:
For ox_inventory, add the following code to ox_inventory/data/items.lua: