Usage
Using a Command
If
Config.UseCommand = true
, players can type/<command>
(e.g.,/firework
) to launch a random or specified firework.Depending on your script logic, it may spawn the firework prop near them, play a launch animation, and display effects.
Using an Item
If
Config.UseItem = true
, players can use theConfig.ItemName
item from their inventory (ESX/QBCore).When used, it triggers the same launching sequence or a different one (depending on your code) to create the firework effect.
Custom Firework Types
By default,
fireworkl
,fireworkm
, andfireworkr
are defined. You can add more types in theConfig.Fireworks
table, each with unique visuals or timing.
Distance-Based Sound
Config.soundRadius
controls how far the launching or explosion sounds can be heard.Ensure this radius isnβt too large for performance reasons or too small to diminish immersion.
Optimized Performance
The script is designed to handle multiple fireworks simultaneously without lag.
If your server hosts huge fireworks shows, just watch the resource usage in βresmonβ to confirm smooth performance.
Last updated