crazyde21 Posted February 27, 2014 Share Posted February 27, 2014 guiCreateEdit guiCreateButton function clickplayers ( button, state, absoluteX, absoluteY, worldX, worldY, worldZ, clickedElement ) if button=="left" then if state =="down" then if getElementType ( clickedElement ) =="player" then if clickedElement != getLocalPlayer() then --check isn't me. triggerEvent ( "chatboxSend", getLocalPlayer() ) -- me chat box triggerEvent ( "chatboxTO", clickedElement ) -- player chat box end end end end end addEventHandler ( "onClientClick", getRootElement(), clickplayers ) addEvent ( "chatboxTO", true ) function playerchatbox ( ) guiCreateWindow(0.34, 0.31, 0.28, 0.30, "chatbox", true) guiWindowSetSizable(window[1], false) end addEventHandler ( "chatboxTO", root, playerchatbox ) addEvent ( "chatboxSend", true ) function mychatbox ( ) guiCreateWindow(0.34, 0.31, 0.28, 0.30, "chatbox", true) guiWindowSetSizable(window[1], false) end addEventHandler ( "chatboxSend", root, mychatbox ) See and my Q: how to create an GUI chat box, and my friend talk? .text in"guiCreateEdit " , button send text! Link to comment
Baseplate Posted February 27, 2014 Share Posted February 27, 2014 The whole script is a mess and that's first, secondly, where is the server side part? looks like a ripped off script. Link to comment
myonlake Posted February 27, 2014 Share Posted February 27, 2014 You should do yourself a favor and go read a little bit more about Lua scripting: viewtopic.php?f=148&t=40809. 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