• Print

Author Topic: REALLY NEED HELP WITH ULX  (Read 11776 times)

0 Members and 1 Guest are viewing this topic.

Offline jack12321123

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
REALLY NEED HELP WITH ULX
« on: October 29, 2016, 05:43:38 am »
Hello, on my DarkRP server something went terribly wrong.
I must have changed something with the inheritance for usergroups on the ULX menu, which then allowed users to become donator jobs, which they couldnt before.
And now I go to try and change it, as superadmin, and it says: 'You dont have access to this command' Which i could do before all this happened. I've tried changing the groups as owner but still no luck.
Any help would be greatly appreciated.
Thanks
Jack

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: REALLY NEED HELP WITH ULX
« Reply #1 on: October 29, 2016, 05:47:09 am »
Did you check that you do indeed have permissions to do it? I'm not sure what exact permissions you'd need but most likely groupallow and groupdeny. Also what exactly are you trying to change, the inheritances? How are you trying to change them.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline jack12321123

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: REALLY NEED HELP WITH ULX
« Reply #2 on: October 29, 2016, 05:50:52 am »
And when i go to change someone to user, it isn't in the list of groups lol, so i really think i have messed something up. Anyway of resetting it all?

Offline jack12321123

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: REALLY NEED HELP WITH ULX
« Reply #3 on: October 29, 2016, 05:52:21 am »
Update: Ive figured out how to get my SA privledges back by looking on other forums, but where the problem lies is I really dont understand how the inheritance etc. works on ULX, which i believe allowed users to become donator jobs.
Any advice on to what to set each group to inherit from/target? because i believe i have messed it up.
Thanks

I was trying to change them through ulx, and since I don't exactly understand how it all works i buggered something up.

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: REALLY NEED HELP WITH ULX
« Reply #4 on: October 29, 2016, 06:10:48 am »
That is strange. I don't believe you can change user group inheritance, so more than likely it was your jobs that got changed. I'd suggest looking at the problem jobs and check the customCheck.

You should set inheritances to the group you want directly below it ( ie, superadmin inherits from admin by default )
« Last Edit: October 29, 2016, 06:13:20 am by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline jack12321123

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: REALLY NEED HELP WITH ULX
« Reply #5 on: October 29, 2016, 06:29:25 am »
Maybe its a problem with the group "user".
When i go to set someone as user through the web console, it says:
Command "ulx adduser", argument #2: invalid group "user" specified
 And when i go to set someone as user through the ulx menu, the group "user" is the only group NOT on the list.
Any ideas?
Thanks

Offline jack12321123

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: REALLY NEED HELP WITH ULX
« Reply #6 on: October 29, 2016, 06:33:27 am »
That is strange. I don't believe you can change user group inheritance, so more than likely it was your jobs that got changed. I'd suggest looking at the problem jobs and check the customCheck.

You should set inheritances to the group you want directly below it ( ie, superadmin inherits from admin by default )
This is what the customcheck line looks like in the jobs file:
function(ply) return table.HasValue({"donator", "vip", "superadmin"}, ply:GetUserGroup() == "donator") end,

Offline jack12321123

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: REALLY NEED HELP WITH ULX
« Reply #7 on: October 29, 2016, 06:44:39 am »
Yeah Now I realise its a problem with the custom check, Any idea on how a code a custom check For donator jobs, which allows donators and vip's to become donator, And also a separate custom check which allows vip's to become vip jobs.
Thanks
Jack

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: REALLY NEED HELP WITH ULX
« Reply #8 on: October 29, 2016, 07:02:22 am »
I'm not home at the moment, but try
Code: Lua
  1. function( ply )
  2.     if ply:GetUserGroup( "replace with group 1" ) or ply:GetUserGroup( "replace with group 2" ) then
  3.         return true
  4.     else
  5.         return false
  6.     end
  7. end

Replace those with however many groups you want.
« Last Edit: October 29, 2016, 07:04:00 am by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline jack12321123

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: REALLY NEED HELP WITH ULX
« Reply #9 on: October 29, 2016, 07:33:53 am »
Ah alright, and nah it didnt work, is it maybe because thats in a different format to a normal line of code?
Thanks
Jack

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: REALLY NEED HELP WITH ULX
« Reply #10 on: October 29, 2016, 07:48:16 am »
I wrote it wrong, apologies.

Code: Lua
  1. function( ply )
  2.     return ply:IsUserGroup( "replace with group 1" ) or ply:IsUserGroup( "replace with group 2" ) -- etc. etc.
  3. end
  4.  

NOTE: Say you have groups 'donator', 'vip' and 'vip+', with vip+ inheriting from vip and vip inheriting from donator, with donator inheriting from 'user'. If you did
Code: Lua
  1. function( ply )
  2.     return ply:CheckGroup( "donator" )
  3. end
  4.  
If someone was in the group 'donator' OR anything that INHERITS from it (or something that inherits from something that inherits from donator, if that makes sense) would be able to, while anyone else could not. In this case, 'donator', 'vip', and 'vip+' would get it.


Check this if what I'm saying doesn't make sense.
« Last Edit: October 29, 2016, 08:02:16 am by iViscosity »
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline jack12321123

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: REALLY NEED HELP WITH ULX
« Reply #11 on: October 29, 2016, 07:58:29 am »
So are you saying Like Vip+ needs to inherit from vip etc, because Vip, vip+ and donator all inherit from user, is this wrong?

Offline iViscosity

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 803
  • Karma: 58
Re: REALLY NEED HELP WITH ULX
« Reply #12 on: October 29, 2016, 08:00:52 am »
Say you make a custom group called 'donator', and you have it inherit from 'user'. Then you make a group called 'vip' and make it inherit from 'donator'. In the inheritance tree, if you did "CheckGroup( "donator" )", 'donator' and 'vip' would be included. If you did "CheckGroup( "user" )" then 'user', 'donator', and 'vip' would be included, as well as every other group that, at one point, inherits from 'user'.
I'm iViscosity. I like gaming and programming. Need some help? Shoot me PM.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: REALLY NEED HELP WITH ULX
« Reply #13 on: October 29, 2016, 08:03:07 am »
So are you saying Like Vip+ needs to inherit from vip etc, because Vip, vip+ and donator all inherit from user, is this wrong?
Wrong? No. Advanced and likely out of your scope? Yes.

Although it's called an inheritance tree, having branches complicates things. So it's usually recommended that you only have linear inheritance, so your tree should look like this:

lowest ---> low ---> lowish ---> medium ---> highish ---> high ---> highest

(assuming lowest, low, etc are the power your group has, of course.)

This way, inheritance can follow a linear path, so checking for user group highish will match highish, high, and highest, unlike a branching tree which is hard to define.
bw81@ulysses-forums ~ % whoami
Homepage

Offline jack12321123

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
Re: REALLY NEED HELP WITH ULX
« Reply #14 on: October 29, 2016, 08:16:40 am »
Well one thing ive realised is that users/regulars cant become vip jobs but they can become donator jobs. This is only because im trying to allow both donators and vips to have donator jobs, which is making it not work. When i set Donator jobs to be donators only, it worked, so when im trying to use multiple usergroups for donator, thats when it breaks.

  • Print