Account Name:psnarayanan
Script Name:Admin Chat
Description:This is the Admin chat,use /sarp {text} to talk with it.
function adminChat( thePlayer,_,... )
local text = table.concat( {...}, " " )
local name = getPlayerName( thePlayer )
for _,v in pairs( getPlayersInGroup( accName ) ) do
outputChatBox ("#FF0000(SARP) "..tostring( name )..": #FFFFFF"..tostring( text ), v, 255, 255, 255, true)
end
end
addCommandHandler("cit", adminChat)
function getPlayersInGroup( accName )
local Table = { }
for _,v in pairs( getElementsByType( "player" ) ) do
local accName = getAccountName ( getPlayerAccount ( v ) )
if (isObjectInACLGroup ("user." .. accName, aclGetGroup("Admin")) ) then
table.insert( Table,v )
end
end
return Table
end
It's Correct but it's for CIT.