SendRconCommand

From SA-MP Wiki

Jump to: navigation, search


Description:

Sends an RCON (Remote Console) command.


Parameters:
(command[])
command[]The RCON command to be executed.


Return Values:

This function always returns 1.


Image:32px-Ambox_warning_orange.png

Notes

  • Does not support login, due to the lack of a 'playerid' parameter.
  • 'password 0' will remove the server's password if one is set.
  • This function will result in OnRconCommand being called.


Example Usage:

SendRconCommand("gmx");
// This is a scripted version of typing "/rcon gmx" in-game.
// GMX restarts the game mode.
 
// Example using format()
new szMapName[] = "Los Santos";
new szCmd[64];
format(szCmd, sizeof(szCmd), "mapname %s", szMapName);
SendRconCommand(szCmd);

Related Functions

The following functions may be useful, as they are related to this function in one way or another.


Related Callbacks

The following callbacks might be useful, as they're related to this function in one way or another.

Personal tools