Author Topic: Checking group/ULib ban database without player being present  (Read 1568 times)

0 Members and 1 Guest are viewing this topic.

Offline jakej78b

  • Newbie
  • *
  • Posts: 26
  • Karma: 4
Probably a very stupid question with a very stupid answer but that's how I always feel so here it goes: I found a mod that is pretty much a custom ban message that works fine, and it uses a table named ULib.bans which is not specified anywhere in the ULib documentation, but it works anyways. I was wondering if there was a ULib table to get admins outside of the game without the player. What I'm wanting to do is make a server where only vips can join, where I assign them with ulx adduserid. Here is my start, I hope there is something I can do to finish it.

Code: [Select]
function GAMEMODE:CheckPassword( steamid64, ip, sv_password, cl_password, cl_name )
if( string.len( sv_password ) > 0 and sv_password ~= cl_password )then
return false, "Bad Password"
end

local steamid = util.SteamIDFrom64( steamid64 )
local admins = ULib.admins[ steamid ] -- In search of something that takes steamid and returns rank..?

if table.HasValue( {"vip","admin","superadmin"}, admins) then
return
end
return false, "VIPs Only!"
end
Also how do I make the code in lua format?
« Last Edit: May 16, 2014, 06:04:16 PM by jakej78b »

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given