Problem with RCON commands. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Problem with RCON commands. (
/showthread.php?tid=248596)
Problem with RCON commands. -
sobolanux - 14.04.2011
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?
Re: Problem with RCON commands. -
SchurmanCQC - 14.04.2011
nvm..
Re: Problem with RCON commands. -
Vince - 14.04.2011
You don't need the
/rcon prefix when using SendRconCommand. Just use it like if you were typing directly into the console.
Re: Problem with RCON commands. -
sobolanux - 15.04.2011
Okay, worked, thanks. Maybe it was too late and I was too tired to see that