Dice Posted December 11, 2012 Share Posted December 11, 2012 Why isnt the chatbox coming out in color. function adminChat(thePlayer, commandName, text) local user = "user."..getAccountName ( getPlayerAccount ( thePlayer ) ) local playerName = getPlayerName ( thePlayer ) for id, player in ipairs ( aclGroupListObjects ( aclGetGroup ( "Admin" ) ) or aclGroupListObjects ( aclGetGroup ( "SuperModerator" ) ) ) do if player == user then outputChatBox( "#FF0000[#CCCCCCAdmin#FF0000] #FF0000".. playerName.. "#CCCCCC: #FF0000"..text, player, 255, 255, 255, true) end end end addCommandHandler( "achat", publicChat ) EDIT: matter of fact its not working at all...it just shows it to everyone not to admins only Link to comment
manve1 Posted December 11, 2012 Share Posted December 11, 2012 function adminChat(thePlayer, commandName, text) local user = "user."..getAccountName ( getPlayerAccount ( thePlayer ) ) local playerName = getPlayerName ( thePlayer ) for id, player in ipairs ( aclGroupListObjects ( aclGetGroup ( "Admin" ) ) or aclGroupListObjects ( aclGetGroup ( "SuperModerator" ) ) ) do if player == user then outputChatBox( "#FF0000[#CCCCCCAdmin#FF0000] #FF0000".. playerName.. "#CCCCCC: #FF0000"..text, thePlayer, 255, 255, 255, true) end end end addCommandHandler( "achat", publicChat ) Link to comment
Castillo Posted December 11, 2012 Share Posted December 11, 2012 function adminChat ( thePlayer, commandName, ... ) local text = table.concat ( { ... }, " " ) local playerName = getPlayerName ( thePlayer ) for _, player in ipairs ( getElementsByType ( "player" ) ) do local account = getAccountName ( getPlayerAccount ( player ) ) if ( isObjectInACLGroup ( "user.".. account, aclGetGroup ( "Admin" ) ) or isObjectInACLGroup ( "user.".. account, aclGetGroup ( "SuperModerator" ) ) ) then outputChatBox ( "#FF0000[#CCCCCCAdmin#FF0000] #FF0000".. playerName .."#CCCCCC: #FF0000".. text, player, 255, 255, 255, true ) end end end addCommandHandler ( "achat", publicChat ) 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