Ulysses

Ulysses Stuff => General Chat & Help and Support => Topic started by: xXPANAGE28 on January 11, 2014, 10:58:11 AM

Title: Stumped... ULX groups
Post by: xXPANAGE28 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.

(http://i.imgur.com/r0k2jgb.png)

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
Title: Re: Stumped... ULX groups
Post by: Decicus 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".
Title: Re: Stumped... ULX groups
Post by: xXPANAGE28 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.