
Project Zomboid / Admin commands
Project Zomboid admin commands
All 64 chat commands of Build 42.22, read from the game's code. Each has what you type after it, the game's own help, the access level it needs and a line you can copy.
From the game files: Project Zomboid Build 42.22. Commands, roles and sandbox options read from projectzomboid.jar and the game's Lua.
Build a command
Pick a command, fill in the player, the item or the place, and copy the line into the chat.
Gives an item to you or to a player.
/additem Base.Axe 1
Names with spaces need the quotes, and the builder adds them. In the server console you type the same line without the slash.
How do you use a command?
Open the chat in a multiplayer game and type the command with a slash in front, such as /additem Base.Axe. /help lists the commands your access level allows. The game matches command names without caring about capitals, so /settimespeed works as well as /setTimeSpeed. Put a name or text with spaces in quotes: the game cuts the line at spaces and keeps a quoted part whole.
On a dedicated server you can type the same lines into the server console, without the slash. The console runs them as admin, which is why some commands want a player name there and work on you in the chat.
Do commands work in single player?
No. Single player has no chat window: the game only opens the chat when it is connected to a server. Two ways get you the same tools:
- Start the game with
-debug. Debug mode adds a debug menu with the item list, a cheats panel (god mode, no clip, instant actions and more) and a teleport. See debug mode. - Press Host in the main menu and play your world as a server. The game starts that server with an admin account (
-adminusername, named admin with Steam on), so you can use every command in the chat.
How do you make yourself admin?
On a game you host you already are. On a dedicated server, log in with the server's admin account: the server creates an account named admin with the admin role, plus the one you name with -adminusername and -adminpassword when you start it. From that account, or from the server console, give anyone a level:
/setaccesslevel "rj" admin
The levels are admin, moderator, gm, observer, priority, user and banned. Type them in lower case: the game looks the name up exactly. Nobody can hand out a level above their own, and the game answers "You do not have sufficient rights to set this access level." if you try. /grantadmin "rj" and /removeadmin "rj" do the same for admin alone. What each level may do is on access levels.
The help text of /setaccesslevel still names an Overseer level. Build 42.22 has no role of that name; the code points overseer at the gm role.
Cheats for you and other players
God mode, invisibility, no clip, teleports and skill XP.
| Command | What you type | What it does | Who can use it | Example |
|---|---|---|---|---|
/debugplayer | /debugplayer "username" | Turns debug on or off for one player's connection. | admin | /debugplayer "rj" |
/teleportalso /tp | /teleport "username"/teleport "player1" "player2" | Takes you to a player, or one player to another. Teleport to a player. Once teleported, wait for the map to appear. Use /teleport "playername" or /teleport "player1" "player2". Example /teleport "rj" or /teleport "rj" "toUser" | observer and above | /teleport "rj" |
/teleportplayeralso /tpp | /teleportplayer "player1" "player2" | Moves one player to another. Teleport a player to another player. Use /teleportplayer "player1" "player2". Example /teleportplayer "rj" "toUser" | gm and above | /teleportplayer "rj" "Kate" |
/teleporttoalso /tpto | /teleportto "username" x,y,z/teleportto x,y,z | Teleports you, or a player, to map coordinates. Teleport to coordinates. Use /teleportto x,y,z. Example /teleportto 10000,11000,0 | observer and above | /teleportto 10754,9926,0 |
/godmodealso /godmod | /godmode [-true|-false] | God mode for yourself: nothing hurts you. Make yourself invincible. Use: /godmode -value, ex /godmode -true (could be -false) | observer and above | /godmode -true |
/godmodeplayeralso /godmodplayer | /godmodeplayer "username" [-true|-false] | God mode for another player. Make a player invincible. Use: /godmodeplayer "username" -value, ex /godmodeplayer "rj" -true (could be -false) | gm and above | /godmodeplayer "rj" -true |
/noclip | /noclip "username" [-true|-false]/noclip [-true|-false] | Lets you walk through walls. Makes a player pass through walls and structures. Toggles with no value. Use: /noclip "username" -value. Example /noclip "rj" -true (could be -false) | observer and above | /noclip -true |
/invisible | /invisible [-true|-false] | Zombies stop seeing you. Make yourself invisible to zombies. Use: /invisible -value, ex /invisible -true (could be -false) | observer and above | /invisible -true |
/invisibleplayer | /invisibleplayer "username" [-true|-false] | Makes another player invisible to zombies. Make a player invisible to zombies. Use: /invisibleplayer "username" -value, ex /invisibleplayer "rj" -true (could be -false) | gm and above | /invisibleplayer "rj" -true |
/addxp | /addxp "username" perk=xp [-true|-false] | Gives XP in a skill. Give XP to a player. Use /addxp "playername" perkname=xp -true. Example /addxp "rj" Woodwork=2 -true. The last argument is optional and is used to take xp multiplier into account | gm and above | /addxp "rj" Woodwork=2 |
Items and keys
| Command | What you type | What it does | Who can use it | Example |
|---|---|---|---|---|
/additem | /additem "username" item [count]/additem item [count] | Gives an item to you or to a player. Give an item to a player. If no username is given then you will receive the item yourself. Count is optional. Use: /additem "username" "module.item" count. Example: /additem "rj" Base.Axe 5 | gm and above | /additem "rj" Base.Axe 5 |
/removeitem | /removeitem item count | Takes items out of your own inventory. Remove items from yourself. Removes all items of type if count set to 0. Use: /removeitem "module.item" count. Example: /removeitem Base.Axe 5 | moderator and above | /removeitem Base.Axe 1 |
/addkey | /addkey "username" keyId ["name"]/addkey keyId ["name"] | Gives a key with the number you pick. Give a key to a player. If no username is given then you will receive the item yourself. Key name is optional. Use: /addkey "username" "keyId" "name". Example: /addkey "rj" "7295 | gm and above | /addkey "rj" 7295 |
Vehicles
| Command | What you type | What it does | Who can use it | Example |
|---|---|---|---|---|
/addvehicle | /addvehicle vehicle/addvehicle vehicle x,y,z/addvehicle vehicle "username" | Spawns a vehicle next to a player or at coordinates. Spawn a vehicle. Use: /addvehicle "script" "user or x,y,z", ex /addvehicle "Base.VanAmbulance" "rj" | moderator and above | /addvehicle Base.VanAmbulance "rj" |
Zombies, weather and the world
| Command | What you type | What it does | Who can use it | Example |
|---|---|---|---|---|
/alarm | /alarm | Sets off a house alarm where you stand. You have to be inside a room. Sound a building alarm at the Admin's position. (Must be in a room) | gm and above | /alarm |
/chopper | /chopper [start|stop] | Sends the helicopter event to a random player. Place a helicopter event on a random player | gm and above | /chopper |
/startrain | /startrain [intensity] | Starts rain. You can give the strength from 1 to 100. Starts raining on the server. Use /startrain "intensity", optional intensity is from 1 to 100 | gm and above | /startrain 50 |
/stoprain | /stoprain | Stops the rain. Stop raining on the server | gm and above | /stoprain |
/thunder | /thunder ["username"] | Thunder near a player. Use /thunder "username", username is optional except from the server console | gm and above | /thunder |
/gunshot | /gunshot | A gunshot sound near a random player. Zombies hear it. Place a gunshot sound on a random player | gm and above | /gunshot |
/createhorde | /createhorde count ["username"] | Spawns a horde of zombies around a player. Spawn a horde near a player. Use : /createhorde count "username". Example /createhorde 150 "rj" Username is optional except from the server console. With no username the horde will be created around you | moderator and above | /createhorde 150 "rj" |
/createhorde2 | /createhorde2 -x x -y y -z z -count count -radius radius | Spawns zombies at coordinates, with the details the debug horde tool sets. | moderator and above | /createhorde2 -x 10754 -y 9926 -z 0 -count 50 -radius 10 |
/removezombies | /removezombies -x x -y y -z z -radius radius | Removes zombies around a spot, or all of them. | moderator and above | /removezombies -remove true |
/remove | /remove animals|zombies|corpses|vehicles | Removes all animals, zombies, corpses or vehicles that are loaded. | moderator and above | /remove zombies |
/list | /list animals | Lists the animals the server and your game know about. | user and above | /list animals |
/lightning | /lightning ["username"] | A lightning strike near a player. Use /lightning "username", username is optional except from the server console | gm and above | /lightning |
/stopweather | /stopweather | Stops the weather. Stop weather on the server | gm and above | /stopweather |
/startstorm | /startstorm [hours] | Starts a thunderstorm for the hours you give. Starts a storm on the server. Use /startstorm "duration", optional duration is in game hours | gm and above | /startstorm 6 |
/setTimeSpeedalso /sts | /setTimeSpeed multiplier | Makes time on the server run faster by the number you give. Set the time multiplier on the server. Use /setTimeSpeed period. Example /setTimeSpeed 10 | admin | /setTimeSpeed 10 |
/worldgen | /worldgen start|recheck|stop|status [option] | Runs the generator that builds the whole map ahead of time. Control full world generator. Use commands '/worldgen start', '/worldgen recheck', '/worldgen stop', and '/worldgen status'. Use | admin | /worldgen start |
Players, access levels and bans
| Command | What you type | What it does | Who can use it | Example |
|---|---|---|---|---|
/adduser | /adduser "username" ["password"] | Adds an account to a server that only lets listed accounts in. Use this command to add a new user to a whitelisted server. Use: /adduser "username" "password" -- password is optional | moderator and above | /adduser "rj" |
/addsteamid | /addsteamid SteamID | Lets a SteamID join the server. Use this command to add a SteamID to a list of allowed SteamIDs on server. Use: /addSteamID "steamid" | moderator and above | /addsteamid 76561198000000000 |
/removesteamid | /removesteamid SteamID | Takes a SteamID off the list of those allowed to join. Use this command to remove a SteamID from a list of allowed SteamIDs on server. Use: /removeSteamID "steamid" | moderator and above | /removesteamid 76561198000000000 |
/grantadmin | /grantadmin "username" | Makes a player an admin. | moderator and above | /grantadmin "rj" |
/removeadmin | /removeadmin "username" | Takes admin away from a player. | moderator and above | /removeadmin "rj" |
/kickuseralso /kick | /kickuser "username"/kickuser "username" -r "reason" | Kicks a player off the server, with a reason if you give one. Kick a user. Add a -r "reason" to specify a reason for the kick. Use: /kickuser "username" -r "reason" | moderator and above | /kickuser "rj" |
/banuser | /banuser "username"/banuser "username" -ip/banuser "username" -r "reason"/banuser "username" -ip -r "reason" | Bans a player, and their IP if you add -ip. Ban a user. Add a -ip to also ban the IP. Add a -r "reason" to specify a reason for the ban. Use: /banuser "username" -ip -r "reason". For example: /banuser "rj" -ip -r "spawn kill" | moderator and above | /banuser "rj" |
/banid | /banid SteamID | Bans a SteamID. Ban a SteamID. Use /banid SteamID | moderator and above | /banid 76561198000000000 |
/banip | /banip IP | Bans an IP address. Ban IP. Use /banip IP | moderator and above | /banip 192.168.1.20 |
/unbanuser | /unbanuser "username" | Lifts a player's ban. Unban a player. Use /unbanuser "username" | moderator and above | /unbanuser "rj" |
/unbanid | /unbanid SteamID | Lifts the ban of a SteamID. Unban a SteamID. Use /unbanid SteamID | moderator and above | /unbanid 76561198000000000 |
/unbanip | /unbanip IP | Lifts the ban of an IP address. Unban IP. Use /unbanip IP | moderator and above | /unbanip 192.168.1.20 |
/removeuserfromwhitelist | /removeuserfromwhitelist "username" | Takes an account off the whitelist. Remove a user from the whitelist. Use: /removeuserfromwhitelist "username" | moderator and above | /removeuserfromwhitelist "rj" |
/voiceban | /voiceban "username" [-true|-false]/voiceban [-true|-false] | Mutes a player's voice chat. Block voice from user "username". Use /voiceban "username" -value. Example /voiceban "rj" -true (could be -false) | moderator and above | /voiceban "rj" |
/players | /players | Lists the players online. List all connected players | observer and above | /players |
/setaccesslevel | /setaccesslevel "username" accesslevel | Sets a player's access level (role). Set access level of a player. Current levels: Admin, Moderator, Overseer, GM, Observer. Use /setaccesslevel "username" "accesslevel". Example /setaccesslevel "rj" "moderator" | moderator and above | /setaccesslevel "rj" admin |
/setpassword | /setpassword "username" "newpassword" | Sets a new password for an account. Use this command to change password for a user. Use: /setpassword "username" "newpassword" | moderator and above | /setpassword "rj" "newpassword" |
/removemapsymbolsforuser | /removemapsymbolsforuser "username" | Deletes all the map symbols a player shared. Removes all shared in-game map symbols for a specific user. Use /removemapsymbolsforuser "username" | moderator and above | /removemapsymbolsforuser "rj" |
Safehouses
| Command | What you type | What it does | Who can use it | Example |
|---|---|---|---|---|
/releasesafehouse | /releasesafehouse "title" | Frees a safehouse so it has no owner. Release a safehouse. Use /releasesafehouse "title" | moderator and above | /releasesafehouse "rj" |
/addtosafehouse | /addtosafehouse "title" "username" | Adds a player to a safehouse. Adds player to a safehouse. Use /addtosafehouse "title" "username" | moderator and above | /addtosafehouse "rj" "rj" |
/kickfromsafehouse | /kickfromsafehouse "title" "username" | Takes a player out of a safehouse. Removes player from a safehouse. Use /kickfromsafehouse "title" "username" | moderator and above | /kickfromsafehouse "rj" "rj" |
Running the server
| Command | What you type | What it does | Who can use it | Example |
|---|---|---|---|---|
/save | /save | Saves the world. Save the current world | admin | /save |
/servermsg | /servermsg "message" | Sends a message to every player on the server. Broadcast a message to all connected players. Use: /servermsg "My Message" | moderator and above | /servermsg "Restart in 10 minutes" |
/quit | /quit | Saves the world and shuts the server down. Save and quit the server | admin | /quit |
/reloadoptions | /reloadoptions | Reads ServerOptions.ini again and sends it to everyone. Reload server options (ServerOptions.ini) and send to clients | admin | /reloadoptions |
/changeoption | /changeoption optionName "newValue" | Changes one server option while the server runs. Change a server option. Use: /changeoption optionName "newValue" | admin | /changeoption PVP "false" |
/showoptions | /showoptions | Lists the server options and their values. Show the list of current server options and values. | observer and above | /showoptions |
/help | /help [command] | Lists the commands you can use, or explains one. Help | user and above | /help |
/clear | /clear | Clears the console. | user and above | /clear |
/reloadlua | /reloadlua "filename" | Loads one Lua file again on the server. Reload a Lua script on the server. Use /reloadlua "filename" | admin | /reloadlua "shared/defines.lua" |
/reloadallluaalso /reloadluaall | /reloadalllua | Loads all Lua files again on the server. Reload a Lua script on the server. Use /reloadlua "filename" | admin | /reloadalllua |
/log | /log "type" "level" | Sets how much the server writes to its log. Set log level. Use /log "packet type" "log severity" | moderator and above | |
/checkModsNeedUpdate | /checkModsNeedUpdate | Checks whether a mod of the server has an update and writes the answer to the log. Indicates whether a mod has been updated. Writes answer to log file | moderator and above | /checkModsNeedUpdate |
/stats | /stats mode [period] | Server statistics. Get server statistics. Use /stats help to get the details | moderator and above | /stats file 10 |
Commands every player can type
The game lists these for every player on a server, whatever the access level.
| Command | The game's help |
|---|---|
/help | Help |
/changepwd | Changes your password. Use /changepwd "previouspassword" "newpassword" |
/roll | If you have dice, you can roll a random number - up to 100. Use: /roll 6 |
/card | If you have a card deck, you can draw a random card. Use: /card |
/safehouse | Release a safehouse you own. Use /releasesafehouse |
Commands the game has switched off
The code still has these, marked as disabled, and the game skips them when it looks a command up: /connections, /addalltowhitelist and /addusertowhitelist. That is why /list gives the animal list: the connections command, which also answers to list, is one of them.
Where this list comes from
Each command is a class in projectzomboid.jar. Its annotations hold the name and any short names, the pattern of every argument, the key of its help text and the capability a role needs to use it. We read those for Build 42.22 and take the help text from the game's English translation, typos and cut-off lines included. The words for the arguments (username, item, count) are ours, one for each pattern of the code. Who can use a command comes from the default roles the code builds; a server can change them.