Does RCON commands allow formatting?
#3

As far as I see, you are using SendRconCommand just like printf. Well, that's not the way it's meant to be used.
I'd suggest to format a string, then pass it as the argument of SendRconCommand:
pawn Код:
new rconcmd[32]; // You can change the size relying to the size of your defines.
// I recommend keeping it 32, unless you change the defines.
format(rconcmd, sizeof(rconcmd), "hostname %s", SERVER_NAME);
SendRconCommand(rconcmd);
format(rconcmd, sizeof(rconcmd), "gamemodetext %s", SERVER_MODE);
SendRconCommand(rconcmd);
format(rconcmd, sizeof(rconcmd), "mapname %s", SERVER_MAP);
SendRconCommand(rconcmd);
Reply


Messages In This Thread
Does RCON commands allow formatting? - by Twizted - 15.07.2014, 13:08
Re: Does RCON commands allow formatting? - by amirab - 15.07.2014, 13:33
Re: Does RCON commands allow formatting? - by Dragonsaurus - 15.07.2014, 13:36
Re: Does RCON commands allow formatting? - by Twizted - 15.07.2014, 14:46

Forum Jump:


Users browsing this thread: 1 Guest(s)