| Blockland Forums > Modification Help |
| Making a clientsided GUI show serversided variables. |
| (1/2) > >> |
| otto-san:
Could I do this by having some sort of commandToClient thing And have the text be a variable on the client or something? Any help would be nice. |
| Headcrab Zombie:
You'd need to send them through a commandToClient, exactly how you code it would depend on what you're doing with it. If you have a large amount of variables that change values often, and having a delay between opening the GUI and getting a proper value is not an issue, have the bind to open the GUI also call a commandToServer, and have the serverCmd call a commandtoclient, and the clientCmd sets the values in the GUI. If you have a small amount of variables, or a larger amount that doesn't change values often, and a delay is an issue, you could call a commandToClient every time the value of the variable changes, and the clientCmd would immediately change the value, even while the GUI is open. |
| otto-san:
That's what I was thinking. Just sending the command over every time. And I see how the function would work, too. Thanks. |
| Headcrab Zombie:
You could also try a message callback, though I'm not entirely sure how to set that up on the client. Once I get home I'll look through some old code to see if I can find an example, if someone else doesn't. Found some stuff on my laptop that I can look through |
| otto-san:
I just want a GUI on the playgui that shows variables. :I |
| Navigation |
| Message Index |
| Next page |