rusztamas Posted May 17, 2017 Share Posted May 17, 2017 (edited) Hello! I don't really unserstand some things in this whole stuff. 1) If i have a GUI for example a login system, how to send the textbox's text property to server side, from client side, to attempt a mysql query??? 2) On triggering from client to server, or from client to server, how the arguments work? For example, if i trigger a dxDrawImage function, from serverside, and it's only visible for a given people? I mean this: [client] function drawStuff() function renderDrawStuff() local stuff = dxDrawImage (500, 500, 20, 20, "20px_stuff") end addEventHandler ("onClientRender", getRootElement(), renderDrawStuff) end addEvent ("drawStuff", true) addEventHandler ("drawStuff", getRootElement(), drawStuff) [server] For example, here, i'd like only the command triggerer, to see the icon. function drawAnIcon() triggerClientEvent ("drawStuff", --[[now what XD]]) end addCommandHandler ("drawAnIcon", drawAnIcon) I never understood this argument stuff, tried to find a correct description for it, but did not find, i read other people's scripts, so i could understand them a bit. Edited May 17, 2017 by rusztamas Link to comment
Awang Posted May 17, 2017 Share Posted May 17, 2017 So first of all, arguments mean variables wich are attach to your event, what you triggered before. For example, you triggered "drawStuff" event, and you can attach a variable, then in function ( in client side drawstuff) you can use it. If you have any question, I can help you in PM in Hungary.... 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