Hugos Posted August 31, 2019 Share Posted August 31, 2019 I have a function where I get text from "guiCreateEdit," as well as "triggerServerEvent," I need to move my text to the server part. How do I do that? function go(button) if button == "left" then guiGetText(pin) triggerServerEvent("check", resourceRoot) end end Link to comment
Hugos Posted August 31, 2019 Author Share Posted August 31, 2019 Spoiler @IIYAMA help me please) Link to comment
Moderators IIYAMA Posted August 31, 2019 Moderators Share Posted August 31, 2019 1 hour ago, Hugos said: Hide contents @IIYAMA help me please) Ha @Hugos I am currently a bit busy with stuff, I will reply when I have time. (~1.5 day) If you do not want to wait for help, there are two tutorials you can follow: The first one is about events: (which also includes triggerServerEvent's) And the second one is about some code that can help you making communication easier between serverside and clientside. 1 Link to comment
Scripting Moderators ds1-e Posted September 1, 2019 Scripting Moderators Share Posted September 1, 2019 16 hours ago, Hugos said: I have a function where I get text from "guiCreateEdit," as well as "triggerServerEvent," I need to move my text to the server part. How do I do that? function go(button) if button == "left" then guiGetText(pin) triggerServerEvent("check", resourceRoot) end end -- Client-side local guiText = guiGetText(pin) triggerServerEvent("check", resourceRoot, guiText) -- pass data -- Server-side function checkEvent(text) outputChatBox(text) end addEvent("check", true) addEventHandler("check", resourceRoot, checkEvent) 2 Link to comment
Hugos Posted September 1, 2019 Author Share Posted September 1, 2019 All many thanks! 2 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