Admin commands

From PZwiki
Project ZomboidMultiplayerAdmin commands
UI Tick.png
This page has been revised for the current stable version (41.78.16).
Help by adding any missing content. [edit]

Project Zomboid has several admin commands that can be used through the chat as a server admin on multiplayer servers.

The following commands can be executed either on the server console window or in-game (preceded by a forward slash when used in-game) provided the user has admin status. Some things are case-sensitive (ex: Base.Axe works, but not base.axe)

A /help command can be used to display a full list of commands, or /help *command* to display the help tooltip for this command.

Command Description
addalltowhitelist Add all the current users who are connected with a password to the whitelist, so their account is protected.
additem Give an item to a player. If no username is given, then you will receive item. Count is optional. Use: /additem "username" "module.item" count, ex : /additem rj Base.Axe 1
adduser Use this command to add a new user to a whitelisted server. Use: /adduser "username" "pwd" ex: /adduser rj 12345
addusertowhitelist Add a user connected with a password to the whitelist, so their account is protected. Use: /addusertowhitelist "username" ex: /addusertowhitelist rj
addvehicle Spawn a vehicle. Use: /addvehicle "script" "user or x,y,z", ex: /addvehicle Base.VanAmbulance rj
addxp Give experience points to a player. Use: /addxp "playername" perkname=xp, ex: /addxp rj Woodwork=2
alarm Sound a building alarm at the Admin's position. (Must be in a room.)
banid Ban a SteamID. Use: banid SteamID
banuser 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
changeoption Change a server option. Use: /changeoption optionName "newValue" ex: changeoption SleepAllowed true
changepwd Use this command to change your password, use: /changepwd previouspwd newpwd
checkModsNeedUpdate Indicates whether a mod has been updated. Writes answer to log file (DebugLog-server.txt)
chopper Place a helicopter event on a random player
createhorde Spawn a horde near a player. Use: /createhorde count "username", ex: createhorde 150 rj, username is optional except from the server console.
createhorde2 Unknown (ERROR: Missing translation "UI_ServerOptionDesc_CreateHorde2")
godmode Make a player invincible. No username set will toggle self-invincibility. Use: /godmode "username" -value, ex godmode rj -true (could be -false)
grantadmin Grant the admin rights to a user, use: /grantadmin username
gunshot Place gunshot sounds on a random player
help Outputs a list and description of admin commands
invisible Make a player invisible to zombies. No username provided will toggle invisibility on yourself. Use: /invisible "username" -value, ex: invisible rj -true (could be -false).
kickuser Kick a user. Add a -r "reason" to specify a reason for the kick. Use: /kickuser "username" -r "reason"
noclip Makes a player pass through walls and structures. Toggles with no value. Use: /noclip "username" -value, ex: noclip rj -true (could be -false)
players List all connected players
quit Save and shut down the server
releasesafehouse Release a safehouse you own. Use: /safehouse release
reloadlua Reload a Lua script. Use: /reloadlua "filename"
reloadoptions Reload server options (servertest.ini by default) and send to the clients. Useful for implementing game setting changes while players are connected.
removeadmin Remove the admin rights to a user, use: /removeadmin "username"
removeuserfromwhitelist Remove a user from the whitelist. Use: /removeuserfromwhitelist "username"
removezombies Command name self-explanatory, but have not tested. (ERROR: Missing translation "UI_ServerOptionDesc_RemoveZombies")
replay Record and play replay for moving player. Use: /replay "playername" -record\-play\-stop \filename.\ Example: /replay user1 -record test.bin
save Saves the current game world
servermsg Broadcast a message to all connected players. Use: /servermsg "text"
setaccesslevel Set access level of a player. Current levels: admin, moderator, overseer, gm, observer. E.g. setaccesslevel userName admin / Note: To remove any access level, use "none" in place of admin.
showoptions Show the list of current server options and values.
startrain Start rain on the server
stoprain Stop rain on the server
teleport Teleport to a player. Use: /teleport "playername" or /teleport "player1" "player2", ex /teleport "rj" or /teleport "rj" "toUser"
teleportto Teleport to coordinates. Use: /teleportto x,y,z, ex /teleportto 100098,189980,0
unbanid Unban a SteamID. Use: /unbanid SteamID
unbanuser Unban a player. Use: /unbanuser "username"
voiceban Block voice from user "username". Use: /voiceban "username" -value, ex /voiceban "rj" -true (could be -false)

[verify]