OnRconCommand

From SA-MP Wiki

Jump to: navigation, search

OnRconCommand


This callback is called when a player types things into the RCON console. This only works in filterscripts, however.


Parameters:
(cmd[])
cmd[]The string containing the cmd.
Returns0 - Command not processed, pass to another script
Returns1 - Command processed, does not get passed to other scripts.


In this example, it will display a message when something is typed into the console.
It will produce "You typed [what_you_typed]" in the console.

public OnRconCommand(cmd[])
{
    printf("You typed %s!",cmd);
    return 1;
}

Related Functions

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