OnRconCommand FR

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search

Revision as of 21:37, 31 January 2014



Description:

This callback is called when a command is sent through the server console, remote RCON, or via the in-game /rcon command.


Paramètres:
(cmd[])
cmd[]A string containing the command that was typed, as well as any passed parameters.


Retourne:

0 if the command was not processed, it will be passed to another script or 1 if the command was processed, will not be passed to other scripts.


Image:32px-Circle-style-warning.png

Note
Importante

You will need to include this callback in a loaded filterscript for it to work in the gamemode!


Image:32px-Ambox_warning_orange.png

Notes

  • "/rcon " is not included in "cmd" when a player types a command.
  • If you use the "print" function here, it will send a message to the player who typed the command in-game as well as the log.


public OnRconCommand(cmd[])
{
    printf("[RCON]: Vous avez écrit '/rcon %s'!", cmd);
    return 0;
}
public OnRconCommand(cmd[])
{
    if(!strcmp(cmd, "bonjour", true))
    {
        SendClientMessageToAll(0xFFFFFFAA, "Bonjour tous le monde!!");
        return 1;
    }
    return 0;
}

Fonctions Relatives

Les fonctions suivantes peuvent être utiles car elles sont indirectement ou directement liées a cette fonction.


Callbacks Relatives

Les Callbacks suivantes peuvent être utiles car elles sont indirectement ou directement liées a cette fonction.

In other languages