Waypoint Fireworks
Overview of the Waypoint Fireworks Script and how to configure.
Last updated
Overview of the Waypoint Fireworks Script and how to configure.
Last updated
Waypoint Fireworks provides a fully network synchronized fireworks system for FiveM. It comes with throwable fireworks, handheld fireworks, and placeable fireworks. The placeable fireworks can be linked together in a sequence to create a firework show. All fireworks are fully customizable, modify existing ones or add your own fireworks by mixing and matching the different particle effects, durations, scale, etc.
Comes with 10 different preset firework effects for a total of 27 (most containing 3 color variations: white color, random color, red white and blue)
Throwable fireworks
Handheld fireworks
Placeable fireworks
Link fireworks together in a sequence to create a firework show or light individual fireworks
Fully network synchronized
Fully customizable, add your own fireworks by mixing and matching the different particle effects, durations, scale, etc
All fireworks have slight variance to their scale, angles, etc so each time you fire it you get a slightly different effect and its fully configurable
Config option on whether to check if the player has a lighter on them before they can use the fireworks
When the fireworks are used, the item is removed from the players inventory
Support for both QB and ESX, all framework functions are open source in the framework.lua file.
You can easily modify the script to support other frameworks by modifying the framework.lua file
Players can use a variety of fireworks ranging from throwable fireworks, handheld fireworks, and placeable fireworks
Throwable fireworks are held in the hand until the player presses G and then they are thrown in the direction the player is looking
Handheld fireworks remain in the players hand and are lit by pressing G. The player can look around by pointing to "aim" the fireworks.
Placeable fireworks can be placed on the ground. Players can place multiple fireworks on the ground and create a firework show by linking them together in a sequence.
The fireworks can be picked back up and the item is returned to the players inventory.
An individual firework can only be added once to a sequence
Individual fireworks can be lit by using target and selecting "Light fuse".
If Config.CheckForLighter = true
, it will first check that the player has a lighter item on them before allowing them to light the firework
All players will see a particle effect that simulates a burning fuse before the firework goes off
Players can start a firework show via two methods:
Via the /fireworksstart
command
Or from the "Light fuse" target menu on a firework that is a part of a sequence
Players can reset the sequence of fireworks via the /fireworksclear
command
Or if they want to remove individual fireworks from the sequence, they can simply pick that firework up.
This script was written with performance in mind and has been tested with several fireworks going off at the same time with no noticeable performance impact. Due to the nature of particle effects, some are more resource intensive than others (for example volumetric smoke grenades with a looped particle effect take more resources than a simple starburst effect). Any performance impact only lasts as long as the particle effect and returns to normal once the effect is finished.
Resource monitor results:
Idle: 0.00ms
Handheld: 0.01ms
Full firework show (15+ fireworks): 0.00ms - 0.01ms
qb-smallresources/fireworks.lua for inspiration
Framework: QBCore, Qbox or ESX
Notify: QB, ESX, or OX
qb-target
Optional:
qb-inventory or equivalent inventory script
qb-shops or equivalent script to sell the items
Custom firework props by Mrs. BzZz (permission granted to use in this script).
for inspiration on adding a throwing mechanism