#Rankup GUI Deluxe Menus

1 messages · Page 1 of 1 (latest)

mighty flame
#

Doing a rankup gui and having trouble with the viewing requirements for it. Like I understand why it's doing that but I'm trying to figure out how to fix it and make it work right. Or a simpler way to do it.

https://pastebin.com/hJXEEQXA

The first picture is default rank which looks how it should.
The second is the next rank where all of them look like that.

#

The second one is right with how the next rank shows but other than that is wrong

#

its the fact that not being default rank satisifes it, i just dont know the way around it

#

Grey is too high of rank to purchase yet, green is able to purchase, red is unable to purchase, and yellow is has purchased

#

should i use type has permission?

sleek hamlet
#

Hello @mighty flame.

First thing I'd suggest you do is use LP's inheritance system. So Slave inherits Default, Escapee inherits Slave, etc.

In LP, each rank is also a permission. group.<rank-name>. This means that instead of having 10 checks, you have 1. For example, to check if a user is Escapee or higher you just check for permission group.escapee. you don't check if the user is in group escapee or in group homeless or in group civillian, etc.

I also see that your view requirements are wrong for DefaultToSlave and probably other items. Instead of checking if the user is in group default and not any other group, you check if the user is in group escapee, group homeless and the rest of the higher ranks.

mighty flame
#

Well, that makes a lot more sense. Thanks a lot!

sleek hamlet
#

I've just made an example that I'm also going to post on the wiki. If you want to take a look, here it is.

#

I must say I haven't fully tested it

mighty flame
#

It is working beautifully now

sleek hamlet
# mighty flame https://pastebin.com/TSteHbkn

You probably want to remove this part:

            minimum_requirements: 1
            stop_at_success: true

While it won't really affect you at the time as there's only 1 requirement, you might end up with weird behavior if you ever update the requirements and might be a pain to debug why.

mighty flame
#

oh yeah didnt even notice

#

if my view requirements are right do i need click requirements?

#

seems repetitive if they are already viewing whether they are of rank, enough money to purchase, not enough money to purchase, or purchased already

sleek hamlet
#

Techincally you don't need them. I always set them just in case something funky happens with the plugin and the view requirements are skipped. Never had it happen though. Just my anxiety 🤣

mighty flame
#

I'm trusting ur experience of it not having it happen xD

#

actually its honestly just copy paste so ig ill do it for safety