Gtakiki Posted June 22, 2013 Share Posted June 22, 2013 Server: function alertChat( thePlayer,_,... ) local text = table.concat( {...}, " " ) local name = getPlayerName( thePlayer ) for _,v in pairs( getPlayersInGroup( accName ) ) do outputChatBox ("#FF0000(NOTE) "..tostring( name )..": #FFFFFF"..tostring( text ), v, 255, 255, 255, true) end end addCommandHandler("/note", alertChat) function getPlayersInGroup( accName ) local Table = { } for _,v in pairs( getElementsByType( "player" ) ) do local accName = getAccountName ( getPlayerAccount ( v ) ) if isObjectInACLGroup ( "user." .. tostring( accName ), aclGetGroup( "Admin" ) ) or isObjectInACLGroup ( "user." .. tostring( accName ), aclGetGroup ( "SuperModerator" ) ) or isObjectInACLGroup ( "user." .. tostring( accName ), aclGetGroup ( "Moderator" ) ) then table.insert( Table,v ) end end return Table end Meta: "Kristof" version="1.0" type="script" name="Admin Note" description="Admin Note" /> http://kepfeltoltes.hu/view/130622/mta- ... es.hu_.png http://kepfeltoltes.hu/view/130622/mta- ... es.hu_.png Link to comment
iMr.3a[Z]eF Posted June 22, 2013 Share Posted June 22, 2013 Server: function alertChat( thePlayer,_,... ) local text = table.concat( {...}, " " ) local name = getPlayerName( thePlayer ) for _,v in pairs( getPlayersInGroup( accName ) ) do outputChatBox ("#FF0000(NOTE) "..tostring( name )..": #FFFFFF"..tostring( text ), v, 255, 255, 255, true) end end addCommandHandler("/note", alertChat) you dont have to write /note because when you write /note its not works set it like this function alertChat( thePlayer,_,... ) local text = table.concat( {...}, " " ) local name = getPlayerName( thePlayer ) for _,v in pairs( getPlayersInGroup( accName ) ) do outputChatBox ("#FF0000(NOTE) "..tostring( name )..": #FFFFFF"..tostring( text ), v, 255, 255, 255, true) end end addCommandHandler("note", alertChat) * without "/" and please when ever you got problem in any code write the code and the problem Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now