2025-07-02 17:36:47 +02:00
-- Hi, if you like the script, join the discord: https://discord.gg/k4YNwYxE4h
Config = { }
Config.Debug = false
2025-07-02 17:39:41 +02:00
Config.Core = " QB-Core " -- "ESX" / "QB-Core"
2025-07-02 17:36:47 +02:00
if Config.Core == " ESX " then
ESX = exports [ ' es_extended ' ] : getSharedObject ( )
elseif Config.Core == " QB-Core " then
QBCore = exports [ ' qb-core ' ] : GetCoreObject ( )
end
2025-07-02 17:45:10 +02:00
-- Changed notification system to use ox_lib
2025-07-02 17:36:47 +02:00
Config.Notification = function ( message , time , type )
if type == " success " then
2025-07-02 17:45:10 +02:00
lib.notify ( {
title = ' FIREWORK ' ,
description = message ,
duration = time ,
type = ' success ' ,
icon = ' fire '
} )
2025-07-02 17:36:47 +02:00
elseif type == " error " then
2025-07-02 17:45:10 +02:00
lib.notify ( {
title = ' FIREWORK ' ,
description = message ,
duration = time ,
type = ' error ' ,
icon = ' fire '
} )
2025-07-02 17:36:47 +02:00
end
end
Config.Translate = {
[ ' CANNOT_START ' ] = " You can't set off several fireworks at once, wait until the current one goes off " , -- Only if: Config.DisableMultiplyFireworks = true
[ ' NEED_LIGHTER ' ] = " You need have lighter! " , -- Only if: Config.NeedLighter = true
[ ' YOU_PLACE_FIREWORK ' ] = " You place the firework! " ,
}
Config.Enable3DText = true -- 3DText on fireworks, shows the time to go off
Config.PlacingAnimation = { ' anim@mp_fireworks ' , ' place_firework_3_box ' } -- Animation of placing firework
Config.DisableMultiplyFireworks = false -- if you set it true, the player will be able to place one firework, the next one only after he finishes shooting
2025-07-02 17:45:10 +02:00
-- Enabled lighter requirement
2025-07-02 17:36:47 +02:00
Config.NeedLighter = true
2025-07-02 17:45:10 +02:00
Config.LighterItem = ' lighter ' -- Changed from 'bread' to 'lighter'
2025-07-02 17:36:47 +02:00
Config.Fireworks = {
[ 1 ] = {
2025-07-02 18:05:16 +02:00
item = ' firework1 ' ,
2025-07-02 17:45:10 +02:00
itemRemovable = true ,
2025-07-02 18:00:49 +02:00
command = nil ,
2025-07-02 18:22:44 +02:00
shoots = 8 ,
2025-07-02 18:00:49 +02:00
prop = " ind_prop_firework_01 " , -- Changed to rocket prop
isRocket = true , -- Add this flag to identify it as a flying rocket
rocketHeight = 50.0 , -- How high the rocket should fly
rocketSpeed = 0.5 , -- Speed of rocket ascent (lower is faster)
timeToStart = 2000 , -- Reduced time to start for better experience
2025-07-02 17:36:47 +02:00
timeBetweenShoots = 1250 ,
particles = {
{ name = " scr_indep_fireworks " , effect = " scr_indep_firework_starburst " , scale = 2.0 , plusHeight = 50.0 , randomizeXY = true , timeToNextShoot = 120 } ,
{ name = " proj_indep_firework " , effect = " scr_indep_firework_grd_burst " , scale = 2.0 , plusHeight = 50.0 , randomizeXY = true , timeToNextShoot = 300 } ,
{ name = " proj_indep_firework " , effect = " scr_indep_firework_air_burst " , scale = 2.0 , plusHeight = 50.0 , randomizeXY = true , timeToNextShoot = 600 } ,
} ,
} ,
[ 2 ] = {
2025-07-02 17:39:41 +02:00
item = ' firework2 ' ,
2025-07-02 17:36:47 +02:00
itemRemovable = true ,
2025-07-02 17:45:10 +02:00
command = nil , -- Removed command to only use items
2025-07-02 17:36:47 +02:00
shoots = 80 ,
prop = " ind_prop_firework_03 " ,
timeToStart = 5500 ,
timeBetweenShoots = 250 ,
particles = {
{ name = " scr_indep_fireworks " , effect = " scr_indep_firework_trailburst " , scale = 2.0 , plusHeight = 10.0 , randomizeXY = true , timeToNextShoot = 125 } ,
{ name = " proj_indep_firework_v2 " , effect = " scr_firework_indep_burst_rwb " , scale = 1.0 , plusHeight = 50.0 , randomizeXY = true , timeToNextShoot = 125 } ,
{ name = " proj_xmas_firework " , effect = " scr_firework_xmas_ring_burst_rgw " , scale = 1.0 , plusHeight = 50.0 , randomizeXY = true , timeToNextShoot = 125 } ,
} ,
} ,
[ 3 ] = {
2025-07-02 17:39:41 +02:00
item = ' firework3 ' ,
2025-07-02 17:36:47 +02:00
itemRemovable = true ,
2025-07-02 17:45:10 +02:00
command = nil , -- Removed command to only use items
2025-07-02 18:00:49 +02:00
shoots = 100 ,
2025-07-02 17:36:47 +02:00
prop = " ind_prop_firework_03 " ,
timeToStart = 5500 ,
timeBetweenShoots = 250 ,
particles = {
{ name = " proj_indep_firework " , effect = " scr_indep_firework_air_burst " , scale = 1.0 , plusHeight = 50.0 , randomizeXY = true , timeToNextShoot = 125 } ,
{ name = " proj_indep_firework_v2 " , effect = " scr_firework_indep_spiral_burst_rwb " , scale = 1.0 , plusHeight = 50.0 , randomizeXY = true , timeToNextShoot = 125 } ,
{ name = " proj_indep_firework_v2 " , effect = " scr_firework_indep_repeat_burst_rwb " , scale = 1.0 , plusHeight = 50.0 , randomizeXY = true , timeToNextShoot = 125 } ,
{ name = " scr_indep_fireworks " , effect = " scr_indep_firework_starburst " , scale = 1.0 , plusHeight = 50.0 , randomizeXY = true , timeToNextShoot = 125 } ,
} ,
} ,
[ 4 ] = {
2025-07-02 17:39:41 +02:00
item = ' firework4 ' ,
2025-07-02 17:36:47 +02:00
itemRemovable = true ,
2025-07-02 17:45:10 +02:00
command = nil , -- Removed command to only use items
2025-07-02 17:36:47 +02:00
shoots = 50 ,
prop = " ind_prop_firework_03 " ,
timeToStart = 5000 ,
timeBetweenShoots = 550 ,
particles = {
{ name = " scr_indep_fireworks " , effect = " scr_indep_firework_trailburst " , scale = 4.0 , plusHeight = 50.0 , randomizeXY = true , timeToNextShoot = 10 } ,
} ,
} ,
[ 5 ] = {
2025-07-02 17:45:10 +02:00
item = ' fontain4 ' ,
2025-07-02 17:36:47 +02:00
itemRemovable = true ,
2025-07-02 17:45:10 +02:00
command = nil , -- Removed command to only use items
2025-07-02 17:36:47 +02:00
shoots = 80 ,
prop = " ind_prop_firework_04 " ,
timeToStart = 3500 ,
timeBetweenShoots = 700 ,
particles = {
{ name = " scr_indep_fireworks " , effect = " scr_indep_firework_fountain " , scale = 0.25 , plusHeight = 0.25 , randomizeXY = false , timeToNextShoot = 500 } ,
} ,
} ,
}