Author Topic: I have a GUI, how to start it up?  (Read 765 times)

I have a GUI I made for something private. I was wondering how to open it In-Game.
When you join the server and this GUI pops out. How can I do that? Also, How do you make it pop out once only?

Parent GameConnection::onClientEnterGame and have it send a command to the client to open up the GUI window.

In order for the GUI to exist and function, they will need to have your mod installed, or at least the client-side part of it. Make sure it is possible to join the server without the GUI (either provide alternative commands or a message saying to download it plus a <a:rtb-ID> link) and not be spammed with console errors, as this is annoying.

Parent GameConnection::onClientEnterGame and have it send a command to the client to open up the GUI window.

Code: [Select]
GameConnection::onClientEnterGame
Cilent.cs

?

Where do I put
GameConnection::onClientEnterGame?
« Last Edit: January 25, 2009, 10:48:47 AM by HelpingHand »

In a package in server.cs - that's what is called in the server when you spawn in the server, so use that to send the command to open the GUI.

Define clientcmdopenHHGui() in client.cs to actually open the GUI and then send commandtoclient(%client,'openHHGui'); in the server part to do that command when they spawn.