Cuxial Admin has no exports. Its public surface is one client event, the editable hooks and a few events from other resources that it listens to.
Client events
cuxial_admin:revived
Fired on the client of a player who has just been revived by the panel's own revive. It carries no arguments.
AddEventHandler('cuxial_admin:revived', function()
-- reset your own death state here
end)This event is not fired when cuxial_medical is running. In that case the revive goes through the medical system and the panel does nothing on its own.
Events it listens to
Cuxial Admin reacts to these events when another resource sends them. You do not need to do anything for them to work.
| Event | Side | Effect |
|---|---|---|
txAdmin:events:playerBanned | Server | Adds the ban to the sanctions history |
txAdmin:events:playerKicked | Server | Adds the kick to the sanctions history |
txAdmin:events:playerWarned | Server | Adds the warning to the sanctions history |
Hooks
hooks/server.lua and hooks/client.lua are the integration points. They stay editable after purchase: change them to connect a medical, key, fuel, appearance or weather system other than the default ones. Each function tells the panel whether your system handled the action.
Server · hooks/server.lua
| Hook | Returns | What it does |
|---|---|---|
Revive(target, by) | boolean | Revives a player. true if your system did it; false makes the panel use its own revive. Uses cuxial_medical when it is running. |
Heal(target) | boolean | Heals a player. |
Kill(target) | boolean | Kills a player through your medical system. |
HasAppearance() | boolean | true if an appearance editor is running. |
AddCommunityService(citizenid, amount, reason, staff) | boolean, string? | Gives community service. Uses cuxial_cmservices. |
RemoveCommunityService(citizenid, staff) | boolean, string? | Removes community service. |
weather.provider() | string? | Name of your weather system, or nil for the panel to apply time and weather by itself. av_weather and prim_climatime are detected. |
weather.zoned(kind) | boolean | true if that weather system works by zones. |
weather.setTime, setFreeze, setBlackout, setWeather, read | - | Apply or read time, freeze, blackout and weather on the system named by kind. |
Client · hooks/client.lua
| Hook | Returns | What it does |
|---|---|---|
HasKeys() | boolean | true if your key system is running. Default: cuxial_garages. |
GiveKeys(plate, vehicle) | - | Gives keys when a vehicle is spawned, its plate changes, or the panel gives keys. |
SetFuel(vehicle, level) | - | Sets the fuel level for the panel's refuel button. |
HasAppearance() | boolean | true if an appearance editor is running. |
OpenAppearance(variant) | - | Opens the editor. variant is appearance, clothing, barber, surgeon or outfits. |
RestoreWalk(ped) | - | Gives back the walk style when an effect ends. |
Internal events
Every other event and callback starting with cuxial_admin: is internal. They check the caller's rank on the server and may change without notice. Do not trigger them from your own resources.
