--[[
Staff Command - WispySkies
NOTE: Below change the superadmin and admin to the groups you have set to be called, if they aren't correct, nothing will hapen.
]]--
local CATEGORY_NAME = "Yo wassup Dawg"
function ulx.staff( calling_ply, ply ) -- Calling_ply, who said the command, ply, just a temporary argument to be declared below when using ply:IsUserGroup
local ply == ply:GetAll() -- Makes ply EVERYONE
if ply:IsUserGroup( "superadmin" ) then -- If a ply is a superadmin then
ply:GetUserGroup() == group -- Grab their group even if its in the if statement as you need to declare it as "group", used below
calling_ply:ChatPrint( ply, "#A is #s on the server!", group ) -- Tell the calling_ply (who ran the command) that they are a superadmin
end -- Ends the if, self-explanatory
if ply:IsUserGroup( "admin" ) then -- If a ply is a admin then
ply:GetUserGroup() == group -- Grab their group even if its in the if statement as you need to declare it as "group", used below
calling_ply:ChatPrint( ply, "#A is #s on the server!", group ) -- Tell the calling_ply (who ran the command) that they are a superadmin
end -- Ends the if, self-explanatory
end
local staff = ulx.command( CATEGORY_NAME, "ulx staff", ulx.staff, "!staff" ) -- Normal ulx crap below
staff:defaultAccess( ULib.ACCESS_ALL )
staff:help( "Prints the list of staff online and what staff rank they are. !staff" )
-- Staff Command - Include Steam ID
local CATEGORY_NAME = "Yo wassup Dawg"
function ulx.staff( calling_ply, ply )
local ply == ply:GetAll() -- Makes ply EVERYONE
if ply:IsUserGroup( "superadmin" ) then -- If a ply is a superadmin then
ply:SteamID() == id
ply:GetUserGroup() == group -- Grab their group even if its in the if statement as you need to declare it as "group", used below
calling_ply:ChatPrint( ply, "#A is " .. group .. " on the server! Their Steam ID is " .. id ) -- Tell the calling_ply (who ran the command) that they are a superadmin with their ID
end -- Ends the if, self-explanatory
-- Add more groups here, I gave an example above.
end
local staff = ulx.command( CATEGORY_NAME, "ulx staff", ulx.staff, "!staff" )
staff:defaultAccess( ULib.ACCESS_ALL )
staff:help( "Prints the list of staff online and what staff rank they are. !staff" )
-- Admin Staff Command - IP, ID, group
local CATEGORY_NAME = "Yo wassup Dawg"
function ulx.astaff( calling_ply, ply )
local ply == ply:GetAll()
if ply:IsUserGroup( "superadmin" ) then
ply:GetUserGroup() == group
ply:SteamID() == id
ply:IpAddress() == ip
calling_ply:ChatPrint( ply, "#A is " .. group .. " on the server! Their Steam ID is " .. id .. " and their IP is " .. ip)
end
end -- Look above to add more groups.
local astaff = ulx.command( CATEGORY_NAME, "ulx astaff", ulx.astaff, "!astaff" )
astaff:defaultAccess( ULib.ACCESS_SUPERADMIN )
astaff:help( "Prints the list of staff online, what staff rank they are, ID, and IP. !astaff" )