Thanks alot Mr President!!
So here is what I used:
function ulx.asay( calling_ply, message )
local players = player.GetAll()
for i=#players, 1, -1 do
local v = players[ i ]
if ULib.ucl.query( v, seeasayAccess ) and v ~= calling_ply then
if ULib.ucl.query( calling_ply, seeasayAccess ) then
ULib.tsayColor(v, 1, Color(65,105,225), "::Admin:: ", team.GetColor(calling_ply:Team()), calling_ply:Nick(), Color(112,138,144), ": ", message )
else
ULib.tsayColor(v, 1, Color(0,0,0), "::User:: ", team.GetColor(calling_ply:Team()), calling_ply:Nick(), Color(119,136,153), ": ", message )
end
end
if v == calling_ply then
ULib.tsayColor(v, 1, Color(49,79,79), "::To Admins:: ", team.GetColor(calling_ply:Team()), calling_ply:Nick(), Color(112,138,144), ": ", message )
end
end
ulx.fancyLog( players, format, calling_ply, message )
end
local asay = ulx.command( CATEGORY_NAME, "ulx asay", ulx.asay, "@", true, true )
asay:addParam{ type=ULib.cmds.StringArg, hint="message", ULib.cmds.takeRestOfLine }
asay:defaultAccess( ULib.ACCESS_ALL )
asay:help( "Send a message to currently connected admins." )
I am confused about this part from you:
local logFile = ulx.convar( "logFile", "1", "Log to file (Can still echo if off). This is a global setting, nothing will be logged to file with this off.", ULib.ACCESS_SUPERADMIN )
if logFile:GetBool() then
ulx.logString( calling_ply:Nick() .. " to admins: " .. message, true )
end
end
local asay = ulx.command( CATEGORY_NAME, "ulx asay", ulx.asay, "@", true, true )
asay:addParam{ type=ULib.cmds.StringArg, hint="message", ULib.cmds.takeRestOfLine }
asay:defaultAccess( ULib.ACCESS_ALL )
asay:help( "Send a message to currently connected admins." )
Not sure if I should replace it with my current one :O
Do you mind explaining why you have that? :I
Thanks again!