Commands#
Lifeguard Job registers a single command. Everything a lifeguard does happens at the stations, so there is nothing for players to type.
Command | Where | Description |
|---|---|---|
| In game | Opens the settings panel; typing it again closes it. Needs the ACE |

Documentation
The Lifeguard Job admin command, the IsPlayerOnMission server export, the events fired on every paid call-out and level-up, and the id of every call-out.
Lifeguard Job registers a single command. Everything a lifeguard does happens at the stations, so there is nothing for players to type.
Command | Where | Description |
|---|---|---|
| In game | Opens the settings panel; typing it again closes it. Needs the ACE |
restart qs-lifeguardServer console |
Not the job's own, but the one you will use: it applies the settings saved from the panel. It also ends every shift in progress. |
The command's name, its ACE and whether the panel exists at all are set in Config.AdminPanel:
Config.AdminPanel = {
Enabled = true, -- false turns the panel off entirely
Ace = 'command.lifeguard', -- checked on every action, server side
ConfigCommand = 'lifeguardadmin', -- '' removes the command
}For another resource that needs to know whether a lifeguard is busy — before a job change, a teleport, a robbery or a second job's shift.
Whether the player is taking part in the cooperative rescue running right now. It reads the server's own list of participants, never anything a client reported.
local busy = exports['qs-lifeguard']:IsPlayerOnMission(source)
if busy then
-- in the middle of a shared rescue: refuse, warn or wait
end
-- returns true or falseIt answers for cooperative rescues only, which the server follows from start to finish. A solo call-out is not reported, so a player who crashed out of one is never held up by it.
Two events report what the job has just done, for an achievement system, a battle pass, a phone app or your own logs.
Raised on the server after every paid solo call-out, once the money and experience have been granted. money is what was actually paid, vehicle bonus included.
AddEventHandler('qs-lifeguard:internalRecordIncident', function(src, incidentId, xp, money)
print(('%s cleared %s: $%d and %d XP'):format(GetPlayerName(src), incidentId, money, xp))
end)Sent to the player's client every time they are granted experience, solo or cooperative.
RegisterNetEvent('qs-lifeguard:progressionUpdated', function(level, xp, xpRequired, leveledUp, earned)
-- level the level now
-- xp experience towards the next one
-- xpRequired what the next level costs
-- leveledUp true if this grant crossed a level
-- earned experience granted this time
if leveledUp then
-- celebrate
end
end)What incidentId can be, and the id of each entry in config/incidents.lua:
ID | Call-out | ID | Call-out |
|---|---|---|---|
| Jellyfish Sting |
| Rip Current |
| Swimmer in Danger |
| Drifting Boat |
| Fallen Warning Flag |
| Heatwave Victims |
| Illegal Campfire |
| Lost Pet |
| Disruptive Bather |
| Emergency Flags |
| Exhausted Swimmer |
| Shark Alert |
| Stranded Boat |
| Drowned Bather |
| Medical Supplies |
| Missing Surfer (co-op) |
| Missing Runner |
| Sinking Vessel · Shark Alert (co-op) |
Each id is played by a scene built into the job. A call-out can be moved, re-priced, given new places or switched off (
weight = 0), but an entry with an id of your own has no scene behind it and never turns up.