forked from Simnation/Main
123 lines
5.2 KiB
Lua
123 lines
5.2 KiB
Lua
-- Hi, if you like the script, join the discord: https://discord.gg/k4YNwYxE4h
|
|
|
|
Config = {}
|
|
|
|
Config.Debug = false
|
|
|
|
Config.Core = "QB-Core" -- "ESX" / "QB-Core"
|
|
|
|
if Config.Core == "ESX" then
|
|
ESX = exports['es_extended']:getSharedObject()
|
|
elseif Config.Core == "QB-Core" then
|
|
QBCore = exports['qb-core']:GetCoreObject()
|
|
end
|
|
|
|
-- Changed notification system to use ox_lib
|
|
Config.Notification = function(message, time, type)
|
|
if type == "success" then
|
|
lib.notify({
|
|
title = 'FIREWORK',
|
|
description = message,
|
|
duration = time,
|
|
type = 'success',
|
|
icon = 'fire'
|
|
})
|
|
elseif type == "error" then
|
|
lib.notify({
|
|
title = 'FIREWORK',
|
|
description = message,
|
|
duration = time,
|
|
type = 'error',
|
|
icon = 'fire'
|
|
})
|
|
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
|
|
|
|
-- Enabled lighter requirement
|
|
Config.NeedLighter = true
|
|
Config.LighterItem = 'lighter' -- Changed from 'bread' to 'lighter'
|
|
|
|
Config.Fireworks = {
|
|
[1] = {
|
|
item = 'firework1',
|
|
itemRemovable = true,
|
|
command = nil,
|
|
shoots = 8,
|
|
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
|
|
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] = {
|
|
item = 'firework2',
|
|
itemRemovable = true,
|
|
command = nil, -- Removed command to only use items
|
|
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] = {
|
|
item = 'firework3',
|
|
itemRemovable = true,
|
|
command = nil, -- Removed command to only use items
|
|
shoots = 100,
|
|
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] = {
|
|
item = 'firework4',
|
|
itemRemovable = true,
|
|
command = nil, -- Removed command to only use items
|
|
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] = {
|
|
item = 'fontain4',
|
|
itemRemovable = true,
|
|
command = nil, -- Removed command to only use items
|
|
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},
|
|
},
|
|
},
|
|
}
|