General > Developers Corner

@ [Message] For Moderator?

(1/2) > >>

AsaKahn:
So whenever someone types @ [message] it only goes out to admin and up, but is there a way to make moderators see this too?

Thanks

MrPresident:
Anyone with access to: "ulx seeasay" will see the @messages

AsaKahn:
Thanks!

BobTheDuck69:
I have been working on a command similar to SAsay and Asay i will release the code if you want it.

BobTheDuck69:
Probably busted cuz i modded the SAsay code to be for mods hope it works enough all users must do is type !Msay
--- Code: ---function ulx.Msay( calling_ply, message )

local format

local me = "/me "

if message:sub( 1, me:len() ) == me then

format = "(SUPERADMINS) *** #P #s"

message = message:sub( me:len() + 1 )

else

format = "#P to Moderators: #s"

end

local players = player.GetAll()

for i=#players, 1, -1 do

local v = players[ i ]

if not ULib.ucl.query( v, seeMsayAccess ) and v ~= calling_ply then

table.remove( players, i )

end

end

ulx.fancyLog( players, format, calling_ply, message )

end
local Msay = ulx.command( "Chat", "ulx Msay", ulx.Msay, "!Msay", true, true )
Msay:addParam{ type=ULib.cmds.StringArg, hint="message", ULib.cmds.takeRestOfLine }
Msay:defaultAccess( ULib.ACCESS_SUPERADMIN )
Msay:help( "Send a message to currently connected moderators." )

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version