1LoL1 Posted May 5, 2014 Share Posted May 5, 2014 Hi, I would need help .. this can be done Admin Chat so that I can write only admins and players are not? please help. -- Client bindKey("x", "down", "chatbox", "global") -- server function globalMessage ( thePlayer, cmd, ... ) if isPlayerMuted ( thePlayer ) then outputChatBox ( "You are muted!", thePlayer, 255, 0, 0 ) return end local message = table.concat ( { ... }, " " ) local name = getPlayerName ( thePlayer ) outputChatBox ( "#00FF00global chat: #FFFFFF".. name ..": #FFFF00".. message, getRootElement(), 255, 255, 255, true ) end addCommandHandler ( "global", globalMessage ) Link to comment
verdao Posted May 5, 2014 Share Posted May 5, 2014 function globalMessage ( thePlayer, cmd, ... ) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then if isPlayerMuted ( thePlayer ) then outputChatBox ( "You are muted!", thePlayer, 255, 0, 0 ) return end local message = table.concat ( { ... }, " " ) local name = getPlayerName ( thePlayer ) outputChatBox ( "#00FF00global chat: #FFFFFF".. name ..": #FFFF00".. message, getRootElement(), 255, 255, 255, true ) end addCommandHandler ( "global", globalMessage ) Link to comment
1LoL1 Posted May 5, 2014 Author Share Posted May 5, 2014 function globalMessage ( thePlayer, cmd, ... ) accountname = getAccountName(getPlayerAccount(thePlayer)) if isObjectInACLGroup("user." .. accountname, aclGetGroup("Admin")) then if isPlayerMuted ( thePlayer ) then outputChatBox ( "You are muted!", thePlayer, 255, 0, 0 ) return end local message = table.concat ( { ... }, " " ) local name = getPlayerName ( thePlayer ) outputChatBox ( "#00FF00global chat: #FFFFFF".. name ..": #FFFF00".. message, getRootElement(), 255, 255, 255, true ) end addCommandHandler ( "global", globalMessage ) It is not .. but it was written so that even AdminChat: text. I tried everything but nothing .. and that's seen players .. what I write admins Link to comment
1LoL1 Posted May 19, 2014 Author Share Posted May 19, 2014 Help anyone? P.S: Sorry for Double-Post. 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