Jump to content

need some help in fixing a plugin from mevent (PAYED)


Recommended Posts

hi all 
im trying to get help all day on this but nobody knows or how to help 
and mevent is not responding 

i cant wait 3 months before he finaly fixes it so  lets try here 

this is about his shop plugin 

inside he has console commands that should works 
but like alot of things in his plugin it does not 
atleast not through console

im showing a small section of code  that i would like to work


        private void CmdConsoleShop(ConsoleSystem.Arg arg)
            var player = arg?.Player();
            if (player == null || !arg.HasArgs()) return;

            switch (arg.Args[0])
                case "closeui":

                case "main_page":
                    int catPage, page;
                    if (!arg.HasArgs(3) || !int.TryParse(arg.Args[1], out catPage) ||
                        !int.TryParse(arg.Args[2], out page)) return;

                    var search = string.Empty;
                    if (arg.HasArgs(4)) search = string.Join(" ", arg.Args.Skip(3));

                    if (string.IsNullOrEmpty(search) && catPage == -1)
                        catPage = 0;

                    MainUi(player, catPage, page, GetShopByPlayer(player), search);

both of these commands not work in normal way 

so with help from other plugin makers we came up with this:

        void OpenShopUI(ConsoleSystem.Arg arg)
            if (!arg.IsRcon) MainUi(arg.Player(), 0, 0, GetShopByPlayer(arg.Player()), string.Empty, true);

this way i can do 
to open the shop

but sadly we cannot make it work for closing the shop

this is where i need your help in 

i need a simple way to close the shop with a player.SendConsoleCommand


Link to comment
Share on other sites

        private List<ulong> _openedUI = new List<ulong>();

        private void OpenShopUI(ConsoleSystem.Arg arg)
            var player = arg?.Player();
            if (player == null) return;

            if (_openedUI.Contains(player.userID))
                CuiHelper.DestroyUi(player, Layer);
                MainUi(player, first: true);


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


Total number of downloads.



Total customers served.


Files Sold

Total number of files sold.


Payments Processed

Total payments processed.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.