Weapons

Welcome to Weapon System

For this section, if you do not have the minimum knowledge, or an experienced developer, avoid modifying or integrating custom weapons to your server to avoid errors, or problems with the inventory resource, with this we make clear that a support will not help you to configure a section like this to your server.

Weapon System

Quasar inventory provides you with a wide and configured weapon system, without the need to have another resource, DLC or buy any system, and the inventory incorporates it in the best way giving you a taste of the gameplay.

We can find much of the system fully configurable, but avoid editing part of this configuration if you do not have the basic skills or experience in the code.

What can we configure?

We have 3 main options very requested by the users, among them we have the configuration of ammunition limitation, this option limits you to a single clip in the weapon, which makes the experience more real in confrontations.

You can enable and disable the reload progressbar, this is more for those people who are bothered by a reload bar every time you reload your weapon, also you can reduce the reload time of the weapon in milliseconds, to the taste of each server.

Config.LimitAmmo = true   -- If you enable this feature, it will only allow one full magazine per weapon
Config.ReloadProgressbar = true
Config.ReloadTime = math.random(2000, 3000) -- Reload progressbar

Durability Multiplier

You can add individually to each weapon, the duration for the weapon to break, the higher the number, the faster the weapon will break, so this is a fully configurable option for the convenience of each server.

--Default config example
Config.DurabilityMultiplier = {
    ['weapon_pistol']                = 0.10,
    ['weapon_pistol_mk2']            = 0.10,
    ['weapon_pistolxm3']             = 0.10,
    ['weapon_combatpistol']          = 0.10,
}

Weapons Repair

With respect to the previous system, if weapons are likely to break, we also need to repair them, so the inventory also offers this option. You can place repair points of your choice all over the map if you wish to do so.

Config.WeaponRepairPoints = {
    [1] = {
        coords = vector3(964.02, -1267.41, 34.97),
        IsRepairing = false,
        RepairingData = {},
    }
}

Now that we have repair points, we have to have prices for repairing the weapons, where we can see the weapons divided by category, you can configure the price of repairing the weapons by category and configure the price to your needs.

Config.WeaponRepairCosts = {
    ['pistol'] = 1000,
    ['smg'] = 3000,
    ['mg'] = 4000,
    ['rifle'] = 5000,
    ['sniper'] = 7000,
    ['shotgun'] = 6000
}

Weapon Tints

The inventory also provides you with certain weapon tints defaults by item, so you can find these options in the Config.Tints section, if you know what you are doing it is a good option to implement more tints, again if you don't know what you are doing and have no knowledge in these topics, avoid editing.

Config.Tints = {
    ['black_weapontint'] = {
        component = 'black_weapontint',
        label = 'Black Tint',
        item = 'black_weapontint',
        tint = 0,
    },
}

URL Weapon Tints

With this function you can use a url_weapontint item which you can add a custom tint to the weapon, these weapons are placed in Config.WeaponTints in the config/weapons.lua, if you want to add more weapons to be compatible with this function, be aware of what you are doing.

Weapon Attachments

Now in this section the inventory offers you by default the configuration of the weapons that are in the game, prepared with their respective attachments in which we find the categories of defaultclip, extendedclip, flashlight, suppressor and luxury finish, as an example of some categories of attachments for this configuration of the weapon, if it is the case and you want to add custom weapons, you can follow the steps below.

Default example

Config.WeaponAttachments = {
    -- PISTOLS
    ['WEAPON_PISTOL'] = {
        ['defaultclip'] = {
            component = 'COMPONENT_PISTOL_CLIP_01',
            item = 'pistol_defaultclip',
            type = 'clip',
        },
        ['extendedclip'] = {
            component = 'COMPONENT_PISTOL_CLIP_02',
            item = 'pistol_extendedclip',
            type = 'clip',
        },
        ['flashlight'] = {
            component = 'COMPONENT_AT_PI_FLSH',
            item = 'pistol_flashlight',
        },
        ['suppressor'] = {
            component = 'COMPONENT_AT_PI_SUPP_02',
            item = 'pistol_suppressor',
        },
        ['luxuryfinish'] = {
            component = 'COMPONENT_PISTOL_VARMOD_LUXE',
            item = 'pistol_luxuryfinish',
            type = 'tint',
        },
    },
}

Last updated