ULX

Author Topic: Stumped... ULX groups  (Read 1647 times)

0 Members and 1 Guest are viewing this topic.

Offline xXPANAGE28

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Stumped... ULX groups
« on: January 11, 2014, 10:58:11 AM »
So I am running a TTT sever, and I wanted a chain of command: owner>headadmin>superadmin>admin>mod>user (not including operator). So they can all have there own commands without anything being over written when i change a different groups permission, I made all the groups (except user, and operator) to inherit from the user. Now I also have a custom voice bar so when you talk it displays the group under your name.



Now the code for this is kinda tricky now. I model the code off this.
Code: [Select]
elseif ply:IsSuperAdmin() then -- Superadmins get Superadmin tag.
return "Superadmin"

So now since I'm trying to make an owner group headmin etc, when i did this, it gave me lua errors.
Code: [Select]
elseif ply:isUserGroup("owner") then
return "Owner"

I don't know what I'm doing wrong. I'm not so good at lua and I've been looking on the internet for an answer but I got none.
If anyone can help me, that would be very helpful! If the answer is obvious do not hesitate to call me blind :P

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: Stumped... ULX groups
« Reply #1 on: January 11, 2014, 12:01:04 PM »
Lua is capital-sensitive (I think that's the term), you will get Lua errors if you capitalize something wrong.
This:
Code: [Select]
elseif ply:isUserGroup("owner") then
return "Owner"
Needs to become:
Code: [Select]
elseif ply:IsUserGroup("owner") then
return "Owner"
Notice the capital "I" in "IsUserGroup".
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline xXPANAGE28

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: Stumped... ULX groups
« Reply #2 on: January 11, 2014, 12:23:52 PM »
Well you can go ahead and call me blind :P

Anyways thank you so much for your help, it is highly appreciated.

Locked.