Hey SP community!
I had a simple question but can't find it anywhere when googling about it.
I'm looking for a way to change the message in the picture which is included in the attachments.
It's basically the message you get when your server restarts/crashes. I've seen some servers that have this message customized, so I know it's possible.
Thanks in advance!
PS: My csgo is in dutch, but you get the idea hehe..
Changing the csgo disconnect message
-
- Junior Member
- Posts: 17
- Joined: Thu Jan 28, 2021 3:54 pm
Changing the csgo disconnect message
- Attachments
-
- csgo_ik0m2iZoCu.png (12.25 KiB) Viewed 5406 times
Re: Changing the csgo disconnect message
One way to have a custom server shutdown message would be to kick all the players with the custom message, and then shut the server down: And then you can use the quit_ex command through the server console or rcon:
Syntax: Select all
# ../shutdown_message/shutdown_message.py
# Source.Python
from commands.typed import TypedServerCommand
from engines.server import queue_command_string
from filters.players import PlayerIter
@TypedServerCommand('quit_ex')
def quit_extended(command, message):
"""Extended 'quit' server command with support for custom messages.
Args:
message (str): Disconnect message that's shown to the player(s).
"""
# Go through all players on the server.
for player in PlayerIter():
# Kick them with our custom message.
player.kick(message)
# Shut down the server.
queue_command_string('quit')
Code: Select all
quit_ex "Server is going down for maintenance"
Return to “General Discussion”
Who is online
Users browsing this forum: No registered users and 8 guests