First of all i need an admin to remove my old post second i dont know where to add the category for the command thats broken in startup local seeachatterAccess = "ulx seeachatter"
if SERVER then ULib.ucl.registerAccess( seeachatterAccess, ULib.ACCESS_OPERATOR, "Ability to see 'ulx achatter'", "Other" ) end -- Give operators access to see achatters echoes by default
function ulx.achatter( calling_ply, message )
local format
local me = "/me "
if message:sub( 1, me:len() ) == me then
format = "(ADMINS) *** #P #s"
message = message:sub( me:len() + 1 )
else
format = " <Achatter> #P #s"
end
local players = player.GetAll()
for i=#players, 1, -1 do
local v = players[ i ]
if not ULib.ucl.query( v, seeachatterAccess ) and v ~= calling_ply then -- Calling player always gets to see the echo
table.remove( players, i )
end
end
ulx.fancyLog( players, format, calling_ply, message )
end
local achatter = ulx.command( CATEGORY_NAME, "ulx achatter", ulx.achatter, "!achatter", true, true )
achatter:addParam{ type=ULib.cmds.StringArg, hint="message", ULib.cmds.takeRestOfLine }
achatter:defaultAccess( ULib.ACCESS_ALL )
achatter:help( "Send a message to admins in the chat." )