SA-MP Forums Archive
Rcon help. - 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 help. (/showthread.php?tid=332023)



Rcon help. - Nicholas. - 06.04.2012

Hello.

I am having a problem as usually. What I want is when someone uses the rcon command (/rcon login) it would board cast publicly on the server. So I tried coding it like this, but it doesn't work. So I need some assistance please.

pawn Код:
public OnRconCommand(cmd[])
{
    new pname[MAX_PLAYER_NAME], string[256], playerid;
    GetPlayerName(playerid, pname, sizeof(pname));
    format(string, sizeof(string), "ADMIN COMMAND: [%i] %s have just used RCON command.", playerid, pname);
    SendClientMessageToAll(COLOR_RED, string);
    Logs("Logs/Rcon.txt",string);
    return 1;
}
Regards.


Re: Rcon help. - TzAkS. - 06.04.2012

https://sampwiki.blast.hk/wiki/OnRconLoginAttempt

You got all you need there.