^_^ LOL ^_^ Posted February 21, 2014 Share Posted February 21, 2014 Hello! How i can make when you press button then hes will do all server.lua (serverside) file. And can anyone give example or smth? Link to comment
Karuzo Posted February 21, 2014 Share Posted February 21, 2014 What do you mean with he will do all server.lua ? You could trigger to the Server if he clicks on a button just like this: addEventHandler("onClientGUIClick", yourbutton, function() triggerServerEvent("YourEvent", localPlayer) outputChatBox("Test") end) Link to comment
Vanlot Posted February 21, 2014 Share Posted February 21, 2014 use the following functions : guiCreateButton triggerServerEvent the first one in order to create the gui button and the second to trigger the event from client to server side Link to comment
^_^ LOL ^_^ Posted February 21, 2014 Author Share Posted February 21, 2014 @KRZO i mean if hes press button then hes will do all what are typed in server.lua (serverside) file. Thanks for help. I will try Link to comment
Karuzo Posted February 21, 2014 Share Posted February 21, 2014 What do you mean with all typed in server.lua ? Could you be more specific please ? If you want to trigger an Event just uste triggerServerEvent. Link to comment
Moderators Citizen Posted February 21, 2014 Moderators Share Posted February 21, 2014 @KRZOi mean if hes press button then hes will do all what are typed in server.lua (serverside) file. Thanks for help. I will try Please use at least google translate. 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