KaMeR Posted July 17, 2009 Share Posted July 17, 2009 how can i use chat via script send messages? these "outputConsole" , "outputChatBox" only appear text on chat.. not send message or im in wrong? Link to comment
50p Posted July 17, 2009 Share Posted July 17, 2009 Honestly, I have absolutely no idea what you're asking about. What do you want by saying "only appear text on chat.. not send message"? Link to comment
KaMeR Posted July 17, 2009 Author Share Posted July 17, 2009 my english is really bad so.. i say simply i want send private message via gui textbox but i have no idea how to send it to chat "/msg.." Link to comment
50p Posted July 17, 2009 Share Posted July 17, 2009 Using outputChatBox of course. If you read carefully what each parameter does in this function you will find out that there is a parameter called "visibleTo". The message is sent to an element and its children. If you want to learn then read tutorials which are on the wiki and take a look into other resources. Link to comment
KaMeR Posted July 18, 2009 Author Share Posted July 18, 2009 here is part of my code the problem is only i see the text but i want it visible to selected player from gridlist.. addEventHandler ( "onClientGUIClick", getResourceRootElement(getThisResource()), function ( ) if (source == GUIEditor_Button[1]) then local playerName = guiGridListGetItemText ( GUIEditor_Grid[1], guiGridListGetSelectedItem ( GUIEditor_Grid[1] ), 1 ) guiSetText ( GUIEditor_Label[2], playerName ) local text = guiGetText ( GUIEditor_Edit[1] )--get the text from the edit box outputChatBox(playerName .. "-> " ..tostring(text), playerName, 255,255,0, true) end end ) Link to comment
Lordy Posted July 18, 2009 Share Posted July 18, 2009 Client side outputChatBox has a bit different syntax. It outputs to local player only and thus there is no visibleTo argument. You'd need to trigger a server event to output to all players. 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