Switch modules off#
In config.lua, set any module you do not want to false:
SmallConfig.modules.qbx_editor = false
SmallConfig.modules.zoom = false
SmallConfig.modules.qbx_cruise = false
Run without the optional Glitch Studios resources#
Set the bridges and hooks you do not use to false:
SmallConfig.bridge.appearance = 'illenium-appearance'
SmallConfig.bridge.lastStand = false
SmallConfig.bridge.staffLog = false
SmallConfig.hooks.buffs = false
SmallConfig.hooks.afkExemptState = false
SmallConfig.hooks.stolenVehicleState = false
SmallConfig.hooks.lockpickItems = false
Add an elevator#
qbx_teleports/config.json holds a list of passages. Each passage is a list of at least two levels. Coordinates are [x, y, z] or [x, y, z, heading]:
{
"teleports": [
[
{ "coords": [100.0, 200.0, 30.0, 90.0], "drawText": "Ground floor" },
{ "coords": [100.0, 200.0, 60.0, 90.0], "drawText": "Roof", "allowVehicle": false }
]
]
}
A passage with fewer than two levels is ignored.
Hide a map prop#
qbx_removeentities/config.json has two lists. Entries in hide model-hide a static map object at an exact spot. hash can be a model name or a number, and radius defaults to 1.0. Entries in objects delete a spawned object near its coordinates, checked every 5 seconds, and need a numeric hash:
{
"objects": [],
"hide": [
{ "hash": "prop_tree_pine_01", "coords": [10.0, 20.0, 30.0], "radius": 2.0 }
]
}
Add a no-NPC zone#
In qbx_ignore/config.lua, points are the corners in order around the shape and minZ and maxZ set the height range:
noNpcZones = {
{ label = 'My MLO', minZ = -10.0, maxZ = 40.0, points = {
{ x = 0.0, y = 0.0 }, { x = 10.0, y = 0.0 }, { x = 10.0, y = 10.0 }, { x = 0.0, y = 10.0 },
} },
},
Set debugNoNpcZones = true and restart the resource to see the zones drawn in red within 300 m.
Make fist fights less forgiving#
In qbx_knockout/config.lua:
fistDamageScale = 1.0, -- vanilla fist damage, so fewer punches to a knockout
lethalWhileOut = false, -- fists can never finish a knocked out player
knockedOut = 10000, -- ten seconds on the ground
Call the exports from another script#
-- Server: stop the AFK kick during a stationary task
exports['glitch-smallresources']:ResetAFK(source)
-- Server: end a carry before seating the carried player in a vehicle
local carried = exports['glitch-smallresources']:GetCarried(source)
if carried then
exports['glitch-smallresources']:StopCarry(source)
end
-- Server: let a staff spawner create a blacklisted model (true if allowed)
local ok = exports['glitch-smallresources']:AllowBlacklisted('shamal', source)
-- Server: kick with the scene (kind is 'kick' or 'ban', and the scene respects useOnKick and useOnBan)
exports['glitch-smallresources']:KickWithScene(target, 'Reason shown to the player', 'kick')
-- Client: knock the player out, for example after an overdose, and wake them early
exports['glitch-smallresources']:KnockOut()
exports['glitch-smallresources']:WakeUp(true)
-- Client: hide a HUD component while your UI is open
exports['glitch-smallresources']:AddDisableHudComponents({ 14 })
Show a notification through the hook event#
With SmallConfig.hooks.notifyEvents on, any resource can show an ox_lib notification or text UI:
TriggerClientEvent('glitch-notify', source, {
title = 'Garage',
description = 'Your vehicle is ready.',
type = 'success',
duration = 5000,
})
TriggerClientEvent('glitch-textui', source, { text = 'Hold to open', icon = 'door-open' })
TriggerClientEvent('glitch-textui:hide', source)