forked from Simnation/Main
ed
This commit is contained in:
parent
517edc5a8f
commit
2127f70ffd
3 changed files with 42 additions and 60 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
lib.require('ox_lib')
|
||||||
|
|
||||||
local function DrawText3D(coords, text)
|
local function DrawText3D(coords, text)
|
||||||
local camCoords = GetFinalRenderedCamCoord()
|
local camCoords = GetFinalRenderedCamCoord()
|
||||||
local distance = #(coords - camCoords)
|
local distance = #(coords - camCoords)
|
||||||
|
|
|
@ -12,17 +12,24 @@ elseif Config.Core == "QB-Core" then
|
||||||
QBCore = exports['qb-core']:GetCoreObject()
|
QBCore = exports['qb-core']:GetCoreObject()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Changed notification system to use ox_lib
|
||||||
Config.Notification = function(message, time, type)
|
Config.Notification = function(message, time, type)
|
||||||
if type == "success" then
|
if type == "success" then
|
||||||
exports["vms_notify"]:Notification("FIREWORK", message, time, "#27FF09", "fa-solid fa-fire")
|
lib.notify({
|
||||||
-- TriggerEvent('esx:showNotification', message) --[ ESX ]
|
title = 'FIREWORK',
|
||||||
-- TriggerEvent('QBCore:Notify', message, 'success', time) -- [ QB-Core ]
|
description = message,
|
||||||
|
duration = time,
|
||||||
|
type = 'success',
|
||||||
|
icon = 'fire'
|
||||||
|
})
|
||||||
elseif type == "error" then
|
elseif type == "error" then
|
||||||
exports["vms_notify"]:Notification("FIREWORK", message, time, "#FF0909", "fa-solid fa-fire")
|
lib.notify({
|
||||||
-- TriggerEvent('esx:showNotification', message) --[ ESX ]
|
title = 'FIREWORK',
|
||||||
-- TriggerEvent('QBCore:Notify', message, 'error', time) -- [ QB-Core ]
|
description = message,
|
||||||
|
duration = time,
|
||||||
|
type = 'error',
|
||||||
|
icon = 'fire'
|
||||||
|
})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -38,18 +45,18 @@ Config.PlacingAnimation = {'anim@mp_fireworks', 'place_firework_3_box'} -- Anima
|
||||||
|
|
||||||
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
|
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.NeedLighter = true
|
||||||
Config.LighterItem = 'lighter'
|
Config.LighterItem = 'lighter' -- Changed from 'bread' to 'lighter'
|
||||||
|
|
||||||
|
|
||||||
Config.Fireworks = {
|
Config.Fireworks = {
|
||||||
[1] = {
|
[1] = {
|
||||||
item = 'firework1', -- name or nil
|
item = 'firework1',
|
||||||
itemRemovable = true, -- if it is on the item, is it to be removed after use
|
itemRemovable = true,
|
||||||
command = 'fire_1', -- name of command or nil
|
command = nil, -- Removed command to only use items
|
||||||
shoots = 50, -- count of shots
|
shoots = 50,
|
||||||
prop = "ind_prop_firework_03",
|
prop = "ind_prop_firework_03",
|
||||||
timeToStart = 5500, -- +/- 5000 == 5 seconds
|
timeToStart = 5500,
|
||||||
timeBetweenShoots = 1250,
|
timeBetweenShoots = 1250,
|
||||||
particles = {
|
particles = {
|
||||||
{name = "scr_indep_fireworks", effect = "scr_indep_firework_starburst", scale = 2.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 120},
|
{name = "scr_indep_fireworks", effect = "scr_indep_firework_starburst", scale = 2.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 120},
|
||||||
|
@ -60,7 +67,7 @@ Config.Fireworks = {
|
||||||
[2] = {
|
[2] = {
|
||||||
item = 'firework2',
|
item = 'firework2',
|
||||||
itemRemovable = true,
|
itemRemovable = true,
|
||||||
command = 'fire_2',
|
command = nil, -- Removed command to only use items
|
||||||
shoots = 80,
|
shoots = 80,
|
||||||
prop = "ind_prop_firework_03",
|
prop = "ind_prop_firework_03",
|
||||||
timeToStart = 5500,
|
timeToStart = 5500,
|
||||||
|
@ -74,7 +81,7 @@ Config.Fireworks = {
|
||||||
[3] = {
|
[3] = {
|
||||||
item = 'firework3',
|
item = 'firework3',
|
||||||
itemRemovable = true,
|
itemRemovable = true,
|
||||||
command = 'fire_3',
|
command = nil, -- Removed command to only use items
|
||||||
shoots = 80,
|
shoots = 80,
|
||||||
prop = "ind_prop_firework_03",
|
prop = "ind_prop_firework_03",
|
||||||
timeToStart = 5500,
|
timeToStart = 5500,
|
||||||
|
@ -89,7 +96,7 @@ Config.Fireworks = {
|
||||||
[4] = {
|
[4] = {
|
||||||
item = 'firework4',
|
item = 'firework4',
|
||||||
itemRemovable = true,
|
itemRemovable = true,
|
||||||
command = 'fire_4',
|
command = nil, -- Removed command to only use items
|
||||||
shoots = 50,
|
shoots = 50,
|
||||||
prop = "ind_prop_firework_03",
|
prop = "ind_prop_firework_03",
|
||||||
timeToStart = 5000,
|
timeToStart = 5000,
|
||||||
|
@ -99,9 +106,9 @@ Config.Fireworks = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
[5] = {
|
[5] = {
|
||||||
item = 'fontain_4',
|
item = 'fontain4',
|
||||||
itemRemovable = true,
|
itemRemovable = true,
|
||||||
command = 'fontain_4',
|
command = nil, -- Removed command to only use items
|
||||||
shoots = 80,
|
shoots = 80,
|
||||||
prop = "ind_prop_firework_04",
|
prop = "ind_prop_firework_04",
|
||||||
timeToStart = 3500,
|
timeToStart = 3500,
|
||||||
|
@ -110,37 +117,4 @@ Config.Fireworks = {
|
||||||
{name = "scr_indep_fireworks", effect = "scr_indep_firework_fountain", scale = 0.25, plusHeight = 0.25, randomizeXY = false, timeToNextShoot = 500},
|
{name = "scr_indep_fireworks", effect = "scr_indep_firework_fountain", scale = 0.25, plusHeight = 0.25, randomizeXY = false, timeToNextShoot = 500},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
--[[
|
|
||||||
[6] = {
|
|
||||||
item = nil,
|
|
||||||
itemRemovable = false,
|
|
||||||
command = '',
|
|
||||||
shoots = 1,
|
|
||||||
prop = "ind_prop_firework_04",
|
|
||||||
timeToStart = 1000,
|
|
||||||
timeBetweenShoots = 100,
|
|
||||||
particles = {
|
|
||||||
-- {name = "proj_indep_firework", effect = "scr_indep_firework_grd_burst", scale = 2.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 600},
|
|
||||||
-- {name = "proj_indep_firework", effect = "scr_indep_firework_air_burst", scale = 2.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 600},
|
|
||||||
|
|
||||||
-- {name = "proj_indep_firework_v2", effect = "scr_firework_indep_burst_rwb", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "proj_indep_firework_v2", effect = "scr_firework_indep_spiral_burst_rwb", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "proj_indep_firework_v2", effect = "scr_firework_indep_ring_burst_rwb", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "proj_indep_firework_v2", effect = "scr_xmas_firework_burst_fizzle", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "proj_indep_firework_v2", effect = "scr_firework_indep_repeat_burst_rwb", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
|
|
||||||
-- {name = "proj_xmas_firework", effect = "scr_firework_xmas_ring_burst_rgw", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "proj_xmas_firework", effect = "scr_firework_xmas_burst_rgw", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "proj_xmas_firework", effect = "scr_firework_xmas_repeat_burst_rgw", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "proj_xmas_firework", effect = "scr_firework_xmas_spiral_burst_rgw", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
|
|
||||||
-- {name = "scr_indep_fireworks", effect = "scr_indep_firework_starburst", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "scr_indep_fireworks", effect = "scr_indep_firework_shotburst", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "scr_indep_fireworks", effect = "scr_indep_firework_trailburst", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "scr_indep_fireworks", effect = "scr_indep_firework_trailburst_spawn", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "scr_indep_fireworks", effect = "scr_indep_firework_burst_spawn", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
-- {name = "scr_indep_fireworks", effect = "scr_indep_firework_fountain", scale = 1.0, plusHeight = 50.0, randomizeXY = true, timeToNextShoot = 2025},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
]]
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,23 @@
|
||||||
fx_version 'cerulean'
|
fx_version 'cerulean'
|
||||||
game 'gta5'
|
game 'gta5'
|
||||||
lua54 'yes'
|
|
||||||
|
|
||||||
author 'vames™️'
|
author 'Your Name'
|
||||||
description 'vms_firework'
|
description 'Firework Script'
|
||||||
version '1.0.0'
|
version '1.0.0'
|
||||||
|
|
||||||
shared_script 'config.lua'
|
shared_scripts {
|
||||||
|
'@ox_lib/init.lua', -- Add this line
|
||||||
|
'config.lua'
|
||||||
|
}
|
||||||
|
|
||||||
client_scripts {
|
client_scripts {
|
||||||
'client.lua'
|
'client.lua'
|
||||||
}
|
}
|
||||||
|
|
||||||
server_scripts {
|
server_scripts {
|
||||||
'server.lua'
|
'server.lua'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
'ox_lib' -- Add this line
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue