Tutorial / Settings
Mayor & Laws
The Mayor's commands: laws and the law board, lockdowns, wanted players and search warrants; the server's own laws.
What it does
Settings > Mayor & Laws (v3.6.21.4) sets up the Mayor. A player in a job with the Mayor ability (Settings > Jobs; there is a ready-made Mayor preset job) and toolbox admins use chat commands that start with "!":
| Command | Who | What it does |
|---|---|---|
!addlaw <law> |
Mayor, admins | Adds a law to the laws (and every law board); everyone is told |
!removelaw <number> |
Mayor, admins | Removes that law |
!resetlaws |
Mayor, admins | Back to the server's laws |
!laws |
Everyone | A window with the laws, the lockdown, who is wanted and search warrants (also E on a law board) |
!placelaws |
Mayor, admins | Puts a law board where you aim. A mayor has one (placing again moves it); admins' boards are the server's, saved for the map |
!lockdown [why] |
Mayor, admins | A lockdown: a siren, and a red banner tells everyone to get inside |
!unlockdown |
Mayor, admins | Ends the lockdown |
!wanted <name>, <why> |
Mayor, admins, police (a setting) | The player is wanted: everyone is told, WANTED shows over their head |
!unwanted <name>[, why] |
Same | No longer wanted |
!warrant <name>, <why> |
Mayor, admins | A search warrant: the police may open that player's property doors |
!unwarrant <name> |
Mayor, admins | Lifts the warrant |
Names can be part of a name; use a comma between the name and the reason (!wanted carl, robbed the bank), or quotes for names with spaces or commas (!wanted "John Doe" robbed the bank). Without either, the first word is the name. One command a second per player.
Where to find it
Q menu > KGX's Admin Toolbox > Settings > Mayor & Laws. Only superadmins change the server settings; admins edit the laws now.
The panel
| Option | What it does | Default |
|---|---|---|
| Mayor commands on | kgxat_mayor |
On |
| Also on DarkRP | kgxat_mayor_with_darkrp. DarkRP has its own /lockdown, /wanted, /warrant and laws; off: the toolbox leaves them (and !laws) to DarkRP. On: DarkRP's mayor and police jobs use the toolbox commands; warrants only open toolbox property doors. |
Off |
| The laws go back to the server's laws when no mayor is left | kgxat_law_reset: the last mayor leaves the job or the server. Their lockdown ends too. |
On |
| A siren when a lockdown starts | kgxat_lockdown_sound |
On |
| The police may also use !wanted and !unwanted | kgxat_wanted_police (jobs with the Police ability) |
On |
| WANTED over wanted players' heads | kgxat_wanted_tags; the police, the mayor and admins also see SEARCH WARRANT |
On |
| Most laws on the board | kgxat_law_max |
15 (1-40) |
| Most minutes a lockdown lasts | kgxat_lockdown_minutes, 0 = until !unlockdown |
5 |
| Seconds between two lockdowns | kgxat_lockdown_cooldown (the mayor; admins: none) |
120 |
| Minutes a player stays wanted | kgxat_wanted_minutes, 0 = until !unwanted or arrested |
10 |
| Minutes a search warrant lasts | kgxat_warrant_minutes |
5 |
The server's laws: one per line. A new mayor starts with them, and !resetlaws goes back to them. Use the example laws fills in six example laws (then Save the server's laws):
- Call the Mayor "Boss". If you do not, it is AOS/KOS.
- Guns out is KOS/AOS. This does not apply to law enforcement.
- Walking in the street for longer than 10 seconds is KOS/AOS after a warning.
- You need a hit to kill the Mayor.
- People may be checked for any reason at any time.
- If you have a problem with a law, talk to the Boss.
The laws now (admins): right-click a law to remove it, type a law and press Enter to add it, Back to the server's laws, Clear the laws, Show the laws window.
How to use it
Set up a Mayor
- Settings > Jobs > Add a preset job > Mayor (Mayor and Treasury abilities, one at a time).
- Here: Use the example laws, then Save the server's laws.
- The Mayor types
!placelawsat the town hall wall.
Tips and limits
- A wanted player who is jailed (arrested) is no longer wanted. Leaving and coming back does not clear it.
- Nobody clears their own wanted status or warrant (a wanted officer or mayor needs someone else).
- Laws, lockdown reasons and wanted reasons go through the chat filter. Gagged players cannot use the commands.
- After a restart or map change with no mayor, the laws go back to the server's laws a minute after the map starts.
- The ATB window has Laws, and for the Mayor: lockdown on / off and the law board (they can be HUD shortcuts too).
- Laws are kept over restarts (data/kgx_admin_toolbox/laws.json).