Skip to main content

Installation Steps

1

Install dependencies

Verify all dependencies below are started before this script in your server.cfg.

ox_lib

Download ox_lib
2

Extract and place the resource

Extract the script from the zip file and place it into your standalone folder or a folder that starts before your scripts.
3

Add items to your inventory

Add the items below and the images from the images folder (gasmask.png, nightvision.png) to your inventory.
The images are provided in the images folder that you downloaded. For ox_inventory, the client.event fields are required so using the item triggers the mask/goggles logic.
4

Configure the resource

Open config.lua and set your Framework, Inventory, and Notification. See the configuration section below for details.
5

Add to server.cfg

Make sure ox_lib is started before the script.

Configuration

Below is the configuration file with explanations for each option.

General Settings

string
default:"qb-core"
Framework adapter. Options: "qb-core", "qbox", "esx", or "custom".
string
default:"ox"
Inventory adapter. Options: "ox", "qs", "qb", "codem", "esx", "lj", or "ps".
string
default:"ox"
Notification system. Options: "ox", "qb", or "esx".
number
default:"5000"
Duration in milliseconds for notifications.

Gas Mask

string
default:"gasmask"
Usable item name for the gas mask.
number
default:"129"
Ped mask component drawable ID (component slot 1). Adjust if your clothing pack uses different drawables.
number
default:"1"
Texture variation for the gas mask clothing drawable.

Night Vision Goggles

string
default:"nightvision"
Usable item name for the night vision goggles.
number
default:"119"
Hat/prop index (prop slot 0). When night vision or thermal is active, the script uses Clothing - 1 for the on state.
Clothing drawable IDs may need adjusting per clothing pack. Equipping the gas mask also applies toxic/smoke entity proofs so the player is protected from gas and smoke effects.