示例#1
0
    //Executer une commande
    public static void executeCommand(uint playerId, string[] command)
    {
        Command finalCommand = null;

        for (int i = 0; i < commands.Count; i++)
        {
            if (commands[i].name == command[0])
            {
                finalCommand = commands[i];
            }
        }

        if (finalCommand == null)
        {
            gamemode.SendClientMessage(playerId, errorColor, errorMessage);
        }
        else
        {
            finalCommand.OnCommandExecute(playerId, command);
        }
    }