How Integrations Work#
Water War talks to the rest of your server through a few small, open files under custom/. The framework is detected on start; everything else is either built in or a single function to change.
Layer | Supported | Without it |
|---|---|---|
Framework | es_extended · qb-core · qbx_core | Water War does not start. A framework is required. |
Database | oxmysql | Required. |
Zones and callbacks | ox_lib | Required. |
Money and items | Whatever your framework uses | — |
HUD | qs-interface | The HUD stays on while the creator is open. |
Notifications | Built into Water War's own interface | Nothing to install. |
Files under
config/,custom/andlocales/, plustypes.lua, are open and yours to edit. The rest of the resource is protected by Cfx escrow.
Frameworks#
Each framework has a pair of bridge files — one for the client, one for the server — in custom/esx/ and custom/qb/. They answer the handful of questions Water War asks about a player:
Question | ESX | QBCore · Qbox |
|---|---|---|
Who is this player |
|
|
Their name on the leaderboard | Character first and last name, from the player or the |
|
Their job and grade |
|
|
Are they staff | Group | Permission |
Pay a reward |
|
|
Give an item |
|
|
Qbox runs through the QBCore bridge, using the QBCore compatibility built into qbx_core. There is nothing extra to install.
A framework that is not listed#
Supporting another framework is one folder and one line:
Copy the closest bridge
Copy
custom/qb/orcustom/esx/to a new folder, for examplecustom/myframework/, with itsclient.luaandserver.lua.Change the calls inside
Keep every function name and what it returns; change only how each one asks your framework.
types.lualists every function, its arguments and its return value.Register it for detection
Add your core resource to the
frameworkslist at the top ofconfig/main.lua. The value is the folder name you chose:lua local frameworks = { ['es_extended'] = 'esx', ['qb-core'] = 'qb', ['qbx_core'] = 'qb', ['my_core'] = 'myframework', -- your core resource = your bridge folder }
Money Accounts#
Rewards are paid into the account named by Config.MoneyType:
Value | ESX | QBCore · Qbox |
|---|---|---|
| Cash | Cash |
| Bank | Bank |
| Black money | Not supported — nothing is paid |
Inventories and Weapons#
The water gun is handed out as a native GTA weapon — not as an inventory item — and taken back the same way. Nothing is added to or removed from anybody's inventory.
ox_inventory#
ox_inventory takes away weapons it did not hand out itself. Tell it to leave the water gun alone, in server.cfg:
setr inventory:ignoreweapons ["WEAPON_WATERGUN"]Without that line, players are disarmed the moment they walk into an arena. If you already ignore other weapons, add WEAPON_WATERGUN to the same list.
Other inventories#
Any inventory with a weapon anti-cheat may do the same. If the water gun vanishes as soon as it is handed out, add WEAPON_WATERGUN to that inventory's list of ignored or allowed weapons.
The player's own weapons#
With Config.RemoveWeaponsOnEnter, the standard GTA weapons a player is carrying are stored with their ammo when they walk in, and given back on the way out when Config.RestoreWeaponsOnExit is on. Weapons that live as items in an inventory are not touched — they stay in the inventory. Whatever a player draws inside, only water gun hits score.
The HUD and Notifications#
Hiding the HUD#
With qs-interface running, the player's HUD is hidden while the creator is open and shown again when it closes. For any other HUD, extend ToggleHud in custom/client.lua:
-- custom/client.lua
function ToggleHud(bool) -- false while the creator is open, true when it closes
if GetResourceState('qs-interface') == 'started' then
exports['qs-interface']:ToggleHud(bool)
end
-- call your own HUD here
endNotifications#
Water War shows its own messages — entering an arena, a round starting, the winner, the creator's confirmations — in its own interface, so nothing else is needed. To send them through your notification system instead, replace Notification in custom/client.lua. Every message the script sends, from the client or the server, passes through it; only the form hints inside the creator window stay in the window:
-- custom/client.lua
---@param type 'info' | 'error' | 'success'
function Notification(msg, type)
lib.notify({
title = 'Water War',
description = msg,
type = type == 'info' and 'inform' or type,
})
endLanguages#
Two complete translations ship in locales/: English (en) and Turkish (tr). Pick one with Config.Locale. The same file feeds the in-game messages and the whole interface — the creator, the battle card and the end screen.
Any other language is a single file:
Copy the English file
Copy
locales/en.jsontolocales/es.json— or the code of your language.Translate the values
Change the text on the right of each line and keep the keys on the left. Leave anything in double braces, such as
{{count}}, exactly as it is — it is filled in by the script.Select it
Set
Config.Locale = 'es'and restartqs-waterwar.
A key missing from your file falls back to English and is named in the console, so a half-finished translation still works. The file itself must exist: Config.Locale has to match a file name in locales/ exactly, without the .json.
The currency format#
Money on screen is written by Config.Intl, which takes a locale and standard Intl.NumberFormat options. It ships set to Turkish lira; for US dollars:
Config.Intl = {
locales = 'en-US',
options = {
style = 'currency',
currency = 'USD',
minimumFractionDigits = 0
}
}Euros written the Spanish way are locales = 'es-ES' with currency = 'EUR'; pounds are 'en-GB' with 'GBP'.



