Page 1 of 1

How to run rcon commands

Posted: Tue Oct 02, 2018 9:27 am
by ward
Hey,
I couldn't find anything about running rcon commands through a plugin.

Wondering if anyone could help me out?

Re: How to run rcon commands

Posted: Tue Oct 02, 2018 2:58 pm
by VinciT
You can use queue_command_string for that:

Syntax: Select all

from engines.server import queue_command_string


# Change the map to de_dust2.
queue_command_string('changelevel de_dust2')

# Change the gravity.
queue_command_string('sv_gravity 200')

# Enable cheats.
queue_command_string('sv_cheats 1')

Re: How to run rcon commands

Posted: Tue Oct 02, 2018 8:37 pm
by ward
Thanks, exactly what I was looking for :>