ULX

Author Topic: Custom ULX group for certain skins?  (Read 2707 times)

0 Members and 1 Guest are viewing this topic.

Offline Code:KRAMdorum

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Custom ULX group for certain skins?
« on: January 15, 2015, 03:02:55 PM »
Hi, first time post here.

I was wondering if there is a possible way to make a custom group for Pointshop through ULX, this group would allow people to buy certain skins from the shop that no other person can. Sort of like a VIP group, where only these VIPs can buy certain skins which are not avaliable to others.

So far I've tried adding a custom group to ULX through the groups.txt file, and also added the following line of code to it:
}
"VIP"   
{
   "allow"   
   {
   }
   "inherit_from"   "guest"

This was used to create the custom group.

I have also added this line of code to the lua. file for the player model:
ITEM.AllowedUserGroups = { "VIP" }

In theory this should work right, I should be able to add someone to the VIP group and they should be able to buy the skin from the shop? Well I've tried this already, and when added I still get a message blocking me from buying the skin, telling me that "I am in the wrong group".

One final thing I've encountered is that as soon as a VIP leaves the server, when they next join they will be reset back to the guest/user default group.

Any help here?
Thanks in adv.

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Custom ULX group for certain skins?
« Reply #1 on: January 15, 2015, 03:50:15 PM »
  • "guest" is not a rank. The default rank is "user".
  • You can manage ranks much better through XGUI than you can by modifying data files. In theory you should never have to touch the data files.
  • Have you checked your inheritance tree?
bw81@ulysses-forums ~ % whoami
Homepage

Offline Code:KRAMdorum

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Custom ULX group for certain skins?
« Reply #2 on: January 16, 2015, 03:59:09 AM »
- Changed inheritance from guest to user
}
"VIP"   
{
   "allow"   
   {
   }
   "inherit_from"   "user"

And the inheritance tree seems fine as far as I can tell.

I basically did the same to only allow admins certain skins, and it seemed to work fine. I'm totally stumped as to what the problem could be here..

Offline Bytewave

  • Respected Community Member
  • Hero Member
  • *****
  • Posts: 718
  • Karma: 116
  • :)
    • My Homepage
Re: Custom ULX group for certain skins?
« Reply #3 on: January 16, 2015, 05:36:58 AM »
- Changed inheritance from guest to user
}
"VIP"   
{
   "allow"   
   {
   }
   "inherit_from"   "user"

And the inheritance tree seems fine as far as I can tell.

I basically did the same to only allow admins certain skins, and it seemed to work fine. I'm totally stumped as to what the problem could be here..
Any reason you're explicitly editing the ULib groups.txt rather than using XGUI to set up the group?
bw81@ulysses-forums ~ % whoami
Homepage

Offline Code:KRAMdorum

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Custom ULX group for certain skins?
« Reply #4 on: January 16, 2015, 06:01:21 AM »
I've tried both, they didn't work.

Also, I edited the .txt file to allow some skins for admin only, like I did before (ITEM.AllowedUserGroups = { "admin", "slave", "superadmin", "owner" }) and it seemed to work, so I thought I would try it again. Also I did not have access to the groups on XGUI.

My reasoning behind it was if I create a group in the same .txt document as the ones posted above, then I should just be able to add the name of the new group to the coding above right?
« Last Edit: January 16, 2015, 06:03:16 AM by Code:KRAMdorum »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Custom ULX group for certain skins?
« Reply #5 on: January 16, 2015, 01:25:44 PM »
Not in ULib, no. Wrong conclusion
We explicitly state in readme's and I think even the data document not to edit them.
Editing the gamemode file might be recommended somewhere, but, we never recommend editing ULib groups.txt manually

If you're not seeing the groups in ULX's XGUI, even before having broken your data files by manually editing them, then something is broken.
You either didn't follow directions (in our forum FAQs or our ulx_readme.txt) for making yourself superadmin on the server, or somethng is causing conflict and preventing superadmin.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Code:KRAMdorum

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Custom ULX group for certain skins?
« Reply #6 on: January 26, 2015, 07:19:03 AM »
Decided to reinstall the server from the beginning, and have installed Pointshop 2, which allows people to buy skins with "Donator Points". We have now ditched the VIP group idea.

Thanks for all your help and replies. (: