Help

Status
This thread has been locked.

Zaicy

Feedback score
0
Posts
2
Reactions
1
Resources
0
Tebex rank help
renderTimingPixel.png

Hey, unfortunately i'm a little stuck trying to figure out how to implement a rank system based on money spent on the server store.

For example, Chicken rank requires you to spend between $1 and $10, meaning that purchasing something for $3 will put you in the Chicken rank. Spending another $20 would then upgrade you to Rabbit rank.

I would appreciate if someone could point me in the right direction.
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

Matty

Supreme
Feedback score
25
Posts
1,056
Reactions
434
Resources
0
Tebex rank help
renderTimingPixel.png

Hey, unfortunately i'm a little stuck trying to figure out how to implement a rank system based on money spent on the server store.

For example, Chicken rank requires you to spend between $1 and $10, meaning that purchasing something for $3 will put you in the Chicken rank. Spending another $20 would then upgrade you to Rabbit rank.

I would appreciate if someone could point me in the right direction.

Could make a system that tracks every order done. Then simply implement a script that gives the player the purchased package and tracks down the amount paid.

EXAMPLE
Package 1: 5$ (Stone Sword)
Package 2: 5$ (Iron Sword)
Package 3: 15$ (Diamond Sword)

CLIENT SIDE: Customer buys package 1 and receives a stone sword.
SERVER SIDE: Gives client diamond sword, notes down 5$ and tracks whether it has reached a specified sum (eg. 20$).

CLIENT SIDE: Customer buys packages 2 & 3 and receives the iron & diamond sword.
SERVER SIDE: Gives client iron & diamonds sword, notes down an extra 20$ has been spent. Checks whether the sum has reached 20$ and if it's true it gives a rank.

CODE
(only applicable in theory since I'm not a dev)
Code:
every 5 minutes:
    update %store%

if %sum% is =<10:
    set {%rank::%player's uuid%} to "Chicken"

if %sum% is =<20:
    set {%rank::%player's uuid%} to "NEXTRANK"

Hope this makes sense, may have explained myself wrong.
 
Last edited:
Status
This thread has been locked.
Top