Configuration

Tint items, the MK2 remap, and locales for WeaponTints.

Items

ItemLabelExportExtra
greentintGreen Weapon TintMrNewbWeaponTints.setweapontintserver.tint = 1
goldtintGold Weapon TintMrNewbWeaponTints.setweapontintserver.tint = 2
pinktintPink Weapon TintMrNewbWeaponTints.setweapontintserver.tint = 3
armytintArmy Weapon TintMrNewbWeaponTints.setweapontintserver.tint = 4
lspdtintLSPD Weapon TintMrNewbWeaponTints.setweapontintserver.tint = 5
orangetintOrange Weapon TintMrNewbWeaponTints.setweapontintserver.tint = 6
platinumtintPlatinum Weapon TintMrNewbWeaponTints.setweapontintserver.tint = 7
newbserialfileHeavy FileMrNewbWeaponTints.newbserialfileconsume = 0.50

The equipped weapon is required (ox_inventory:GetCurrentWeapon). usingItem returns false with no weapon in hand (item is not consumed) and true when a weapon is equipped. usedItem writes metadata, notifies, and disarms so the next draw shows the new tint or serial.

allowArmed = true is required on every item. Without it, ox_inventory blocks use while a weapon is out. Tint items omit consume. newbserialfile sets consume = 0.50 (two uses).

Green is a dark military green, not neon. Custom weapon streams that replace tint palettes can hide or clash with these indices.

Tint items set metadata.tint and metadata.weapontint (the item label) on the weapon slot. The serial file sets metadata.serial to the locale string WeaponTints.SerialRemoved (The serial number has been filed off in locales/en.json). ox_inventory applies metadata.tint when the weapon is drawn. weapontint is display-only.

MK2 weapons remap the vanilla tint id through a built-in table in resource/server/weapon_items.lua. A weapon is treated as MK2 when its item name contains MK2 (case-insensitive):

server.tintMK2 index
00
118
223
313
48
522
615
724

Unknown ids pass through unchanged. There is no tint 0 item. Custom MK2 weapons must include MK2 in the item name or they get vanilla tint ids.

Adding a tint

Duplicate a shipped tint in ox_inventory/data/items.lua, change the name, label, and server.tint (1–7). Keep server.export = 'MrNewbWeaponTints.setweapontint'. Copy a PNG whose filename matches the item name. Extra items only pick a different built-in GTA index — you cannot add a visual the game does not already ship.

Locales

locales/*.json, loaded with lib.locale(). ox_lib picks the client language. Edit locales/en.json (or add a file) and restart.

KeyWhen
WeaponTints.NotEquippedUse with no current weapon
WeaponTints.HasBeenAppliedTint applied (item.label, weapon.label)
WeaponTints.SerialRemovedWritten into metadata.serial
WeaponTints.SerialRemovedSuccessSerial file succeeded (weapon.label)

On this page