Executing an in game command from a plugin in c#

Hello, I am working on a little basic c# plugin for my 5M server to integrate and shared economy with other game servers on my network. I’ve gotten everything to work except for actually setting the balance of a user after preforming the needed actions on my database.

Please help, I’ve included my code below(all I need to know if how to issue a console command, directly, or via rcon)

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using CitizenFX.Core;
using CitizenFX.Core.Native;
using MySql.Data.MySqlClient;

namespace PDBANK5M
{
    public class PDBANK5M : BaseScript
    {

        public PDBANK5M()
        {

            API.RegisterCommand("bankd", new Action<int, List<object>, String>((src, args, raw) =>
            {
                String pname = "";
                PlayerList pl = new PlayerList();
                for (int i = 0; i < pl.Count() - 1; i++)
                {
                    if (pl[i] != null && i == src) { pname = pl[i].Name; }
                }

               

                string connectString = "Server=pddb.local.intranet;Database=prodynamics;Uid=root;Pwd=*******************;sslmode=none;";
                string sql = "SELECT `money` FROM `account` WHERE `username` = '" + args[0] + "';";
                var connect = new MySqlConnection(connectString);
                var sqlcommand = new MySqlCommand(sql, connect);
                connect.Open();
                sqlcommand.ExecuteScalar();
                

                sql = "SELECT* FROM `fivem`.`users` WHERE `name` = '"+pname+"';";
                sqlcommand.CommandText = sql;
                double currentBalance = Convert.ToDouble(sqlcommand.ExecuteScalar());

                sql = "UPDATE `account` SET  `money` = money + " + args[1] + " WHERE `username` = '" + args[0] + "';";
                sqlcommand.CommandText = sql;
                sqlcommand.ExecuteScalar();
                sql = "SELECT `money` FROM `account` WHERE `username` = '" + args[0] + "';";
                sqlcommand.CommandText = sql;
                sqlcommand.ExecuteScalar();
                
                //rcon("setmoney "+pname+" "+currentBalance - args[1]); [THIS IS WHAT I NEED HELP WITH]
            }), false);


            API.RegisterCommand("bankw", new Action<int, List<object>, String>((src, args, raw) =>
            {



            }), false);

        }
    }
}

You can use ExecuteCommand if you wish to execute another command.

https://runtime.fivem.net/doc/natives/?_0x561C060B