Hello developers! I am trying to edit basic admin essentials to add custom rank and additional ranks for my cafe game. As of current I have added the additional ranks but it appears that the permissions are not correctly working.
I am trying to make it to where certain commands are locked for certain admin ranks and above, I tried editing the permissions table, but it then shutdown the entire code.
The issue is that whenever I attempt to lock commands, or make the admins appear while using the “ingameadmins” command there is no ranklock, or response from the commands.
Some example are:
My Senior Administrator level is 4, they receive access to btools, while I have specified it to be locked to Development Team which is level 6.
I have followed several other Devforum posts, and I have edited the code but again it stops the admin from working in game.
What is the best way to fix this, or what should I do to fix this issue?
I have attached a model for your convenience. This contains all my code.
Any additional help would be greatly appreciated.
Edit: Posting this on mobile so sorry if it comes across unclear.
Alright, I think I see the problem here. After looking through the main module code, the module has the max permission set to 4, meaning that anything above 4 would be set to 4. I’m assuming all I would need to do here is change that number to a 7 to fix the problem, but I will come back after trying and tell you the results.
Alright, it seems this was the problem. I went onto a local test server with Player1’s permission set to a Senior Admin (it auto-sets the owner’s permission to a 7 might just be me idk) and it could no longer access the btools command. The problem was on line 3192.
I believe that fixes issue 1. I do need to figure out when you run “ingameadmins” no users show up. Is this something on my end or are you experiencing this as well?
Well, it’s not a permission problem here; looking at the function, it seems to be another problem with the permission amount. (zoomed in so you could see)
I’ve attempted to change that. There are 2 or 3 of those tables I believe and when I do there is no response from the admin panel on game test. It may be the fact that I didn’t set the max permission level before but I am unsure.
for a,b in next,playerService:GetPlayers() do
local Perm = returnPermission(b)
if Perm > 0 then
if Perm == 1 then
table.insert(Table,'[Mod]: '..b.Name)
elseif Perm == 2 then
table.insert(Table,'[Senior Mod]: '..b.Name)
elseif Perm == 3 then
table.insert(Table,'[Admin]: '..b.Name)
elseif Perm == 4 then
table.insert(Table,'[Senior Admin]: '..b.Name)
elseif Perm == 5 then
table.insert(Table,'[Executive Admin]: '..b.Name)
elseif Perm == 6 then
table.insert(Table,'[Developer]: '..b.Name)
elseif Perm >= 7 then
table.insert(Table,'[Game Owner]: '..b.Name)
end
end
end