How can I make this resource like the globalchat? I mean that by touching a key I can open the chat and send the text, so I do not have to type a command / u [text]
function ADMINCHAT ( thePlayer, cmd, ... )
local accountname = getAccountName(getPlayerAccount(thePlayer))
if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin" )) then
message = table.concat({...}," ")
outputChatBox ("#5594FF[CHAT]-#FE5757"..getPlayerName(thePlayer)..": #FFFFFF"..message.."",getRootElement(thePlayer),255,255,255, true)
end
end
addCommandHandler ( "u", ADMINCHAT )