Author Topic: Suggest some bullshit... OH WAIT, SARP IS BULLSHIT LOL  (Read 427 times)

michael

  • Guest
Re: Suggest some bullshit... OH WAIT, SARP IS BULLSHIT LOL
« on: June 04, 2012, 05:47:45 pm »
Account Name:psnarayanan
Script Name:Admin Chat
Description:This is the Admin chat,use /sarp {text} to talk with it.

Code: [Select]
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.