micheal1230 Posted June 8, 2012 Share Posted June 8, 2012 Is It Possible To Get The Text Inside The GUI From Clientside For A Serverside Function For Example Im Creating A Change Name Script Which Changes The Players Name When Types It Into A GUI Edit Box And Clicks Change Name, How Can I Get The Text From The GUI Element Edit Box And Take It To Serverside For A MYSQL Export?? Link to comment
X-SHADOW Posted June 8, 2012 Share Posted June 8, 2012 guiGetText === > triggerServerEvent i think ? Link to comment
micheal1230 Posted June 8, 2012 Author Share Posted June 8, 2012 guiGetText === > triggerServerEvent i think ? Nope Doesnt Work Link to comment
Guest Guest4401 Posted June 8, 2012 Share Posted June 8, 2012 --client side local edit = guiCreateEdit(100,100,200,50,"",false) local button = guiCreateButton(100,150,200,50,"Change name",false) addEventHandler('onClientGUIClick',button, function() triggerServerEvent('anEvent',localPlayer,guiGetText(edit)) end ) --server side addEvent('anEvent',true) addEventHandler('anEvent',root, function(text) setPlayerName(source,text) end ) Link to comment
micheal1230 Posted June 8, 2012 Author Share Posted June 8, 2012 --client side local edit = guiCreateEdit(100,100,200,50,"",false) local button = guiCreateButton(100,150,200,50,"Change name",false) addEventHandler('onClientGUIClick',button, function() triggerServerEvent('anEvent',localPlayer,guiGetText(edit)) end ) --server side addEvent('anEvent',true) addEventHandler('anEvent',root, function(text) setPlayerName(source,text) end ) Thanks For The Help! 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