ngd-45

A custom .45 handgun in four finishes with an extended magazine and suppressor, for FiveM!

NGD-45

NGD-45

Installation Steps

  1. Install ngd_45
    Place ngd_45 into your resources folder and ensure ngd_45 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_NGD45.png, the attachments in lowercase like ngd45_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_NGD45'] = { label = 'NGD-45 (Black)', weight = 1100, durability = 0.2, ammoname = 'ammo-45' },
['WEAPON_NGD45_DESERT'] = { label = 'NGD-45 (Desert)', weight = 1100, durability = 0.2, ammoname = 'ammo-45' },
['WEAPON_NGD45_TACTICAL'] = { label = 'NGD-45 (Tactical)', weight = 1100, durability = 0.2, ammoname = 'ammo-45' },
['WEAPON_NGD45_COCOBOLO'] = { label = 'NGD-45 (Blued Cocobolo)', weight = 1100, durability = 0.2, ammoname = 'ammo-45' },

Add these inside Components = { ... } in the same file:

code
['ngd45_clip_ext'] = { label = 'NGD-45 Extended Magazine (26)', weight = 220, type = 'magazine', client = { component = { `COMPONENT_NGD45_CLIP_02` }, usetime = 2500 } },
['ngd45_suppressor'] = { label = 'NGD-45 Suppressor', weight = 320, type = 'muzzle', client = { component = { `COMPONENT_NGD45_SUPP` }, usetime = 2500 } },

The ammo is ammo-45, 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_ngd45 = { name = 'weapon_ngd45', label = 'NGD-45 (Black)', weight = 1100, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_ngd45.png', unique = true, useable = false, shouldClose = true, combinable = nil, description = '' },
weapon_ngd45_desert = { name = 'weapon_ngd45_desert', label = 'NGD-45 (Desert)', weight = 1100, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_ngd45_desert.png', unique = true, useable = false, shouldClose = true, combinable = nil, description = '' },
weapon_ngd45_tactical = { name = 'weapon_ngd45_tactical', label = 'NGD-45 (Tactical)', weight = 1100, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_ngd45_tactical.png', unique = true, useable = false, shouldClose = true, combinable = nil, description = '' },
weapon_ngd45_cocobolo = { name = 'weapon_ngd45_cocobolo', label = 'NGD-45 (Blued Cocobolo)', weight = 1100, type = 'weapon', ammotype = 'AMMO_PISTOL', image = 'weapon_ngd45_cocobolo.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_ngd45`] = { name = 'weapon_ngd45', label = 'NGD-45 (Black)', weapontype = 'Pistol', ammotype = 'AMMO_PISTOL', damagereason = 'Pistoled / Blasted / Plugged / Bust a cap in' },
[`weapon_ngd45_desert`] = { name = 'weapon_ngd45_desert', label = 'NGD-45 (Desert)', weapontype = 'Pistol', ammotype = 'AMMO_PISTOL', damagereason = 'Pistoled / Blasted / Plugged / Bust a cap in' },
[`weapon_ngd45_tactical`] = { name = 'weapon_ngd45_tactical', label = 'NGD-45 (Tactical)', weapontype = 'Pistol', ammotype = 'AMMO_PISTOL', damagereason = 'Pistoled / Blasted / Plugged / Bust a cap in' },
[`weapon_ngd45_cocobolo`] = { name = 'weapon_ngd45_cocobolo', label = 'NGD-45 (Blued Cocobolo)', 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_ngd45 = 0.15,
weapon_ngd45_desert = 0.15,
weapon_ngd45_tactical = 0.15,
weapon_ngd45_cocobolo = 0.15,

The attachments use the standard qb-core attachment items (clip_attachment and suppressor_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 26 round magazine:

code
weapon_ngd45 = `COMPONENT_NGD45_CLIP_02`,
weapon_ngd45_desert = `COMPONENT_NGD45_CLIP_02`,
weapon_ngd45_tactical = `COMPONENT_NGD45_CLIP_02`,
weapon_ngd45_cocobolo = `COMPONENT_NGD45_CLIP_02`,

In suppressor_attachment:

code
weapon_ngd45 = `COMPONENT_NGD45_SUPP`,
weapon_ngd45_desert = `COMPONENT_NGD45_SUPP`,
weapon_ngd45_tactical = `COMPONENT_NGD45_SUPP`,
weapon_ngd45_cocobolo = `COMPONENT_NGD45_SUPP`,

Optionally add recoil to the recoils table in qb-weapons/client/recoil.lua, matching the vanilla Pistol:

code
[`weapon_ngd45`] = 0.5,
[`weapon_ngd45_desert`] = 0.5,
[`weapon_ngd45_tactical`] = 0.5,
[`weapon_ngd45_cocobolo`] = 0.5,
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_NGD45", label = "NGD-45 (Black)", components = {
    { name = "clip_extended", label = "Extended Magazine (26)", hash = `COMPONENT_NGD45_CLIP_02` },
    { name = "suppressor", label = "Suppressor", hash = `COMPONENT_NGD45_SUPP` },
} },
{ name = "WEAPON_NGD45_DESERT", label = "NGD-45 (Desert)", components = {
    { name = "clip_extended", label = "Extended Magazine (26)", hash = `COMPONENT_NGD45_CLIP_02` },
    { name = "suppressor", label = "Suppressor", hash = `COMPONENT_NGD45_SUPP` },
} },
{ name = "WEAPON_NGD45_TACTICAL", label = "NGD-45 (Tactical)", components = {
    { name = "clip_extended", label = "Extended Magazine (26)", hash = `COMPONENT_NGD45_CLIP_02` },
    { name = "suppressor", label = "Suppressor", hash = `COMPONENT_NGD45_SUPP` },
} },
{ name = "WEAPON_NGD45_COCOBOLO", label = "NGD-45 (Blued Cocobolo)", components = {
    { name = "clip_extended", label = "Extended Magazine (26)", hash = `COMPONENT_NGD45_CLIP_02` },
    { name = "suppressor", label = "Suppressor", hash = `COMPONENT_NGD45_SUPP` },
} },
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_ngd45 = { label = "NGD-45 (Black)", weight = 1100, type = "weapon", unique = true, description = "" },
weapon_ngd45_desert = { label = "NGD-45 (Desert)", weight = 1100, type = "weapon", unique = true, description = "" },
weapon_ngd45_tactical = { label = "NGD-45 (Tactical)", weight = 1100, type = "weapon", unique = true, description = "" },
weapon_ngd45_cocobolo = { label = "NGD-45 (Blued Cocobolo)", weight = 1100, 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_ngd45NGD-45 (Black)2606533032-1688434264
weapon_ngd45_desertNGD-45 (Desert)17847474931784747493
weapon_ngd45_tacticalNGD-45 (Tactical)17877654271787765427
weapon_ngd45_cocoboloNGD-45 (Blued Cocobolo)20926465052092646505
component_ngd45_clip_02NGD-45 Extended Magazine (26)10880059851088005985
component_ngd45_suppNGD-45 Suppressor3419764175-875203121