function getPlayersInGroup ( GroupName )
local aTable = {}
assert ( tostring ( GroupName ) , "Bad Argument At Argument #1 Group Moust String" )
assert ( aclGetGroup ( tostring ( GroupName ) ) , "Bad Argument At Argument #1 Group not Found " )
for i , player_ in ipairs ( getElementsByType ( "player" ) ) do
local TheAcc = getPlayerAccount ( player_ )
if not isGuestAccount ( TheAcc ) then
if isObjectInACLGroup ( "user." ..getAccountName ( TheAcc ) , aclGetGroup ( tostring ( GroupName ) ) ) then
table.insert ( aTable , player_ )
end
end
end
return aTable
end
Words = {
".com",
".org"
}
addEventHandler("onPlayerChat", root, function ( message )
for _, word in ipairs(Words) do
if( message:find( word ) )then
for _, player in ipairs(getPlayersInGroup( 'Admin' )) do
outputChatBox("#ff0000[ADM-Warn]:" ..getPlayerName(source).. ": " ..message.. "**", player, 255, 255, 255, true )
end
break;
end
end
end )