Commands#
Water War registers two commands, typed in the chat or the F8 console. Players never need either — they join a battle by walking into an arena.
Command | Who | Description |
|---|---|---|
| Creator access | Opens the Water War Creator. Anybody else sees You don't have permission for this action. Renamed with |
| Every player | Tunes the water jet live, in your own game only. Renamed with |
/waterfxdebugis not restricted, and its preview hands a water gun to whoever runs it. The gun does no damage, but on a live server you may want to rename the command to something only your staff know.
Binding the creator to a key#
The creator is also registered as a key binding with no key set. Anybody with creator access can bind it in Settings → Key Bindings → FiveM → Open Water War Creator. The permission check still applies.
Tuning the Water Jet#
/waterfxdebug changes the jet while you watch it. Start with preview, which equips the water gun and keeps the jet running without shooting, with the current values on screen:
Command | Does |
|---|---|
| Keep the jet visible while tweaking. Plain |
| Move the jet's start point. Without |
| Turn the jet, in degrees. Same rules. |
| Make the jet bigger or smaller. The mode is required: |
| How much |
| Write the current values to the F8 console, ready to paste. |
| Go back to the values the resource started with. |
| List the commands and the current values in F8. |
A typical session:
/waterfxdebug preview
/waterfxdebug rot add z 5 # turn it 5 degrees
/waterfxdebug off add x 0.01 # nudge it forward along X
/waterfxdebug scale set 0.4 # a little bigger
/waterfxdebug print
/waterfxdebug preview offprint writes three lines like these. Paste them over the matching lines of Config.WaterFx in config/main.lua and restart qs-waterwar:
offset = vec3(0.0100, 0.0000, 0.0000)
rotation = vec3(0.0000, 0.0000, -95.0000)
scale = 0.4000Everything
/waterfxdebugchanges lives in your own game, and only until the resource restarts. Other players keep seeing the values from the config file.
Client Events#
Water War has no exports to call. Your own client scripts can instead listen to the events the server sends to the players of an arena — every round, every update, every hit and every result. A battle pass, a stats board or an achievement system needs nothing more.
waterwar:battleStarted
Sent to everybody in the arena when a round starts, and to a player who walks into a round already running.
RegisterNetEvent('waterwar:battleStarted', function(data)
-- data.arenaId number
-- data.arenaName string
-- data.remainingTime seconds left in the round
-- data.players [serverId] = { id, name, score, identifier }
-- data.leaderboard { { id, name, score }, ... } best first
end)waterwar:battleUpdate
Sent once a second while a round runs, after every hit, and whenever somebody joins or leaves.
RegisterNetEvent('waterwar:battleUpdate', function(data)
-- data.arenaId
-- data.status 'active' | 'ending'
-- data.remainingTime
-- data.players
-- data.leaderboard
end)waterwar:hitRegistered
Sent to everybody in the arena for each hit that scored.
RegisterNetEvent('waterwar:hitRegistered', function(hit)
-- hit.id unique id of this hit
-- hit.attacker, hit.victim server ids
-- hit.attackerName, hit.victimName character names
end)waterwar:battleEnded
Sent to everybody in the arena when the clock runs out — after rewards have been paid — or when a round is cancelled.
RegisterNetEvent('waterwar:battleEnded', function(result)
-- result.arenaId
-- result.winner { id, name, score } — nil if the round was cancelled
-- result.leaderboard final standings, best first
-- result.rewards the arena's rewards — nil if cancelled
local me = GetPlayerServerId(PlayerId())
if result.winner and result.winner.id == me and result.winner.score > 0 then
-- this player won the round
end
end)The top of the board is reported as the winner even on zero points, so check the score when it matters — a winner on zero is not paid.
Showing a message in Water War's style#
Any server script can show a notification through Water War, for example to announce an event at an arena:
-- type: 'info' · 'error' · 'success'
TriggerClientEvent('waterwar:notification', source, 'The beach arena closes in 5 minutes', 'info')
-- everybody on the server
TriggerClientEvent('waterwar:notification', -1, 'Water War at the beach — now!', 'success')The battle events are for listening. Do not trigger them yourself: scores, the clock and rewards live on the server, and a battle card fed fake events falls out of step with the real round until the next one starts.
Console Output#
Water War prefixes everything it prints, so its lines are easy to find in a busy console — the server console for the server, F8 for each player's game:
Prefix | Means |
|---|---|
| Start-up: the framework bridge loaded, the server or the client is ready. |
| A module started, or the arenas were loaded and synced to a player. |
| Something unusual that did not stop anything. |
| An action failed — a refused save, a missing arena. The line names what and why; Common Errors lists them. |
| Step-by-step tracing, with the resource version. Only with |



