OnRconCommand FR
From SA-MP Wiki
(Difference between revisions)
Revision as of 21:37, 31 January 2014
Page d'Accueil | Les Fonctions | Les Callbacks | Les bases du Scripting | Plugins de Serveur | Tutoriaux
Ne prenez pas en compte les FR dans les noms
Description:
This callback is called when a command is sent through the server console, remote RCON, or via the in-game /rcon command.
(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.
Note | You will need to include this callback in a loaded filterscript for it to work in the gamemode! |
Notes |
|
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; }
[edit]
Fonctions Relatives
Les fonctions suivantes peuvent être utiles car elles sont indirectement ou directement liées a cette fonction.
- IsPlayerAdmin: Vérifie si un joueur est connecté en RCON.
[edit]
Callbacks Relatives
Les Callbacks suivantes peuvent être utiles car elles sont indirectement ou directement liées a cette fonction.
- OnRconLoginAttempt: Appelée lorsqu'un joueur essaie de se connecter en RCON.