Executing RCON commands in ES using Python
3 posters
Page 1 of 1
Executing RCON commands in ES using Python
The PSL match server seems to run a highly modified Soccer Mod, so I thought someone might be able to help me. I am trying to change some CVARs when a match starts, but can't figure out the commands in eventscripts that allows this. I just want to change alltalk and set a server pw when a match is started.
I tried putting this in the match start function in match.py and something similar in the stop function. This didn't work. Am I missing something?
I tried putting this in the match start function in match.py and something similar in the stop function. This didn't work. Am I missing something?
- Code:
def start(userid):
player = playerlib.getPlayer(userid)
if es.ServerVar("sm_cap_fight_started") == 0:
if es.ServerVar("sm_training_cannon_on") == 0:
if es.ServerVar("sm_training_goals_disabled") == 0:
if es.exists("keygroup", "sm_keygroup_vote") == 0:
if es.ServerVar("sm_match_started") == 0:
# SET PW AND ALLTALK
es.forcevalue sv_alltalk 0
es.xforcevalue sv_password "pug"
freeze()
Stoicblitzer- Site Professional
- PSL Awards : N/A
Posts : 176
Re: Executing RCON commands in ES using Python
es.queueservercmd ("sv_alltalk 0")
Stinger- Site QT
- PSL Awards : 36 Awards (Click to view)
Posts : 1849
Re: Executing RCON commands in ES using Python
Thanks for putting me on the right track. That is incorrect.
es.server.queuecmd("sv_alltalk 1")
es.server.queuecmd("sv_alltalk 1")
Stoicblitzer- Site Professional
- PSL Awards : N/A
Posts : 176
Re: Executing RCON commands in ES using Python
Op! Sorry. That was just based off memory, I wasn't on comp to check it. Assuming its all working now?
Stinger- Site QT
- PSL Awards : 36 Awards (Click to view)
Posts : 1849
Re: Executing RCON commands in ES using Python
Yep. It all works now. ty again.
Stoicblitzer- Site Professional
- PSL Awards : N/A
Posts : 176
Re: Executing RCON commands in ES using Python
what's the ip stoic
Furtif- Site Beast
- PSL Awards : 5 Award (Click to view)
Posts : 383
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|