QBX Installation
Install oxide-weather on Qbox — disabling Renewed-Weathersync, updating qbx_adminmenu and qbx_bankrobbery, command replacements and admin permissions.
QBX-specific steps for oxide-weather on a Qbox (qbx_core) server. Follow Installation first — this page only covers what is different on QBX.
Requirements
qbx_coreoxmysqlox_libo-link(1.8.0 or newer)oxide-weatheroxide-tablet(optional, adds the weather app and widget)
Disable Your Existing Weather Sync
QBX recipes ship a weather and time script, and you must turn it off. oxide-weather replaces it completely.
Which one you have depends on your recipe. Look in your resources folder for either of these:
Renewed-Weathersync(the usual one on current Qbox recipes, normally in[standalone])qb-weathersync(older recipes carried over from QBCore)
If you leave one running you get two problems at once:
- Both scripts push weather to players every few seconds, so the sky flickers between two states.
- Both register a
/weathercommand, so whichever one wins is unpredictable and your Oxide subcommands stop working.
QBX starts whole folders, so deleting a line from server.cfg is not enough. The resource starts because it sits inside the folder. Move it out:
resources/[standalone]/Renewed-Weathersync -> resources/[disabled]/Renewed-WeathersyncDo not add ensure [disabled] to your config. Anything in there stays off.
Resources that use qb-weathersync
Renewed-Weathersync also answers calls made to qb-weathersync. Two stock QBX resources rely on that, so once it is gone each one needs a small edit. Search your resources folder for qb-weathersync to find every place, including scripts you added yourself.
| Resource | File | What it uses qb-weathersync for |
|---|---|---|
qbx_adminmenu | client/server.lua | The weather and time options in the server menu |
qbx_bankrobbery | server/main.lua | Turns the blackout on and off when every power station is hit |
qbx_core also fires qb-weathersync:client:EnableSync when a character spawns. Leave it alone. With nothing listening, it does nothing.
Admin menu weather and time options
In qbx_adminmenu/client/server.lua, replace
function(weather) TriggerServerEvent('qb-weathersync:server:setWeather', weather) end,
function(time) TriggerServerEvent('qb-weathersync:server:setTime', time) end,with
function(weather) ExecuteCommand('weather set ' .. weather) end,
function(time) ExecuteCommand(('weather time %s 0'):format(time)) end,These run the same /weather commands as typing them in chat, so the admin permission applies.
Bank robbery blackout
In qbx_bankrobbery/server/main.lua, replace
exports['qb-weathersync']:setBlackout(true)
exports['qb-weathersync']:setBlackout(false)with
exports['oxide-weather']:SetBlackout(true)
exports['oxide-weather']:SetBlackout(false)If you skip this, the robbery breaks once every power station is hit: the old call errors, so bank security never switches off.
Then allow qbx_bankrobbery to change the weather. oxide-weather refuses changes from any resource that is not on its trusted list. Without this, the power stations still go down but the lights stay on, and the console logs a warning naming qbx_bankrobbery.
Add it to Config.SetterResources in shared/config.lua:
Config.SetterResources = {
['oxide-developer'] = true,
['qbx_bankrobbery'] = true,
}Editing the file changes nothing. Run /weather settings, search for Trusted automation resources, add qbx_bankrobbery with Allow weather setters on, save, then run restart oxide-weather in the console. This setting only applies after a restart. See How configuration is stored.
Commands you lose, and what replaces them
Renewed-Weathersync and qb-weathersync register broadly the same set. Here is the mapping:
| Old command | Use this instead |
|---|---|
/weather <type> | /weather set <type> |
/time <hour> <minute> | /weather time <hour> <minute> |
/timescale <value> | /weather timescale <day> [night] |
/freezetime | /weather freeze |
/blackout | /weather blackout |
/morning | /weather time 9 0 |
/noon | /weather time 12 0 |
/evening | /weather time 18 0 |
/night | /weather time 23 0 |
Tell your admin team about this before you switch, so nobody thinks the server is broken.
Check for other weather scripts
Beyond the one your recipe shipped, check for:
cd_easytimevSyncorvsyncnight_natural_disasters
Any one of them will fight with oxide-weather. Stop them the same way.
Also turn off weather and time options in any admin menu you run (vMenu and similar), and stop using txAdmin's weather buttons.
Startup Order
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure o-link
ensure oxide-tablet # optional
ensure oxide-weathero-link must start after qbx_core and before oxide-weather.
If you start whole folders, make sure the effective order still puts o-link before oxide-weather.
Database (nothing to do)
oxide-weather creates its own tables the first time it starts. There is nothing to import. If your host does not let the database user create tables, run resources/[oxide]/oxide-weather/sql/install.sql by hand. Full details are in Installation → Database.
Admin Permission
/weather is admin-only. On QBX, the check passes if your account holds either the command permission or the admin permission.
Stock QBX already ships this line, so your existing admins usually pass with no changes:
add_ace group.admin command allowIf you want to be explicit, or your server.cfg does not have it, add both of these:
add_principal identifier.license:YOUR_LICENSE_HERE group.admin
add_ace group.admin admin allowBeing listed as an admin inside QBX itself is not enough on its own. The check is a server permission, not a framework permission.
The server console always counts as an admin.
QBX Runs Natively Through o-link
There is no QBX compatibility layer to switch on. o-link speaks QBX directly. oxide-weather asks it who is an admin and how to show a notification, and uses its callbacks, logging, shared map and optional tablet support, none of which needs anything from you. Nothing here depends on jobs, items or money, so there are no items to register and no job names to line up.
Verification on QBX
Renewed-Weathersync (or qb-weathersync) is not running. Check the txAdmin Resources page.[INFO][oxide-weather][lifecycle] Weather synchronization ready./weather opens the admin panel./weather set rain starts rain for every player within a few seconds./weather time 2 30 moves everyone's clock to 02:30.restart oxide-weather in the console, then rejoin. The time and weather come back where they were.