Problem with RCON commands.
#1

Hi there folks!

I`ve got a little problem. I`m getting some data from a MySQL table and then I want to set the gamemode, hostname and mapname using that data and this code:

Код:
	new gamemodetext[sizeof(gamemode)]; format(gamemodetext, sizeof(gamemodetext), "/rcon gamemodetext %s", gamemode);
	new hostnametext[sizeof(hostname)]; format(hostnametext, sizeof(hostnametext), "/rcon hostname %s", hostname);
	new mapnametext[sizeof(mapname)]; format(mapnametext, sizeof(mapname), "/rcon mapname %s", mapname);
	SendRconCommand(gamemodetext);
	SendRconCommand(hostnametext);
	SendRconCommand(mapnametext);
I`m using this in a function in the OnGamemodeInit callback but it doesn`t do anything. Any help?
Reply
#2

nvm..
Reply
#3

You don't need the /rcon prefix when using SendRconCommand. Just use it like if you were typing directly into the console.
Reply
#4

Okay, worked, thanks. Maybe it was too late and I was too tired to see that
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)