ngd-9
A custom 9mm handgun in four finishes with an extended magazine, suppressor, weapon light and red dot, for FiveM!
NGD-9
Installation Steps
-
Install ngd_9
Placengd_9into your resources folder andensure ngd_9in yourserver.cfg. There are no other dependencies, the sounds are built into the resource. Always restart the whole server after adding or updating it, never just the resource. -
Add the Weapons to Your Inventory
Open the section below for your inventory or framework and copy the entries. All four finishes are listed in each block. Attachments are listed for inventories that support them. -
Copy Images
Move the images from theimgfolder into your inventory's images folder. The weapons are named in uppercase likeWEAPON_NGD9.png, the attachments in lowercase likengd9_suppressor.png. Inventories that use lowercase item names, such as qb-inventory, need the weapon files renamed to lowercase. -
Whitelist the Weapons
If you run an anticheat that blocks unknown weapons, add the weapons and components to its whitelist. The names and hashes are at the bottom of this page.
Weapons:
ox_inventory (also Qbox, ND Core and ESX with ox_inventory) (Click to Expand)
Add these inside Weapons = { ... } in ox_inventory/data/weapons.lua:
['WEAPON_NGD9'] = { label = 'NGD-9 (Black & Gold)', weight = 700, durability = 0.2, ammoname = 'ammo-9' },
['WEAPON_NGD9_BLACK'] = { label = 'NGD-9 (Black)', weight = 700, durability = 0.2, ammoname = 'ammo-9' },
['WEAPON_NGD9_WHITE'] = { label = 'NGD-9 (White)', weight = 700, durability = 0.2, ammoname = 'ammo-9' },
['WEAPON_NGD9_FDE'] = { label = 'NGD-9 (FDE)', weight = 700, durability = 0.2, ammoname = 'ammo-9' },
Add these inside Components = { ... } in the same file:
['ngd9_clip_ext'] = { label = 'NGD-9 Extended Magazine (31)', weight = 180, type = 'magazine', client = { component = { `COMPONENT_NGD9_CLIP_02` }, usetime = 2500 } },
['ngd9_suppressor'] = { label = 'NGD-9 Suppressor', weight = 280, type = 'muzzle', client = { component = { `COMPONENT_NGD9_SUPP` }, usetime = 2500 } },
['ngd9_flashlight'] = { label = 'NGD-9 Weapon Light', weight = 120, type = 'flashlight', client = { component = { `COMPONENT_NGD9_FLSH` }, usetime = 2500 } },
['ngd9_reddot'] = { label = 'NGD-9 Red Dot Sight', weight = 90, type = 'sight', client = { component = { `COMPONENT_NGD9_SCOPE` }, usetime = 2500 } },
The ammo is ammo-9, which ox_inventory already ships.
qb-inventory (also ps-inventory, lj-inventory and jpr-inventory) (Click to Expand)
Add these to qb-core/shared/items.lua:
weapon_ngd9 = { name = 'weapon_ngd9', label = 'NGD-9 (Black & Gold)', weight = 700, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_ngd9.png', unique = true, useable = false, shouldClose = true, combinable = nil, description = '' },
weapon_ngd9_black = { name = 'weapon_ngd9_black', label = 'NGD-9 (Black)', weight = 700, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_ngd9_black.png', unique = true, useable = false, shouldClose = true, combinable = nil, description = '' },
weapon_ngd9_white = { name = 'weapon_ngd9_white', label = 'NGD-9 (White)', weight = 700, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_ngd9_white.png', unique = true, useable = false, shouldClose = true, combinable = nil, description = '' },
weapon_ngd9_fde = { name = 'weapon_ngd9_fde', label = 'NGD-9 (FDE)', weight = 700, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_ngd9_fde.png', unique = true, useable = false, shouldClose = true, combinable = nil, description = '' },
The weapons use the standard pistol ammo (AMMO_PISTOL, the pistol_ammo item).
Add these to qb-core/shared/weapons.lua:
[`weapon_ngd9`] = { name = 'weapon_ngd9', label = 'NGD-9 (Black & Gold)', weapontype = 'Pistol', ammotype = 'AMMO_PISTOL', damagereason = 'Pistoled / Blasted / Plugged / Bust a cap in' },
[`weapon_ngd9_black`] = { name = 'weapon_ngd9_black', label = 'NGD-9 (Black)', weapontype = 'Pistol', ammotype = 'AMMO_PISTOL', damagereason = 'Pistoled / Blasted / Plugged / Bust a cap in' },
[`weapon_ngd9_white`] = { name = 'weapon_ngd9_white', label = 'NGD-9 (White)', weapontype = 'Pistol', ammotype = 'AMMO_PISTOL', damagereason = 'Pistoled / Blasted / Plugged / Bust a cap in' },
[`weapon_ngd9_fde`] = { name = 'weapon_ngd9_fde', label = 'NGD-9 (FDE)', weapontype = 'Pistol', ammotype = 'AMMO_PISTOL', damagereason = 'Pistoled / Blasted / Plugged / Bust a cap in' },
Add these to Config.DurabilityMultiplier in qb-weapons/config.lua:
weapon_ngd9 = 0.15,
weapon_ngd9_black = 0.15,
weapon_ngd9_white = 0.15,
weapon_ngd9_fde = 0.15,
The attachments use the standard qb-core attachment items (clip_attachment, suppressor_attachment, flashlight_attachment and holoscope_attachment), so there are no new items to add. qb-weapons decides which weapon each one fits from WeaponAttachments in qb-weapons/config.lua. Add these lines inside the matching tables there.
In clip_attachment, the extended 31 round magazine:
weapon_ngd9 = `COMPONENT_NGD9_CLIP_02`,
weapon_ngd9_black = `COMPONENT_NGD9_CLIP_02`,
weapon_ngd9_white = `COMPONENT_NGD9_CLIP_02`,
weapon_ngd9_fde = `COMPONENT_NGD9_CLIP_02`,
In suppressor_attachment:
weapon_ngd9 = `COMPONENT_NGD9_SUPP`,
weapon_ngd9_black = `COMPONENT_NGD9_SUPP`,
weapon_ngd9_white = `COMPONENT_NGD9_SUPP`,
weapon_ngd9_fde = `COMPONENT_NGD9_SUPP`,
In flashlight_attachment:
weapon_ngd9 = `COMPONENT_NGD9_FLSH`,
weapon_ngd9_black = `COMPONENT_NGD9_FLSH`,
weapon_ngd9_white = `COMPONENT_NGD9_FLSH`,
weapon_ngd9_fde = `COMPONENT_NGD9_FLSH`,
In holoscope_attachment, the red dot sight (use smallscope_attachment instead if you prefer that item):
weapon_ngd9 = `COMPONENT_NGD9_SCOPE`,
weapon_ngd9_black = `COMPONENT_NGD9_SCOPE`,
weapon_ngd9_white = `COMPONENT_NGD9_SCOPE`,
weapon_ngd9_fde = `COMPONENT_NGD9_SCOPE`,
Optionally add recoil to the recoils table in qb-weapons/client/recoil.lua, matching the vanilla Combat Pistol:
[`weapon_ngd9`] = 0.2,
[`weapon_ngd9_black`] = 0.2,
[`weapon_ngd9_white`] = 0.2,
[`weapon_ngd9_fde`] = 0.2,
ESX (es_extended) (Click to Expand)
Add these to Config.Weapons in es_extended/shared/config/weapons.lua. This is needed even if you use ox_inventory, add the ox entries too:
{ name = "WEAPON_NGD9", label = "NGD-9 (Black & Gold)", components = {
{ name = "clip_extended", label = "Extended Magazine (31)", hash = `COMPONENT_NGD9_CLIP_02` },
{ name = "suppressor", label = "Suppressor", hash = `COMPONENT_NGD9_SUPP` },
{ name = "flashlight", label = "Weapon Light", hash = `COMPONENT_NGD9_FLSH` },
{ name = "scope", label = "Red Dot Sight", hash = `COMPONENT_NGD9_SCOPE` },
} },
{ name = "WEAPON_NGD9_BLACK", label = "NGD-9 (Black)", components = {
{ name = "clip_extended", label = "Extended Magazine (31)", hash = `COMPONENT_NGD9_CLIP_02` },
{ name = "suppressor", label = "Suppressor", hash = `COMPONENT_NGD9_SUPP` },
{ name = "flashlight", label = "Weapon Light", hash = `COMPONENT_NGD9_FLSH` },
{ name = "scope", label = "Red Dot Sight", hash = `COMPONENT_NGD9_SCOPE` },
} },
{ name = "WEAPON_NGD9_WHITE", label = "NGD-9 (White)", components = {
{ name = "clip_extended", label = "Extended Magazine (31)", hash = `COMPONENT_NGD9_CLIP_02` },
{ name = "suppressor", label = "Suppressor", hash = `COMPONENT_NGD9_SUPP` },
{ name = "flashlight", label = "Weapon Light", hash = `COMPONENT_NGD9_FLSH` },
{ name = "scope", label = "Red Dot Sight", hash = `COMPONENT_NGD9_SCOPE` },
} },
{ name = "WEAPON_NGD9_FDE", label = "NGD-9 (FDE)", components = {
{ name = "clip_extended", label = "Extended Magazine (31)", hash = `COMPONENT_NGD9_CLIP_02` },
{ name = "suppressor", label = "Suppressor", hash = `COMPONENT_NGD9_SUPP` },
{ name = "flashlight", label = "Weapon Light", hash = `COMPONENT_NGD9_FLSH` },
{ name = "scope", label = "Red Dot Sight", hash = `COMPONENT_NGD9_SCOPE` },
} },
tgiann-inventory (Click to Expand)
Add these to tgiann-inventory/items/items.lua. Then open /invadmin and set each weapon's ammo to the pistol type. Items already saved in the admin panel override this file:
weapon_ngd9 = { label = "NGD-9 (Black & Gold)", weight = 700, type = "weapon", unique = true, description = "" },
weapon_ngd9_black = { label = "NGD-9 (Black)", weight = 700, type = "weapon", unique = true, description = "" },
weapon_ngd9_white = { label = "NGD-9 (White)", weight = 700, type = "weapon", unique = true, description = "" },
weapon_ngd9_fde = { label = "NGD-9 (FDE)", weight = 700, type = "weapon", unique = true, description = "" },
ak47_inventory (Click to Expand)
Use the same entries as the ox_inventory block above, in ak47_inventory/shared/weapons.lua.
Other inventories
Add every finish as a weapon-type item named as above with pistol ammo, and copy the icons. The format differs per inventory, so check its documentation for custom weapons. For inventories that use a visual admin panel, create each weapon there.
Configuration Notes
- Anticheat
Anticheats keep their own weapon lists and may flag weapons they don't know. Add the names below to your whitelist. Some use the numeric hash, so both are listed. Test with a player who is not an admin.
Weapon and component names and hashes (Click to Expand)
| Item name | Label | Hash | Hash (signed) |
|---|---|---|---|
weapon_ngd9 | NGD-9 (Black & Gold) | 1147885029 | 1147885029 |
weapon_ngd9_black | NGD-9 (Black) | 3577673757 | -717293539 |
weapon_ngd9_white | NGD-9 (White) | 4055410853 | -239556443 |
weapon_ngd9_fde | NGD-9 (FDE) | 1837358766 | 1837358766 |
component_ngd9_clip_02 | NGD-9 Extended Magazine (31) | 205001392 | 205001392 |
component_ngd9_supp | NGD-9 Suppressor | 2151551985 | -2143415311 |
component_ngd9_flsh | NGD-9 Weapon Light | 1324194210 | 1324194210 |
component_ngd9_scope | NGD-9 Red Dot Sight | 229549350 | 229549350 |