SA-MP Forums Archive
Rcon GMX on Linux - 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)
+--- Thread: Rcon GMX on Linux (/showthread.php?tid=557209)



Rcon GMX on Linux - Eyce - 13.01.2015

I have a /gmrestart command for admins which obviously restarts the server (sending /rcon gmx). Whenever I try it on my localhost (Windows), it works fine. But on the official server on a Linux CentOS 6.6, it doesn't work anymore. Is there a fix on this? Thank you!


Re: Rcon GMX on Linux - CalvinC - 13.01.2015

Can you still use /rcon gmx on linux?
Or is it both that doesn't work?


Re: Rcon GMX on Linux - Eyce - 13.01.2015

I don't have a console for /rcon gmx to use since it's on a VPS. But yeah, using my command /gmrestart which sends "rcon gmx" doesn't work at all.


Re: Rcon GMX on Linux - CalvinC - 13.01.2015

You can use RCON commands in-game, you do not need a console.
/rcon login [password]
/rcon [command]


Re: Rcon GMX on Linux - Eyce - 13.01.2015

It's the same thing with the command that I've made. So it wouldn't work as well.

pawn Код:
forward RestartServer();
public RestartServer()
{
    SendRconCommand("gmx");
    return 1;
}



Re: Rcon GMX on Linux - CalvinC - 13.01.2015

Try to send a client message to all in the function and tell if it actually sends that message.
pawn Код:
forward RestartServer();
public RestartServer()
{
    SendClientMessageToAll(playerid, -1, "Public works correctly");
    SendRconCommand("gmx");
    return 1;
}
And see if that message gets sent ingame.
If not, then you don't call the public function correctly.