# Setup

Configuration

Add the script to your server config.

Open the `config.lua`file and make any necessary adjustments.

Make sure to update the framework / script configuration section with the relevant scripts that you use.

{% hint style="info" %}
If you select any OX script (or script that uses ox), be sure to uncomment the `@ox_lib/init.lua` line in the fxmanifest.
{% endhint %}

## Framework Implementations

External script implementations are handled in the `framework.lua` file. This file provides the necessary functions and hooks to integrate with different frameworks and scripts.

Out of the box, the script includes implementations for:

<table><thead><tr><th width="159"></th><th width="77" data-type="checkbox">qb</th><th width="73" data-type="checkbox">qbx</th><th width="61" data-type="checkbox">esx</th><th width="50" data-type="checkbox">ox</th></tr></thead><tbody><tr><td><strong>Framework</strong></td><td>true</td><td>true</td><td>true</td><td>false</td></tr><tr><td><strong>Notify</strong></td><td>true</td><td>false</td><td>true</td><td>true</td></tr><tr><td><strong>Inventory</strong></td><td>true</td><td>false</td><td>true</td><td>true</td></tr></tbody></table>

If you are using a different framework or script, you will need to add the relevant implementations in the `framework.lua` file.

## Add Items to Inventory

Add the items to the item file in your inventory script.

Copy / paste all of the images from the `images/`folder into your inventory script.

<details>

<summary>QB Inventory Items</summary>

```lua
-- Fireworks
    bottlerocket1 = {name = "bottlerocket1", label = "Bottle rocket (White)", weight = 500, type = "item", image = "bottlerocket.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Handheld recreational fireworks (White)"},
    bottlerocket2= {name = "bottlerocket2", label = "Bottle rocket (Colored)", weight = 500, type = "item", image = "bottlerocket.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Handheld recreational fireworks (Random Colors)"},
    bottlerocket3= {name = "bottlerocket3", label = "Bottle rocket (USA)", weight = 500, type = "item", image = "bottlerocket.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Handheld recreational fireworks (Red White Blue)"},
    sparkler1 = {name = "sparkler1", label = "Sparkler (White)", weight = 500, type = "item", image = "sparkler1.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Handheld recreational fireworks (White)"},
    sparkler2 = {name = "sparkler2", label = "Sparkler (Colored)", weight = 500, type = "item", image = "sparkler2.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Handheld recreational fireworks (Random Colors)"},
    sparkler3 = {name = "sparkler3", label = "Sparkler (USA)", weight = 500, type = "item", image = "sparkler2.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Handheld recreational fireworks (Red White Blue)"},
    romancandle1= {name = "romancandle1", label = "Roman Candle (White)", weight = 500, type = "item", image = "romancandle.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Handheld recreational fireworks (White)"},
    romancandle2= {name = "romancandle2", label = "Roman Candle (Colored)", weight = 500, type = "item", image = "romancandle.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Handheld recreational fireworks (Random Colors)"},
    romancandle3= {name = "romancandle3", label = "Roman Candle (USA)", weight = 500, type = "item", image = "romancandle.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Handheld recreational fireworks (Red White Blue)"},
    smokebomb1 = {name = "smokebomb1", label = "Smoke bomb firework (White)", weight = 500, type = "item", image = "smokebomb1.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A throwable smoke bomb firework (White)"},
    smokebomb2 = {name = "smokebomb2", label = "Smoke bomb firework (Colored)", weight = 500, type = "item", image = "smokebomb1.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A throwable smoke bomb firework (Random Colors)"},
    smokebomb3 = {name = "smokebomb3", label = "Smoke bomb firework (Red)", weight = 500, type = "item", image = "smokebomb1.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A throwable smoke bomb firework (Red)"},
    smokebomb4 = {name = "smokebomb4", label = "Smoke bomb firework (Green)", weight = 500, type = "item", image = "smokebomb1.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A throwable smoke bomb firework (Green)"},
    smokebomb5 = {name = "smokebomb5", label = "Smoke bomb firework (Blue)", weight = 500, type = "item", image = "smokebomb1.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A throwable smoke bomb firework (Blue)"},
    smokeflasher= {name = "smokeflasher", label = "Smoke bomb + flash firework", weight = 500, type = "item", image = "smokebomb2.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Handheld recreational fireworks"},
    -- Placeable Fireworks
    firecrackerfirework = {name = "firecrackerfirework", label = "Firecracker Firework", weight = 500, type = "item", image = "firecrackerfirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A small annoying firecracker"},
    confettipopper = {name = "confettipopper", label = "Confetti Popper", weight = 500, type = "item", image = "confettipopper.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Confetti popper"},
    finalefirework1 = {name = "finalefirework1", label = "Finale Firework (White)", weight = 1000, type = "item", image = "finalefirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A large fireworks box that puts on an epic display (White)."},
    finalefirework2 = {name = "finalefirework2", label = "Finale Firework (Colored)", weight = 1000, type = "item", image = "finalefirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A large fireworks box that puts on an epic display (Random Colors)."},
    finalefirework3 = {name = "finalefirework3", label = "Finale Firework (USA)", weight = 1000, type = "item", image = "finalefirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A large fireworks box that puts on an epic display (Red White Blue)."},
    finalefireworklong1 = {name = "finalefireworklong1", label = "Long Finale Firework (White)", weight = 1000, type = "item", image = "finalefirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A large fireworks box that puts on an epic display lasting around 5mins (White)."},
    finalefireworklong2 = {name = "finalefireworklong2", label = "Long Finale Firework (Colored)", weight = 1000, type = "item", image = "finalefirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A large fireworks box that puts on an epic display lasting around 5mins (Random Colors)."},
    finalefireworklong3 = {name = "finalefireworklong3", label = "Long Finale Firework (USA)", weight = 1000, type = "item", image = "finalefirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A large fireworks box that puts on an epic display lasting around 5mins (Red White Blue)."},
    fountainfirework1 = {name = "fountainfirework1", label = "Fountain Firework (White)", weight = 1000, type = "item", image = "fountainfirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A medium sized firework that does a fountain display (White)"},
    fountainfirework2 = {name = "fountainfirework2", label = "Fountain Firework (Colored)", weight = 1000, type = "item", image = "fountainfirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A medium sized firework that does a fountain display (Random Colors)"},
    fountainfirework3 = {name = "fountainfirework3", label = "Fountain Firework (USA)", weight = 1000, type = "item", image = "fountainfirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A medium sized firework that does a fountain display (Red White Blue)"},
    missilefirework1 = {name = "missilefirework1", label = "Missle Firework (White)", weight = 1000, type = "item", image = "missilefirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A medium sized firework that shoots several high flying missiles (White)"},
    missilefirework2 = {name = "missilefirework2", label = "Missle Firework (Colored)", weight = 1000, type = "item", image = "missilefirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A medium sized firework that shoots several high flying missiles (Random Colors)"},
    missilefirework3 = {name = "missilefirework3", label = "Missle Firework (USA)", weight = 1000, type = "item", image = "missilefirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A medium sized firework that shoots several high flying missiles (Red White Blue)"},
    mortarfirework = {name = "mortarfirework", label = "Mortar Firework", weight = 1000, type = "item", image = "mortarfirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "Shoots a mortar high in the sky, followed by a loud bang."},
    strobefirework = {name = "strobefirework", label = "Strobe Firework (White)", weight = 1000, type = "item", image = "strobefirework.png", unique = false, useable = true, shouldClose = true, combinable = nil, description = "A small firework that produces a strobe effect"},
```

</details>

<details>

<summary>OX Inventory Items</summary>

<pre class="language-lua"><code class="lang-lua"><strong>    ["lighter"] = {
</strong>         label = "Lighter",
         weight = 0,
         stack = true,
         close = true,
         description = "On new years eve a nice fire to stand next to",
         client = {
             image = "lighter.png",
         }
    },
<strong>    ["bottlerocket1"] = {
</strong>        label = "Bottle rocket (White)",
        weight = 500,
        stack = true,
        close = true,
        description = "Handheld recreational fireworks (White)",
        client = {
            image = 'bottlerocket.png',
        }
    },
    ["bottlerocket2"] = {
        label = "Bottle rocket (Colored)",
        weight = 500,
        stack = true,
        close = true,
        description = "Handheld recreational fireworks (Random Colors)",
        client = {
            image = 'bottlerocket.png',
        }
    },
    ["bottlerocket3"] = {
        label = "Bottle rocket (USA)",
        weight = 500,
        stack = true,
        close = true,
        description = "Handheld recreational fireworks (Red White Blue)",
        client = {
            image = 'bottlerocket.png',
        }
    },
    ["sparkler1"] = {
        label = "Sparkler (White)",
        weight = 500,
        stack = true,
        close = true,
        description = "Handheld recreational fireworks (White)",
    },
    ["sparkler2"] = {
        label = "Sparkler (Colored)",
        weight = 500,
        stack = true,
        close = true,
        description = "Handheld recreational fireworks (Random Colors)",
    },
    ["sparkler3"] = {
        label = "Sparkler (USA)",
        weight = 500,
        stack = true,
        close = true,
        description = "Handheld recreational fireworks (Red White Blue)",
        client = {
            image = 'sparkler2.png',
        }
    },
    ["romancandle1"] = {
        label = "Roman Candle (White)",
        weight = 500,
        stack = true,
        close = true,
        description = "Handheld recreational fireworks (White)",
        client = {
            image = 'romancandle.png',
        }
    },
    ["romancandle2"] = {
        label = "Roman Candle (Colored)",
        weight = 500,
        stack = true,
        close = true,
        description = "Handheld recreational fireworks (Random Colors)",
        client = {
            image = 'romancandle.png',
        }
    },
    ["romancandle3"] = {
        label = "Roman Candle (USA)",
        weight = 500,
        stack = true,
        close = true,
        description = "Handheld recreational fireworks (Red White Blue)",
        client = {
            image = 'romancandle.png',
        }
    },
    ["smokebomb1"] = {
        label = "Smoke bomb firework (White)",
        weight = 500,
        stack = true,
        close = true,
        description = "A throwable smoke bomb firework (White)",
        client = {
            image = 'smokebomb1.png',
        }
    },
    ["smokebomb2"] = {
        label = "Smoke bomb firework (Colored)",
        weight = 500,
        stack = true,
        close = true,
        description = "A throwable smoke bomb firework (Random Colors)",
        client = {
            image = 'smokebomb1.png',
        }
    },
    ["smokebomb3"] = {
        label = "Smoke bomb firework (Red)",
        weight = 500,
        stack = true,
        close = true,
        description = "A throwable smoke bomb firework (Red)",
        client = {
            image = 'smokebomb1.png',
        }
    },
    ["smokebomb4"] = {
        label = "Smoke bomb firework (Green)",
        weight = 500,
        stack = true,
        close = true,
        description = "A throwable smoke bomb firework (Green)",
        client = {
            image = 'smokebomb1.png',
        }
    },
    ["smokebomb5"] = {
        label = "Smoke bomb firework (Blue)",
        weight = 500,
        stack = true,
        close = true,
        description = "A throwable smoke bomb firework (Blue)",
        client = {
            image = 'smokebomb1.png',
        }
    },
    ["smokeflasher"] = {
        label = "Smoke bomb + flash firework",
        weight = 500,
        stack = true,
        close = true,
        description = "Handheld recreational fireworks",
        client = {
            image = 'smokebomb2.png',
        }
    },
    ["firecrackerfirework"] = {
        label = "Firecracker Firework",
        weight = 500,
        stack = true,
        close = true,
        description = "A small annoying firecracker",
    },
    ["confettipopper"] = {
        label = "Confetti Popper",
        weight = 500,
        stack = true,
        close = true,
        description = "Confetti popper",
    },
    ["finalefirework1"] = {
        label = "Finale Firework (White)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A large fireworks box that puts on an epic display (White).",
        client = {
            image = 'finalefirework.png',
        }
    },
    ["finalefirework2"] = {
        label = "Finale Firework (Colored)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A large fireworks box that puts on an epic display (Random Colors).",
        client = {
            image = 'finalefirework.png',
        }
    },
    ["finalefirework3"] = {
        label = "Finale Firework (USA)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A large fireworks box that puts on an epic display (Red White Blue).",
        client = {
            image = 'finalefirework.png',
        }
    },
    ["finalefireworklong1"] = {
        label = "Long Finale Firework (White)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A large fireworks box that puts on an epic display lasting around 5mins (White).",
        client = {
            image = 'finalefirework.png',
        }
    },
    ["finalefireworklong2"] = {
        label = "Long Finale Firework (Colored)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A large fireworks box that puts on an epic display lasting around 5mins (Random Colors).",
        client = {
            image = 'finalefirework.png',
        }
    },
    ["finalefireworklong3"] = {
        label = "Long Finale Firework (USA)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A large fireworks box that puts on an epic display lasting around 5mins (Red White Blue).",
        client = {
            image = 'finalefirework.png',
        }
    },
    ["fountainfirework1"] = {
        label = "Fountain Firework (White)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A medium sized firework that does a fountain display (White)",
        client = {
            image = 'fountainfirework.png',
        }
    },
    ["fountainfirework2"] = {
        label = "Fountain Firework (Colored)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A medium sized firework that does a fountain display (Random Colors)",
        client = {
            image = 'fountainfirework.png',
        }
    },
    ["fountainfirework3"] = {
        label = "Fountain Firework (USA)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A medium sized firework that does a fountain display (Red White Blue)",
        client = {
            image = 'fountainfirework.png',
        }
    },
    ["missilefirework1"] = {
        label = "Missile Firework (White)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A medium sized firework that shoots several high flying missiles (White)",
        client = {
            image = 'missilefirework.png',
        }
    },
    ["missilefirework2"] = {
        label = "Missile Firework (Colored)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A medium sized firework that shoots several high flying missiles (Random Colors)",
        client = {
            image = 'missilefirework.png',
        }
    },
    ["missilefirework3"] = {
        label = "Missile Firework (USA)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A medium sized firework that shoots several high flying missiles (Red White Blue)",
        client = {
            image = 'missilefirework.png',
        }
    },
    ["mortarfirework"] = {
        label = "Mortar Firework",
        weight = 1000,
        stack = true,
        close = true,
        description = "Shoots a mortar high in the sky, followed by a loud bang.",
    },
    ["strobefirework"] = {
        label = "Strobe Firework (White)",
        weight = 1000,
        stack = true,
        close = true,
        description = "A small firework that produces a strobe effect",
    },
</code></pre>

</details>

## Setup Shop

Setup a shop to sell the fireworks at.

<details>

<summary>QB Shops Example</summary>

Create a fireworks store

```lua
["fireworks"] = {
    ["label"] = "Firework Stand",
    ["coords"] = vector4(-316.32, 6107.06, 31.5, 308.75),
    ["ped"] = 'csb_jackhowitzer',
    ["scenario"] = "WORLD_HUMAN_STAND_MOBILE_CLUBHOUSE",
    ["radius"] = 3.0,
    ["targetIcon"] = "fas fa-leaf",
    ["targetLabel"] = "Open Fireworks Store",
    ["products"] = Config.Products["fireworks"],
    ["showblip"] = true,
    ["blipsprite"] = 368,
    ["blipcolor"] = 47
}
```

Add the items to be sold

```lua
["fireworks"] = {
    [1] = {
        name = "confettipopper",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 1,
    },
    [2] = {
        name = "bottlerocket1",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 2,
    },
    [3] = {
        name = "bottlerocket2",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 3,
    },
    [4] = {
        name = "bottlerocket3",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 4,
    },
    [5] = {
        name = "sparkler1",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 5,
    },
    [6] = {
        name = "sparkler2",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 6,
    },
    [7] = {
        name = "sparkler3",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 7,
    },
    [8] = {
        name = "romancandle1",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 8,
    },
    [9] = {
        name = "romancandle2",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 9,
    },
    [10] = {
        name = "romancandle3",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 10,
    },
    [11] = {
        name = "smokebomb1",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 11,
    },
    [12] = {
        name = "smokebomb2",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 12,
    },
    [13] = {
        name = "smokebomb3",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 13,
    },
    [14] = {
        name = "smokebomb4",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 14,
    },
    [15] = {
        name = "smokebomb5",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 15,
    },
    [16] = {
        name = "smokeflasher",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 16,
    },
    [17] = {
        name = "firecrackerfirework",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 17,
    },
    [18] = {
        name = "finalefirework1",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 18,
    },
    [19] = {
        name = "finalefirework2",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 19,
    },
    [20] = {
        name = "finalefirework3",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 20,
    },
    [21] = {
        name = "fountainfirework1",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 21,
    },
    [22] = {
        name = "fountainfirework2",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 22,
    },
    [23] = {
        name = "fountainfirework3",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 23,
    },
    [24] = {
        name = "missilefirework1",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 24,
    },
    [25] = {
        name = "missilefirework2",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 25,
    },
    [26] = {
        name = "missilefirework3",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 26,
    },
    [27] = {
        name = "strobefirework",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 27,
    },
    [28] = {
        name = "finalefireworklong1",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 28,
    },
    [29] = {
        name = "finalefireworklong2",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 29,
    },
    [30] = {
        name = "finalefireworklong3",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 30,
    },
    [31] = {
        name = "mortarfirework",
        price = 1000,
        amount = 100,
        info = {},
        type = "item",
        slot = 31,
    },
},
```

</details>

<details>

<summary>OX Shops Example</summary>

```lua
Fireworks = {
	name = 'Firework Stand',
	blip = {
		id = 368, colour = 47, scale = 0.8
	}, inventory = {
		{name = "bottlerocket1", price = 1000},
		{name = "bottlerocket2", price = 1000},
		{name = "bottlerocket3", price = 1000},
		{name = "sparkler1", price = 1000},
		{name = "sparkler2", price = 1000},
		{name = "sparkler3", price = 1000},
		{name = "romancandle1", price = 1000},
		{name = "romancandle2", price = 1000},
		{name = "romancandle3", price = 1000},
		{name = "smokebomb1", price = 1000},
		{name = "smokebomb2", price = 1000},
		{name = "smokebomb3", price = 1000},
		{name = "smokebomb4", price = 1000},
		{name = "smokebomb5", price = 1000},
		{name = "smokeflasher", price = 1000},
		{name = "firecrackerfirework", price = 1000},
		{name = "confettipopper", price = 1000},
		{name = "finalefirework1", price = 1000},
		{name = "finalefirework2", price = 1000},
		{name = "finalefirework3", price = 1000},
		{name = "finalefireworklong1", price = 1000},
		{name = "finalefireworklong2", price = 1000},
		{name = "finalefireworklong3", price = 1000},
		{name = "fountainfirework1", price = 1000},
		{name = "fountainfirework2", price = 1000},
		{name = "fountainfirework3", price = 1000},
		{name = "missilefirework1", price = 1000},
		{name = "missilefirework2", price = 1000},
		{name = "missilefirework3", price = 1000},
		{name = "mortarfirework", price = 1000},
		{name = "strobefirework", price = 1000},
		{name = "lighter", price = 0},
	}, 
	locations = {
		vec3(-316.32, 6107.06, 31.5)
	}, targets = {
		{ ped = `csb_jackhowitzer`, scenario = 'WORLD_HUMAN_STAND_MOBILE_CLUBHOUSE', loc = vec3(-316.32, 6107.06, 31.5), length = 3.0, width = 3.0, heading = 308.75, minZ = 31.5, maxZ = 32.5, distance = 3.0 }
	}
}
```

</details>

## Setup Waypoint Placeables

Waypoint Placeables is a required dependency to support the placeable fireworks.

Download the latest [wp-placeables](https://github.com/WaypointRP/wp-placeables) release version.

In `wp-placeables/config.lua`, search for `-- Uncomment this line if you are using wp-fireworks` and uncomment the following lines

```lua
local fireworkCustomTargetOptions = {
    {
        event = 'wp-fireworks:client:lightFireworkFuse',
        icon = "fa-solid fa-fire",
        label = "Light fuse"
    },
    {
        event = 'wp-fireworks:client:buildFireworkSequence',
        icon = 'fa-solid fa-link',
        label = 'Add to sequence'
    }
}
```

Uncomment the firework items  `Config.PlaceableProps`&#x20;

```lua
-- Firework props
    {item = "finalefirework1",   label = "Finale Firework (White)", model = "bzzz_prop_fireworks_a", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "finalefirework2",   label = "Finale Firework (Colored)", model = "bzzz_prop_fireworks_a", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "finalefirework3",   label = "Finale Firework (USA)", model = "bzzz_prop_fireworks_a", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "finalefireworklong1",label = "Long Finale Firework (White)", model = "bzzz_prop_fireworks_a", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "finalefireworklong2",label = "Long Finale Firework (Colored)", model = "bzzz_prop_fireworks_a", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "finalefireworklong3",label = "Long Finale Firework (USA)", model = "bzzz_prop_fireworks_a", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "fountainfirework1", label = "Fountain Firework (White)", model = "ind_prop_firework_03", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "fountainfirework2", label = "Fountain Firework (Colored)", model = "ind_prop_firework_03", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "fountainfirework3", label = "Fountain Firework (USA)", model = "ind_prop_firework_03", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "missilefirework1",  label = "Missile Firework (White)", model = "ind_prop_firework_04", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "missilefirework2",  label = "Missile Firework (Colored)", model = "ind_prop_firework_04", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "missilefirework3",  label = "Missile Firework (USA)", model = "ind_prop_firework_04", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
    {item = "mortarfirework",    label = "Mortar Firework", model = "prop_poster_tube_02", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},       
    {item = "strobefirework",    label = "Strobe Firework", model = "bzzz_prop_fireworks_b", isFrozen = true, customTargetOptions = fireworkCustomTargetOptions},
```

## Add a new firework

1. Add a new item to the `items.lua`
2. Update wp-placeables config (if you are adding a placeable firework)
   * Ensure you add the new firework to wp-placeables `Config.PlaceableProps` following the pattern above.
   * Include `shouldUseItemNameState = true` only if you are using the same prop model for more than one item. This is necessary so that the placeable object will return the correct item when it is picked up.
3. Add your new firework itemName to the `Config.FireworkProps` list and define the properties for this firework
4. Add it to your shop

{% hint style="info" %}
If you want to copy an effect and only tweak one or two values (such as colors) you can use the `copyTableAndModifyValues()` function. The first argument is the variable you want to copy. The second argument is the list of values that you want to override.
{% endhint %}

### Config Properties

Below is an explanation of each variable that you can define on a firework effect.

<table><thead><tr><th width="173.33333333333331">Variable</th><th>Explanation</th><th>Required for Firework Type</th></tr></thead><tbody><tr><td>propName</td><td>The name of the prop that will be spawned in the players hand</td><td>Throwable + Handheld</td></tr><tr><td>propBone</td><td>The bone that the prop will be attached to</td><td>Throwable + Handheld</td></tr><tr><td>propPlacement</td><td>Define the placement and rotation offsets for how the prop will be held</td><td>Throwable + Handheld</td></tr><tr><td>ammo</td><td>The number of times a firework can be used before it disappears</td><td>Handheld</td></tr><tr><td>delayTimer</td><td>If otherParticleEffects are defined, it will wait at most up to this amount of time (in millieseconds) before playing the next particle effect. Lower number means each effect is shot off faster</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>minParticles</td><td>The minimum number of particles that will be used for this firework</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>maxParticles</td><td>The maximum number of particles that will be used for this firework</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>colors</td><td>Accepts a list of colors (ex <code>{r = 1.0, g = 1.0, b = 1.0}</code>) that will be randomly chosen from for the firework. To use fully random colors pass <code>{ colors = false}</code>. Values are 0.0 - 1.0 (not 0 to 255). Note colors may not apply to the expected color if the effect already has a color on it</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>mainParticles</td><td>Accepts a list of effects and will pick one at random. This will be the first effect that is fired from the firework.</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>otherParticles</td><td>Accepts a list of effects and will pick one at random. The effects here will be fired a total of `math.random(minParticles, maxParticles)`` times.</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>asset</td><td>The name of the particle asset that will be used for the firework</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>name</td><td>The name of the particle that will be used</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>scale</td><td>A float number that determines how big the particle effect will be</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>scaleRange</td><td>Float number, applies +/- random variance to the scale value. Use 0.0 for no variance. (ex: If the scale is 1.0 and scaleRange is 0.5, the value will be between 0.5 and 1.5)</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>particlePlacement</td><td>List containing offset and rotation values for the particle effect</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>offset</td><td>Add offset to the start position of the particle effect and allow it to start +/- within offsetRange (for placeables its recommended to only use offsets on the static explosions that dont have a trail, otherwise smaller adjustments to align with handheld props)</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>offsetRange</td><td>Add +/- variance to the offset. Use 0.0 for no variance.</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>rot</td><td>Add variance to the rotation of the particle effect</td><td>Throwable + Handheld + Placeable</td></tr><tr><td>rotationRadius</td><td>Fireworks will fire at random angles within this radius. Add +/- variance to the rotation of the particle effect. Use 0.0 for no variance. (Ex: Picture an upside down cone, where the bottom point is where the firework shoots from and it can land anywhere along the top circle of the cone)</td><td>Throwable + Handheld + Placeable</td></tr></tbody></table>
