Jump to content

Problem console command

Pending 1.2.1

massa2a
massa2a

Posted (edited)

Hi ! first at all i would like to thanks you for tyhis amazing plugin !!!

Very powerfull and so usefull !!!

Everything is running smoothly and very well until i face a problem.

Inded, i've set an economic system trough an online shop to get some monuments and when the website i running the command "givemonument PresetName userID" nothing happened. I've seen that on the website (tip4serv) the userID is different than in game.

I've tried to run this command too "givemonument PresetName steamID", it's 100% working when i do it on my console but not working through the website, do you have a solution please ?

I've tried also "SteamID" - "steam64ID" - "{steam_id}" none of them are working.

 

Or maybe i can change something in the plugin file ??

"

 [ConsoleCommand("givemonument")]

        private void GiveMonumentConsoleCommand(ConsoleSystem.Arg arg)

        {

            if (arg.Player() != null || arg.Args.Length < 2)

                return;

 

            string presetName = arg.Args[0];

            SiteConfig siteConfig = SiteSpawnInfo.GetSiteConfig(presetName, out LocationType _);

            if (siteConfig == null)

            {

                NotifyManagerLite.PrintError(null, "ConfigNotFound_Exeption", presetName);

                return;

            }

 

            ulong targetUserId = Convert.ToUInt64(arg.Args[1]);

            BasePlayer targetPlayer = BasePlayer.FindByID(targetUserId);

            if (targetPlayer == null)

            {

                NotifyManagerLite.PrintError(null, "PlayerNotFound_Exeption", arg.Args[1]);

                return;

            }

 

            ItemController.GiveItemToPLayer(targetPlayer, siteConfig.SummonConfig, 1);

            NotifyManagerLite.SendMessageToPlayer(targetPlayer, "GotMonument");"

 

 

I'm lost at the moment ^^'

Is there is any other solution to make sure when a player pay to get the flare/monument he receives it in his inventory please ?

Thank you !

Edited by massa2a
Adem

Posted

Hi. Each monument has a skin ID in its config. You can simply give the player a flare with that skin ID, and it will work.

Adem

Posted

You can give the item to the player using any other plugin

2.1m

Downloads

Total number of downloads.

9.8k

Customers

Total customers served.

142.5k

Files Sold

Total number of files sold.

3m

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.