Tebex Wrapper
In-game store where players can purchase products with coins
Installation
This assumes you already have a tebex store online, if not you can create one and if you need help make sure to ask us! Tutorial to setup your tebex store: https://www.youtube.com/watch?v=it-eiJDwV5E
- Download the latest release of vx_lib here and add it to your server.
- Download the latest version of our tebex wrapper from keymaster and add it to your server.
- Setup the config, the only things that is required is:
Config.tebexSecret
andConfig.packages
. - Create a package, scroll all the way down and click on "Game Server Commands" and add
vx_tebexwrapper:processPayment {transaction}
. - Start vx_lib and vx_tebexwrapper in your server.cfg and you're good to go!
Adding new categories
All the products are organized in categories in the data folder. You need to create a new file for each category, for example data/items.lua
and add the following:
Then you need to register this category in data/categories.lua
and add the following:
Adding product handlers
We have already implemented some basic products such as: money
, item
, vehicle
, weapon
and more, but you can also create your own!
We created a handler system, so for each product type you can create a handler which will handle the purchase of the product.
To create a handler you need to go to customize/handlers.lua
, and add a new handler. For example: