Jump to content

Multiple Commands

Closed 1.0.5

Iron
  • in Shop
Iron

Posted

Is it possible to put multiple commands on the same line?  I am trying to add the user to a VIP group and remove them from a previous group. This requires two separate commands to run when the command is purchased.  Is this possible?

  • Administrator
Death

Posted

@Mevent please respond asap. Thanks!

Mevent

Posted

On 4/22/2021 at 11:36 PM, Iron said:

Is it possible to put multiple commands on the same line? I am trying to add the user to a VIP group and remove them from a previous group. This requires two separate commands to run when the command is purchased. Is this possible?

Yes, but they must be written through |

Grimm530

Posted

This is what mine looks like in order to run multiple commands I believe you would need to do example 2...  You need to open the shop.json file and make the edit in there.  It's located in your oxide config folder.

Example 1

{
      "Enabled": true,
      "Title": "VIP",
      "Permission": "",
      "Items": [
        {
          "Type": "Command",
          "ID": 689,
          "Image": "https://i.imgur.com/LFwxr2n.jpg",
          "Title": "VIP",
          "Command (%steamid%)": "o.usergroup add %steamid% vipd",
          "Plugin": {
            "Hook": "Withdraw",
            "Plugin Name": "ServerRewards",
            "Amount": 0
          },
          "DisplayName (empty - default)": "",
          "ShortName": "",
          "Skin": 0,
          "Amount": 1,
          "Price": 500000.0,
          "Sell Price": 0.0,
          "Discount (%)": {
            "shop.default": 0,
            "shop.vip": 10
          }
        },

Example 2

       {
      "Enabled": true,
      "Title": "VIP",
      "Permission": "",
      "Items": [
        {
          "Type": "Command",
          "ID": 689,
          "Image": "https://i.imgur.com/LFwxr2n.jpg",
          "Title": "VIP",
          "Command (%steamid%)": "o.usergroup add %steamid% vipd",
          "Command (%steamid%)": "o.revoke group %steamid% vips",
          "Command (%steamid%)": "o.revoke group %steamid% vipg",
          "Plugin": {
            "Hook": "Withdraw",
            "Plugin Name": "ServerRewards",
            "Amount": 0
          },
          "DisplayName (empty - default)": "",
          "ShortName": "",
          "Skin": 0,
          "Amount": 1,
          "Price": 500000.0,
          "Sell Price": 0.0,
          "Discount (%)": {
            "shop.default": 0,
            "shop.vip": 10
          }
        },

Iron

Posted (edited)

Error: Duplicate key 'Command (%steamid%)'

 

This is what I get with example 2. when running the config file through the validator.

 

Sorry, I am not a programmer and trying to get answers on this is like pulling teeth. Yesterday I purchased a new plugin, there was an issue.  The Dev pulled me in to Discord, fixed it and I was done in like less than 15mins.  

 

I am not expecting that awesome level of support but with @Mevent, I am wondering if there is a language barrier that I need to break through.

 

His reply "Yes, but they must be written through |".  So, I guess I will have to take a JavaScript tutorial on how to use | in the plugin 😞

 

Regards

 

Iron

 

 

Edited by Iron
Mevent

Posted

8 hours ago, Iron said:

Error: Duplicate key 'Command (%steamid%)'

 

This is what I get with example 2. when running the config file through the validator.

 

Sorry, I am not a programmer and trying to get answers on this is like pulling teeth. Yesterday I purchased a new plugin, there was an issue.  The Dev pulled me in to Discord, fixed it and I was done in like less than 15mins.  

 

I am not expecting that awesome level of support but with @Mevent, I am wondering if there is a language barrier that I need to break through.

 

His reply "Yes, but they must be written through |".  So, I guess I will have to take a JavaScript tutorial on how to use | in the plugin 😞

 

Regards

 

Iron

 

 

 

Example:

        {
          "Type": "Command",
          "ID": 250,
          "Image": "",
          "Title": "",
          "Command (%steamid%)": "o.revoke group %steamid% premium|o.revoke group %steamid% vip|o.revoke group %steamid% donate",
          "Plugin": {
            "Hook": null,
            "Plugin Name": null,
            "Amount": 0
          },
          "DisplayName (empty - default)": "",
          "ShortName": "",
          "Skin": 0,
          "Amount": 1,
          "Price": 100.0,
          "Sell Price": 100.0,
          "Discount (%)": {
            "shop.default": 0,
            "shop.vip": 10
          }
        }

 

Iron

Posted

That works perfect.  Sorry to be a pain on this but my frustration levels were maxed. 

The plugin is actually very good and I will be using it to replace the free version as this one looks better and performs exceptionally well.

Configuration was easy, other than the commands. But now that's taken care of I am very happy with the purchase.

Thank you.

  • Like 1
Grimm530

Posted

I'm not a coder either I just keep screwing around with them till it works lol that's great that he replied with a version of my reply that worked lol.  Its a great plugin!  I figured I'd at least get you on the correct path.

  • Like 1
Guest

Posted

Changed Status from Pending to Closed

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.3k

Files Sold

Total number of files sold.

2m

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.