Hugos Posted August 31, 2019 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 Говорю на русском. Sorry for bad english.
Hugos Posted August 31, 2019 Author Posted August 31, 2019 Spoiler @IIYAMA help me please) Говорю на русском. Sorry for bad english.
Moderators IIYAMA Posted August 31, 2019 Moderators 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 Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
sacr1ficez Posted September 1, 2019 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 Script security
Hugos Posted September 1, 2019 Author Posted September 1, 2019 All many thanks! 2 Говорю на русском. Sorry for bad english.
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