Shopping Cart
FiveM script

How to monetize your fivem server – Server Tutorials


Hey!
After the great news coming from our community developers, we are finally able to make a profit out of our hard work (Announcing Tebex Partnership – Server Monetization / Commerce ‘2.0’)

But now you might be wondering how do you start doing that!? It’s pretty simple! follow the steps:

  1. Register an account at tebex.io
  2. After registering your account, you should see this:
    so select “Fivem” and click on “continue” then “CREATE MY WEBSTORE”. After reading all the information and the rules click on “accept & continue”
  3. Pick a name for your store then select a currency (the selected currency will be the currency that your players will pay with)
    then click “continue”.
  4. After following all the steps above you should be seeing this: Select ” GAME SERVER” and click on “continue”
  5. Now click on “COPY COMMAND” to copy your store’s secret code (this code should not be shared with anyone, I am showing it because it is a fake account which will be deleted afterwards) and paste it in your server.cfg then restart your server and make sure that you are running version #2609 or above.

Once you restart your server it should say “Authenticated with tebex … and your store name…” in green in your console. image

When you see this message you will be able to click on “continue setup process” on tebex.io.

  1. Now you should be seeing this:

all what you see is not necessarily needed (logos/designs/etc…) I will go through the important stuff only like setting up a package which will do an action ingame:

in “Create a package” click on complete this item. You should see this:

Now click on “Add new” then “package”, choose “Game Package” and click on CREATE. Now set all the required description like price, name, etc… and click on “create”.

Now you have your package ready! But there is no automated command linked with it, people can buy now but they won’t get anything in return, what should you do then? Simple! click on the 3 dots symbol next to your package then click on “edit”. Now go to the bottom where you see

And click “ADD COMMAND”

Now you can choose between multiple events, for example choose “When a player purchases this package”. Next to this you will see an edit box where you can set a command to be executed when the event happens. In this case, when a player purchases this package. So for example you can set testingCommand {username} {packageName} {price}

(all special tags can be found at https://docs.tebex.io/store/command-management/an-introduction-to-commands)

and create a server side script and put this in:
image

function testing(_, arg)
	local username = arg[1]
	local packageName = arg[2]
	local price = arg[3]
	print(username…" has just purchased “…packageName…” for "…tostring(price))
end
RegisterCommand(“testingCommand”, testing, true)

Now when a player purchases a package it will print their name, the package they bought and its price in your ingame console. Congratulations, your store is up and running! You can take it from that point and continue to make incredible stuff!



Premium ESX Scripts? Click here!

Leave a Reply
FiveM ESX Scripts

The best scripts and maps

Best support

Problems? We are there to help!

Wide range of products

We have a wide range of products

100% Secure Checkout

Stripe