So I'm trying to make a modification on the who command, but the problem is that I don't know how to make it so it only prints staff ex. "1 Sloth owner"
Here is the code:
function ulx.staff( calling_ply )
local players = player.GetAll()
for _, player in ipairs( players ) do
local id = tostring( player:UserID() )
local nick = player:Nick()
local text = string.format( "%i%s %s%s ", id, string.rep( " ", 2 - id:len() ), nick, string.rep( " ", 31 - nick:len() ) )
text = text .. player:GetUserGroup()
ULib.tsayError( calling_ply, text )
end
end
local staff = ulx.command( CATEGORY_NAME, "ulx staff", ulx.staff, "!staff" )
staff:defaultAccess( ULib.ACCESS_ALL )
staff:help( "See information about currently online staff members." )