Black Iced Rifle

Here we will explain how you can import the weapon in the inventory.

Install Folder

First and foremost, you need to download and move the cobra-blackicedrifle folder into your resources. After that, follow each step for your inventory.

Additionally, you can find the inventory image in the folder aswell.

Remember that for no matter the inventory, you can change the labels of each weapon to whatever you want.

ESX

Go to es_extended/config.weapons.lua and under the Weapons category you will import the following:

{
        name = 'WEAPON_ST_BLACKICEDRIFLE',
        label = 'Black Ice Rifle',
        ammo = {label = _U('ammo_rounds'), hash = GetHashKey("AMMO_RIFLE")},
        tints = Config.DefaultWeaponTints,
        components = {
            {name = 'clip_default', label = _U('component_clip_default'), hash = GetHashKey("COMPONENT_CARBINERIFLE_CLIP_01")},
            {name = 'scope_medium_3', label = _U('component_scope_medium_3'), hash = GetHashKey("ST_BLACKICEDRIFLE_SCOPE_MEDIUM_3")},
        }
},

OX Inventory

Go to ox_inventory/data/weapons.lua and under the Weapons category you will import the following:

['WEAPON_ST_BLACKICEDRIFLE'] = {
    label = 'Blacked Ice Rifle',
    weight = 3000,
    durability = 0.03,
    ammoname = 'ammo-rifle',
},

For the components, you will go to the Components category and import the following:

['blackiced_mag'] = {
    label = 'Black Iced Rifle Clip',
    type = 'magazine',
    weight = 280,
    client = {
        component = {
            `COMPONENT_CARBINERIFLE_CLIP_01`,
        },
        usetime = 2500
    }
},
['blackiced_scope'] = {
    label = 'Black Iced Rifle Scope',
    type = 'sight',
    weight = 280,
    client = {
	component = {
		`ST_BLACKICEDRIFLE_SCOPE_MEDIUM_3`,
	},
	usetime = 2500
    }
},

For the image, you go to ox_inventory/web/images and you upload the WEAPON_ST_BLACKICEDRIFLE.PNG to there.

QB Core

Step 1: Go to qb-core/shared/items.lua and import the following:

WEAPON_ST_BLACKICEDRIFLE            = { name = 'WEAPON_ST_BLACKICEDRIFLE', label = 'Black Iced Rifle', weight = 1000, type = 'weapon', ammoType = 'AMMO_RIFLE', image = 'WEAPON_ST_BLACKICEDRIFLE.png', unique = false, useable = false, description = 'Black Iced Rifle' },   

Step 2: Go to qb-core/shared/weapons.lua and import the following:

[`WEAPON_ST_BLACKICEDRIFLE`]            = { name = 'WEAPON_ST_BLACKICEDRIFLE', label = 'Black Iced Rifle', weapontype = 'Assault Rifle', ammotype = 'AMMO_RIFLE', damagereason = 'Ended / Rifled / Shot down / Floored' },

Step 3: Go to qb-weapons/config.lua and import the following:

  • At DurabilityMultiplier, add the following: WEAPON_ST_BLACKICEDRIFLE = 0.15

  • At WeaponAttachments, add the following at clip_attachment: weapon_st_blackicedrifle = `COMPONENT_CARBINERIFLE_CLIP_01`, and at medscope_attachment: weapon_st_blackicedrifle = `ST_BLACKICEDRIFLE_SCOPE_MEDIUM_3`,

Step 4: Go to qb-weapons/client/weapdraw.lua and import the following at weapons: 'WEAPON_ST_BLACKICEDRIFLE',

Step 5: Go to qb-weapons/client/recoil.lua and import the following at recoils: [`WEAPON_ST_BLACKICEDRIFLE`] = 0.3

Step 6: Go to qb-ambulancejob/config.lua and import the following at Weapons: [`WEAPON_ST_BLACKICEDRIFLE`] = Config.WeaponClasses['HIGH_CALIBER'],

For the image, you go to qb-inventory/html/images and you upload the WEAPON_ST_BLACKICEDRIFLE.PNG to there.

After this, go to server.cfg and add ensure cobra-blackicedrifle and restart the server.

Last updated