Jump to content

Semi broken

Closed 1.1.5

Terskipia
Terskipia

Posted

So the plugin works but when someone buys vip from the shop it says they have got vip for 0 days then after like 30 minutes it gets rid of it even though in the config file it I have it set to 30 days

{
  "Maximum VIP days that a player can accumulate per tier": 90,
  "Sound effect when purchasing or consuming a token": "assets/prefabs/deployable/vendingmachine/effects/vending-machine-purchase-human.prefab",
  "Sound effect when consuming a token. Set it to nothing if you do not want an effect": "assets/prefabs/misc/easter/painted eggs/effects/gold_open.prefab",
  "Password for command verification (make one up)": "weshownosoulmercy666",
  "Chat commands for opening the menu.": [
    "tokenmenu",
    "tokenbalance",
    "storetoken",
    "redeemtoken"
  ],
  "Date time format (case sensitive): dd == day. MM == month. yyyy == year": "dd-MM-yyyy",
  "Prevent players from consuming a token if they are already in the group?": true,
  "How often should the plugin check to see if a player has run out of VIP [seconds]?": 3600.0,
  "Add your vip tiers and commands here. Use {id} in place of a players userid and {name} in place of their name.": {
    "vip": {
      "name": "vip tier 1",
      "days_to_add": 30,
      "vip_group": "vip",
      "vip_description": "This token will grant you acces to vip for 30days!",
      "token_item": {
        "name": "VIP Token - 30 days",
        "skin": 2529344523,
        "item_shortname": "radiationresisttea.pure"
      }
    },
    "vip+": {
      "name": "vip tier 2",
      "days_to_add": 30,
      "vip_group": "vip+",
      "vip_description": "This token will grant you acces to vip for 30days!",
      "token_item": {
        "name": "VIP Token - 30 days",
        "skin": 2529343385,
        "item_shortname": "radiationresisttea.pure"
      }
    },
    "vip++": {
      "name": "vip tier 3",
      "days_to_add": 30,
      "vip_group": "vip++",
      "vip_description": "This token will grant you acces to vip for 30days!",
      "token_item": {
        "name": "VIP Token - 30 days",
        "skin": 2529344741,
        "item_shortname": "radiationresisttea.pure"
      },
      "_command": {
        "command": "",
        "message": "",
        "public_message": "",
        "hook": true
      }
    }
  }
}

imthenewguy

Posted

12 hours ago, Terskipia said:

So the plugin works but when someone buys vip from the shop it says they have got vip for 0 days then after like 30 minutes it gets rid of it even though in the config file it I have it set to 30 days

{
  "Maximum VIP days that a player can accumulate per tier": 90,
  "Sound effect when purchasing or consuming a token": "assets/prefabs/deployable/vendingmachine/effects/vending-machine-purchase-human.prefab",
  "Sound effect when consuming a token. Set it to nothing if you do not want an effect": "assets/prefabs/misc/easter/painted eggs/effects/gold_open.prefab",
  "Password for command verification (make one up)": "weshownosoulmercy666",
  "Chat commands for opening the menu.": [
    "tokenmenu",
    "tokenbalance",
    "storetoken",
    "redeemtoken"
  ],
  "Date time format (case sensitive): dd == day. MM == month. yyyy == year": "dd-MM-yyyy",
  "Prevent players from consuming a token if they are already in the group?": true,
  "How often should the plugin check to see if a player has run out of VIP [seconds]?": 3600.0,
  "Add your vip tiers and commands here. Use {id} in place of a players userid and {name} in place of their name.": {
    "vip": {
      "name": "vip tier 1",
      "days_to_add": 30,
      "vip_group": "vip",
      "vip_description": "This token will grant you acces to vip for 30days!",
      "token_item": {
        "name": "VIP Token - 30 days",
        "skin": 2529344523,
        "item_shortname": "radiationresisttea.pure"
      }
    },
    "vip+": {
      "name": "vip tier 2",
      "days_to_add": 30,
      "vip_group": "vip+",
      "vip_description": "This token will grant you acces to vip for 30days!",
      "token_item": {
        "name": "VIP Token - 30 days",
        "skin": 2529343385,
        "item_shortname": "radiationresisttea.pure"
      }
    },
    "vip++": {
      "name": "vip tier 3",
      "days_to_add": 30,
      "vip_group": "vip++",
      "vip_description": "This token will grant you acces to vip for 30days!",
      "token_item": {
        "name": "VIP Token - 30 days",
        "skin": 2529344741,
        "item_shortname": "radiationresisttea.pure"
      },
      "_command": {
        "command": "",
        "message": "",
        "public_message": "",
        "hook": true
      }
    }
  }
}

What version are you running?

There is a structure change in the of the later version to accommodate different types of time types.

    "vip": {
      "name": "vip tier 1",
      "time_type": "day",
      "time_to_add": 30,
      "vip_group": "vip",
      "vip_description": "This is an example of a group only VIP token",
      "remove_tokens_on_wipe": false,
      "token_item": {
        "name": "VIP Token - 30 days",
        "skin": 2529344523,
        "item_shortname": "radiationresisttea.pure"
      },
      "_command": null
    },

As you can see, you require the field "time_type" which can be "second", "minute", "hour" or "day".

The "days_to_add" variable has also changed to "time_to_add". This is where you set the quantity of seconds/minutes/hours/days to add, based on the "time_type" field.

 

This will work

{
  "Maximum VIP days that a player can accumulate per tier": 90,
  "Sound effect when purchasing or consuming a token": "assets/prefabs/deployable/vendingmachine/effects/vending-machine-purchase-human.prefab",
  "Sound effect when consuming a token. Set it to nothing if you do not want an effect": "assets/prefabs/misc/easter/painted eggs/effects/gold_open.prefab",
  "Password for command verification (make one up)": "weshownosoulmercy666",
  "Chat commands for opening the menu.": [
    "tokenmenu",
    "tokenbalance",
    "storetoken",
    "redeemtoken"
  ],
  "Date time format (case sensitive): dd == day. MM == month. yyyy == year": "dd-MM-yyyy",
  "Prevent players from consuming a token if they are already in the group?": true,
  "How often should the plugin check to see if a player has run out of VIP [seconds]?": 3600.0,
  "Add your vip tiers and commands here. Use {id} in place of a players userid and {name} in place of their name.": {
    "vip": {
      "name": "vip tier 1",
	  "time_type": "day",
      "time_to_add": 30,
      "vip_group": "vip",
      "vip_description": "This token will grant you acces to vip for 30days!",
      "token_item": {
        "name": "VIP Token - 30 days",
        "skin": 2529344523,
        "item_shortname": "radiationresisttea.pure"
      }
    },
    "vip+": {
      "name": "vip tier 2",
      "time_type": "day",
      "time_to_add": 30,
      "vip_group": "vip+",
      "vip_description": "This token will grant you acces to vip for 30days!",
      "token_item": {
        "name": "VIP Token - 30 days",
        "skin": 2529343385,
        "item_shortname": "radiationresisttea.pure"
      }
    },
    "vip++": {
      "name": "vip tier 3",
      "time_type": "day",
      "time_to_add": 30,
      "vip_group": "vip++",
      "vip_description": "This token will grant you acces to vip for 30days!",
      "token_item": {
        "name": "VIP Token - 30 days",
        "skin": 2529344741,
        "item_shortname": "radiationresisttea.pure"
      },
      "_command": {
        "command": "",
        "message": "",
        "public_message": "",
        "hook": true
      }
    }
  }
} 

 

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.