ngd-9

A custom 9mm handgun in four finishes with an extended magazine, suppressor, weapon light and red dot, for FiveM!

NGD-9

NGD-9

Installation Steps

  1. Install ngd_9
    Place ngd_9 into your resources folder and ensure ngd_9 in your server.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.

  2. 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.

  3. Copy Images
    Move the images from the img folder into your inventory's images folder. The weapons are named in uppercase like WEAPON_NGD9.png, the attachments in lowercase like ngd9_suppressor.png. Inventories that use lowercase item names, such as qb-inventory, need the weapon files renamed to lowercase.

  4. 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:

code
['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:

code
['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:

code
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:

code
[`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:

code
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:

code
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:

code
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:

code
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):

code
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:

code
[`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:

code
{ 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:

code
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 nameLabelHashHash (signed)
weapon_ngd9NGD-9 (Black & Gold)11478850291147885029
weapon_ngd9_blackNGD-9 (Black)3577673757-717293539
weapon_ngd9_whiteNGD-9 (White)4055410853-239556443
weapon_ngd9_fdeNGD-9 (FDE)18373587661837358766
component_ngd9_clip_02NGD-9 Extended Magazine (31)205001392205001392
component_ngd9_suppNGD-9 Suppressor2151551985-2143415311
component_ngd9_flshNGD-9 Weapon Light13241942101324194210
component_ngd9_scopeNGD-9 Red Dot Sight229549350229549350