Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SuperAdmins = { "STEAM_0:1:10000" }
- Admins = { "STEAM_0:1:11000" }
- Gold = { "STEAM_0:1:11100" }
- VIPs = { "STEAM_0:1:11110" }
- function _R.Player:IsAdmin() then
- return table.HasValue(Admins, self:SteamID())
- end
- function _R.Player:IsSuperAdmin() then
- return table.HasValue(SuperAdmins, self:SteamID())
- end
- function _R.Player:IsGoldMember() then
- return table.HasValue(Gold, self:SteamID())
- end
- function _R.Player:IsVIP() then
- return table.HasValue(VIPs, self:SteamID())
- end
- concommand.Add("perp_adduser", function( p, c, a)
- local rank = string.lower(a[1])
- if rank == "superadmin" then
- table.insert(SuperAdmins, a[2[)
- elseif rank == "admin" then
- table.insert(Admins, a[2[)
- elseif rank == "gold" then
- table.insert(Gold, a[2[)
- elseif rank == "vip" then
- table.insert(VIPs, a[2[)
- end
- end)
- concommand.Add("perp_removeuser", function( p, c, a)
- local rank = string.lower(a[1])
- if rank == "superadmin" then
- local key = table.KeyFromValue(SuperAdmins, a[2])
- table.remove(SuperAdmins, key)
- elseif rank == "admin" then
- local key = table.KeyFromValue(Admins, key)
- table.remove(Admins, a[2[)
- elseif rank == "gold" then
- local key = table.KeyFromValue(Gold, key)
- table.remove(Gold, a[2[)
- elseif rank == "vip" then
- local key = table.KeyFromValue(VIPs, key)
- table.remove(VIPs, a[2[)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement