Project Zomboid Admin Commands: Difference between revisions

From Survival Servers
Jump to navigation Jump to search
Luke (talk | contribs)
[wiki:wiki-operator] Search tuning: Build 42 commands added from the official wiki, safehouse release fixed, how to remove admin, Google title names both builds (approved by Ryan, 11/23)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==Running Server Commands==
{{#seo:
|title=Project Zomboid Admin Commands for Build 42 and Build 41
|description=Project Zomboid admin commands: press T to open chat, make a player admin with /setaccesslevel or log in as admin with your RCON Pass, then spawn and ban.
}}
==Running server commands==
Press the "T" key on your keyboard while in game to open chat.
Press the "T" key on your keyboard while in game to open chat.


==Adding Admins==
==Adding admins==
Admins can be added using '''/setaccesslevel "username" admin''' in chat. <br>
Admins can be added using '''/setaccesslevel "username" admin''' in chat. <br>
"By default, the server owner can login to their server using the username "admin" and their RCON password located in their control panel."
By default, the server owner can get admin rights by logging in to their server with the username "admin" and their RCON password. That's the '''RCON Pass''' in their Command Center.


==List Of Admin Commands==
To take admin away on Build 42, set the player back to a normal user: '''/setaccesslevel "username" user'''.
 
==List of admin commands==
{| class="wikitable"
{| class="wikitable"
! Command !! Description
! Command !! Description
|-
|-
| '''addalltowhitelist''' || Add all the current users who are connected with a password to the whitelist, so their account is protected.
| '''addalltowhitelist''' || Add all the current users who are connected with a password to the whitelist, so their account is protected. Switched off in Build 42.
|-
|-
| '''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\" count.
| '''additem''' || Give an item to a player. If you don't give a username, you get the item. Count is optional. Use: /additem "username" "module.item" count, ex : /additem "rj" Base.Axe 5
|-
|-
| '''additem''' || Use this command to add a new user to a whitelisted server. Use: /adduser \"username\" \"pwd\"
| '''addkey''' || Give a key to a player. If you don't give a username, you get the key. The key name is optional. Use: /addkey "username" "keyId" "name", ex /addkey "rj" "7295" "Gift Key"
|-
|-
| '''addusertowhitelist''' || Use this command to add a new user to a whitelisted server. Add a user connected with a password to the whitelist, so their account is protected. Use: /addusertowhitelist \"username\"
| '''adduser''' || Add a new user to a whitelisted server. Use: /adduser "username" "pwd"
|-
|-
| '''addvehicle''' || Spawn a vehicle. Use: /addvehicle \"script\" \"user or x,y,z\", ex /addvehicle \"Base.VanAmbulance\" \"rj\"
| '''addusertowhitelist''' || Add a user connected with a password to the whitelist, so their account is protected. Use: /addusertowhitelist "username". Switched off in Build 42.
|-
|-
| '''addxp''' || Give experience points to a player. Use: /addxp \"playername\" perkname=xp, ex /addxp \"rj\" Woodwork=2
| '''addvehicle''' || Spawn a vehicle. Use: /addvehicle "script" "user or x,y,z", ex /addvehicle "Base.VanAmbulance" "rj"
|-
|-
| '''alarm''' || Give experience points to a player. Sound a building alarm at the Admin's position. (Must be in a room.)
| '''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
| '''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\"
| '''banip''' || Use /banip IP to ban an&nbsp;IP&nbsp;address.
|-
| '''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"
|-
|-
| '''changeoption''' || Change a server option. Use: /changeoption optionName \"newValue\"
| '''checkmodsneedupdate''' || Use /checkmodsneedupdate to check whether any of the server's mods has an update. The answer goes to the&nbsp;server&nbsp;log.
|-
|-
| '''chopper''' || Place a helicopter event on a random player.
| '''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.
| '''createhorde''' || Spawn a horde near a player. Use : /createhorde count "username", ex /createhorde 150 "rj", username is optional except from the server console.
|-
|-
| '''createhorde2''' || UI_ServerOptionDesc_CreateHorde2
| '''godmod''' || Make a player invincible. If no username is set, you become invincible. Use: /godmode "username" -value, ex /godmode "rj" -true (could be -false). On Build 42, /godmode works on yourself only (/godmode -true). For another player, use /godmodeplayer "username" -value.
|-
| '''godmod''' || Make a player invincible. If no username is set, then you will become invincible. Use: /godmode \"username\" -value, ex /godmode \"rj\" -true (could be -false)
|-
|-
| '''gunshot''' || Place gunshot sounds on a random player.
| '''gunshot''' || Place gunshot sounds on a random player.
Line 42: Line 52:
| '''help''' || Provides a list of commands and info.
| '''help''' || Provides a list of commands and info.
|-
|-
| '''invisible''' || Make a player invisible to zombies. If no username is set then you will become invisible. Use: /invisible \"username\" -value, ex /invisible \"rj\" -true (could be -false)
| '''invisible''' || Make a player invisible to zombies. If no username is set, you become invisible. Use: /invisible "username" -value, ex /invisible "rj" -true (could be -false). On Build 42, /invisible works on yourself only (/invisible -true). For another player, use /invisibleplayer "username" -value.
|-
|-
| '''kickuser''' || Kick a user. Add a -r \"reason\" to specify a reason for the kick. Use: /kickuser \"username\" -r \"reason\"
| '''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)
| '''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.
| '''players''' || List all connected players.
Line 52: Line 62:
| '''quit''' || Save and quit the server.
| '''quit''' || Save and quit the server.
|-
|-
| '''releasesafehouse''' || Release a safehouse you own. Use: /safehouse release
| '''releasesafehouse''' || Use /releasesafehouse to release a safehouse&nbsp;you&nbsp;own.
|-
| '''reloadlua''' || Reload a Lua script. Use: /reloadlua "filename"
|-
|-
| '''reloadlua''' || Reload a Lua script. Use: /reloadlua \"filename\"
| '''reloadoptions''' || Reload server options (the server's .ini file, MyWorld.ini by default) and send them to connected players
|-
|-
| '''reloadoptions''' || Reload server options (ServerOptions.ini) and send to the clients
| '''reloadalllua''' || Use /reloadalllua to reload every Lua script on&nbsp;the&nbsp;server.
|-
|-
| '''removeuserfromwhitelist''' || Remove a user from the whitelist. Use: /removeuserfromwhitelist \"username\"
| '''removeuserfromwhitelist''' || Remove a user from the whitelist. Use: /removeuserfromwhitelist "username"
|-
|-
| '''removezombies''' || UI_ServerOptionDesc_RemoveZombies
| '''removeitem''' || Use /removeitem "module.item" count to remove items from yourself, ex /removeitem Base.Axe 5. A count of 0 removes every item of&nbsp;that&nbsp;type.
|-
|-
| '''replay''' || Record and play replay for moving player. Use: /replay \"playername\" -record|-play|-stop filename. Example: /replay user1 -record stadion.bin
| '''replay''' || Record and play replay for moving player. Use: /replay "playername" -record&#124;-play&#124;-stop filename. Example: /replay user1 -record stadion.bin. Not in Build 42.
|-
|-
| '''save''' || Save the current world.
| '''save''' || Save the current world.
|-
|-
| '''sendpulse''' || Toggle sending server performance info to this client. Use: /sendpulse
| '''sendpulse''' || Toggle sending server performance info to your game. Use: /sendpulse. Not in Build 42.
|-
|-
| '''servermsg''' || Broadcast a message to all connected players. Use: /servermsg my message !
| '''servermsg''' || Broadcast a message to all connected players. Use: /servermsg my message !
|-
|-
| '''setaccesslevel''' || Set access level of a player. Current levels: admin, moderator, overseer, gm, observer. Use: /setaccesslevel \"username\" \"accesslevel\", ex: /setaccesslevel \"rj\" \"moderator\"
| '''setpassword''' || Use /setpassword "username" "newpassword" to change a&nbsp;user's&nbsp;password.
|-
| '''setaccesslevel''' || Set access level of a player. Current levels on Build 42: admin, moderator, gm, observer, priority, user, banned. On Build 41: admin, moderator, overseer, gm, observer. Use: /setaccesslevel "username" "accesslevel", ex: /setaccesslevel "rj" "moderator"
|-
|-
| '''showoptions''' || Show the list of current server options and values.
| '''showoptions''' || Show the list of current server options and values.
|-
|-
| '''startrain''' || Start rain on the server.
| '''startrain''' || Start rain on the server. Use /startrain "intensity" to set its strength from 1 to 100, or leave the&nbsp;strength&nbsp;out.
|-
| '''startstorm''' || Start a storm on the server. Use /startstorm "duration" to set its length in game hours, or leave the&nbsp;length&nbsp;out.
|-
|-
| '''stoprain''' || Stop rain on the server.
| '''stoprain''' || Stop rain on the server.
|-
|-
| '''teleport''' || Teleport to a player. Once teleported, wait two seconds for map to appear. Use: /teleport \"playername\" or /teleport \"player1\" \"player2\", ex /teleport \"rj\" or /teleport \"rj\" \"toUser\"
| '''stopweather''' || Stop the weather on&nbsp;the&nbsp;server.
|-
| '''teleport''' || Teleport to a player. Once teleported, wait two seconds for map to appear. Use: /teleport "playername" or /teleport "player1" "player2", ex /teleport "rj" or /teleport "rj" "toUser"
|-
| '''teleportplayer''' || Use /teleportplayer "player1" "player2" to teleport the first player to&nbsp;the&nbsp;second.
|-
|-
| '''teleportto''' || Teleport to coordinates. Use: /teleportto x,y,z, ex /teleportto 100098,189980,0
| '''teleportto''' || Teleport to coordinates. Use: /teleportto x,y,z, ex /teleportto 10000,11000,0
|-
|-
| '''unbanid''' || Unban a SteamID. Use: /unbanid SteamID
| '''unbanid''' || Unban a SteamID. Use: /unbanid SteamID
|-
|-
| '''unbanuser''' || Unban a player. Use : /unbanuser \"username\"
| '''unbanip''' || Use /unbanip IP to unban an&nbsp;IP&nbsp;address.
|-
|-
| '''voiceban''' || Block voice from user \"username\". Use : /voiceban \"username\" -value, ex /voiceban \"rj\" -true (could be -false)
| '''unbanuser''' || Unban a player. Use : /unbanuser "username"
|-
|-
| '''voiceban''' || Block voice from user "username". Use : /voiceban "username" -value, ex /voiceban "rj" -true (could be -false)
|}
Server settings are in [[Project Zomboid Server Configuration|Project Zomboid Server Configuration]], and mods in [[Project Zomboid How to Add Mods|Project Zomboid: How to&nbsp;Add&nbsp;Mods]].
[https://www.survivalservers.com/services/game_servers/project_zomboid/ Rent a Project Zomboid server] from Survival Servers and be online in minutes.

Latest revision as of 07:42, 23 November 2026

Running server commands

Press the "T" key on your keyboard while in game to open chat.

Adding admins

Admins can be added using /setaccesslevel "username" admin in chat.
By default, the server owner can get admin rights by logging in to their server with the username "admin" and their RCON password. That's the RCON Pass in their Command Center.

To take admin away on Build 42, set the player back to a normal user: /setaccesslevel "username" user.

List of admin commands

Command Description
addalltowhitelist Add all the current users who are connected with a password to the whitelist, so their account is protected. Switched off in Build 42.
additem Give an item to a player. If you don't give a username, you get the item. Count is optional. Use: /additem "username" "module.item" count, ex : /additem "rj" Base.Axe 5
addkey Give a key to a player. If you don't give a username, you get the key. The key name is optional. Use: /addkey "username" "keyId" "name", ex /addkey "rj" "7295" "Gift Key"
adduser Add a new user to a whitelisted server. Use: /adduser "username" "pwd"
addusertowhitelist Add a user connected with a password to the whitelist, so their account is protected. Use: /addusertowhitelist "username". Switched off in Build 42.
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
banip Use /banip IP to ban an IP address.
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"
checkmodsneedupdate Use /checkmodsneedupdate to check whether any of the server's mods has an update. The answer goes to the server log.
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.
godmod Make a player invincible. If no username is set, you become invincible. Use: /godmode "username" -value, ex /godmode "rj" -true (could be -false). On Build 42, /godmode works on yourself only (/godmode -true). For another player, use /godmodeplayer "username" -value.
gunshot Place gunshot sounds on a random player.
help Provides a list of commands and info.
invisible Make a player invisible to zombies. If no username is set, you become invisible. Use: /invisible "username" -value, ex /invisible "rj" -true (could be -false). On Build 42, /invisible works on yourself only (/invisible -true). For another player, use /invisibleplayer "username" -value.
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 quit the server.
releasesafehouse Use /releasesafehouse to release a safehouse you own.
reloadlua Reload a Lua script. Use: /reloadlua "filename"
reloadoptions Reload server options (the server's .ini file, MyWorld.ini by default) and send them to connected players
reloadalllua Use /reloadalllua to reload every Lua script on the server.
removeuserfromwhitelist Remove a user from the whitelist. Use: /removeuserfromwhitelist "username"
removeitem Use /removeitem "module.item" count to remove items from yourself, ex /removeitem Base.Axe 5. A count of 0 removes every item of that type.
replay Record and play replay for moving player. Use: /replay "playername" -record|-play|-stop filename. Example: /replay user1 -record stadion.bin. Not in Build 42.
save Save the current world.
sendpulse Toggle sending server performance info to your game. Use: /sendpulse. Not in Build 42.
servermsg Broadcast a message to all connected players. Use: /servermsg my message !
setpassword Use /setpassword "username" "newpassword" to change a user's password.
setaccesslevel Set access level of a player. Current levels on Build 42: admin, moderator, gm, observer, priority, user, banned. On Build 41: admin, moderator, overseer, gm, observer. Use: /setaccesslevel "username" "accesslevel", ex: /setaccesslevel "rj" "moderator"
showoptions Show the list of current server options and values.
startrain Start rain on the server. Use /startrain "intensity" to set its strength from 1 to 100, or leave the strength out.
startstorm Start a storm on the server. Use /startstorm "duration" to set its length in game hours, or leave the length out.
stoprain Stop rain on the server.
stopweather Stop the weather on the server.
teleport Teleport to a player. Once teleported, wait two seconds for map to appear. Use: /teleport "playername" or /teleport "player1" "player2", ex /teleport "rj" or /teleport "rj" "toUser"
teleportplayer Use /teleportplayer "player1" "player2" to teleport the first player to the second.
teleportto Teleport to coordinates. Use: /teleportto x,y,z, ex /teleportto 10000,11000,0
unbanid Unban a SteamID. Use: /unbanid SteamID
unbanip Use /unbanip IP to unban an IP address.
unbanuser Unban a player. Use : /unbanuser "username"
voiceban Block voice from user "username". Use : /voiceban "username" -value, ex /voiceban "rj" -true (could be -false)

Server settings are in Project Zomboid Server Configuration, and mods in Project Zomboid: How to Add Mods.

Rent a Project Zomboid server from Survival Servers and be online in minutes.