Ulysses
Ulysses Stuff => General Chat & Help and Support => Topic started 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.
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.
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
-
Lua is capital-sensitive (I think that's the term), you will get Lua errors if you capitalize something wrong.
This:
elseif ply:isUserGroup("owner") then
return "Owner"
Needs to become:
elseif ply:IsUserGroup("owner") then
return "Owner"
Notice the capital "I" in "IsUserGroup".
-
Well you can go ahead and call me blind :P
Anyways thank you so much for your help, it is highly appreciated.
Locked.