Installation
This page will give you the information you need to setup this resource.
Make sure you read everything carefull when installing this resource.
Dependencies
Polyzone by mkafrin qb-core by qbcore-framework qb-target by qbcore-framework or ox_target by Overextended qb-menu by qbcore-framework or ox_lib's context menu by Overextended ps-ui by Project-Sloth (optional) tasks by thommie (optional)
How to install
Download and unzip the thommie-weapondealer.zip
Add "ensure thommie-weapondealer" to your server.cfg
(re)start your server and you are done.
How to add new locations
You can create new locations for the vehicle to spawn very easy, you go to your config.lua and you will search for Config.Locations (line 25 by default). Now you can follow the template we have made and change the values. (To have the perfect timing with the waits you need to test some values)
Locations Template:
['ID'] = {
spawn = vector3(0, 0, 0), -- This is the location where the helicopter will spawn
land = vector3(0, 0, 0), -- This is the location where the helicopter will land
despawn = vector3(0, 0, 0), -- This is the location where the helicopter will despawn
area = { -- Create an area with polyzone, this is necessary for (de)spawning the NPC's and vehicles
minz = 0.0,
maxz = 0.0,
zone = {
vector2(0.0),
vector2(0.0),
vector2(0.0),
vector2(0.0),
},
},
wait = { -- The wait time is time in seconds
first = 10, -- The time the script waits until it changes the speed of the helicopter
second = 10, -- The time the script waits until the helicopter is starting to land.
third = 30, -- The time the script waits for the helicopter to be land and then let the weapondealers step out of the helicopter.
},
}
How to add new weapon loadouts
You can create new weapon loadouts by going to the config.lua and search for Config.Weapons (line 48 by default). Now you can follow the template we have made and change the values to what you want.
Weapons Template:
['ID'] = {
['WEAPON_ONE'] = {
name = 'weapon_one',
label = 'Weapon One',
available = true, -- Options: true & false (If false you can not buy this weapon)
amount = 2,
maxStock = 2, -- The mamimum amount of weapons that will be available
restock = 1, -- How many of this weapon will be restocked after resetting the stock.
price = 19500,
},
['WEAPON_TWO'] = {
name = 'weapon_two',
label = 'Weapon Two',
available = true,
amount = 1,
maxStock = 1,
restock = 1,
price = 120000,
},
},
Last updated