Author Topic: DarkRP Staff VIP  (Read 75 times)

0 Members and 1 Guest are viewing this topic.

Offline DexterHighLife

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
DarkRP Staff VIP
« on: March 08, 2018, 07:46:08 AM »
My ULib/ULX versions (run "ulx version" in console):
ULib v2.63w
ULX v3.73w

Game mode(s) I am having this problem on: DarkRP

So, I need help with setting up targeting and inherits from on staff VIP ranks. I have 4 staff ranks on my server (trialmod, moderator, jradmin and admin) and i have two vip ranks (vip and vip+).
One of the guys who have bought VIP+ is allso a staff member, so i need help setting up the ranks.
I tried searching the forums but it is seriously complicated or i am just stupid. I can pay a small fee on paypal if the work gets complete the way i want it to.

Offline DexterHighLife

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: DarkRP Staff VIP
« Reply #1 on: March 08, 2018, 10:17:50 AM »
I could really need some help here! I know what i need to do but i do not know how. I basicly need to add branches to the ulx groups.

Offline BlueNova

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 9
  • The most powerful force in the universe.
    • My Site
Re: DarkRP Staff VIP
« Reply #2 on: March 09, 2018, 10:45:22 AM »
Way I would do it that's simple could be something like this.

Code: Lua
  1. local meta = FindMetaTable("Player")
  3. local vip = {
  4. "steamid here"
  5. }
  7. function meta:IsVIP()
  8.         return table.HasValue(vip, self:SteamID())
  9. end

Basically just set a function that checks not really for a group but that they exist in some table or something maybe a database idk. Not too familiar with databases but they would be really good in something like this.
« Last Edit: March 11, 2018, 11:39:01 AM by BlueNova »
Penguin Servers Super Administrator
ByB Super Administrator / ByB Contributor

If you need any help then feel free to PM me or add me on Steam or join my discord. Links available below:


Offline iViscosity

  • Hero Member
  • *****
  • Posts: 743
  • Karma: 46
Re: DarkRP Staff VIP
« Reply #3 on: March 11, 2018, 10:56:36 AM »
I basicly need to add branches to the ulx groups.

This is tough. ULX does not (seamlessly) support branching, so if you wanted to something like this it would require a bit more work. I've been thinking of writing a module for ULX to help more easily support branching, but not sure when I'll do that.

To help answer your question, though, ULX supports different forms of targeting. In a linear tree, like ULX supports easily, you can easily put your inheritance to "!%(group_above_this)" which basically means "not the group above this and everything that inherits from it". With branching, this can get complicated. In other words, you'll have to set up the can_target for each individual group. This can be done using the "#" tag. Since I haven't ever done this myself, I think you can just do #(group1),#(group2) (without the parentheses, of course) and so on until you have all the groups that they can target. If you want to setup permissions for the groups they CAN'T target, use !#(group1),!#(group2)... (again, without parentheses).
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam Group (feel free to join!)

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.