Author Topic: How do I make my GUI open with a /cmd  (Read 807 times)

I made a gui "DEOG.gui" and I want it to open using /gui not just for me, but for everyone in the server.

Any help? I will upload the DEOG.gui I created if necessary.

Please specify on what programs are you using and are you hosting the server or joining it

Guis are client sided. Everyone that wants to see the gui in your server will have to download it.

Guis are client sided. Everyone that wants to see the gui in your server will have to download it.
This. You will actually have to make a add-on and have the server owner upload it

He could have it open just for him with a fake server command client sided.

everyone in the server.
He could have it open just for him with a fake server command client sided.
I don't think that would work, I mean you could make it open only for you, but that doesn't open it for everybody else too..

and yeah, there's no good way to do this, forcing the clients to download an addon to play on a server is janky

forcing the clients to download an addon to play on a server is janky
If its say, a GUI for inventory, quests, and RPG values such as wood and ore, would it be so bad to make an addon an actual neccesity of joining the server?

Just an example.

And also, I was just trying to get the GUI I made to open for me in my server.

If anyone else did the /cmd and they don't have the gui, a normal "You don't have this addon" error msg would be fine. This is what I need.


Add this to the client script:
Code: [Select]
package wot
{
function NHM_Type::send(%this)
{
    %msg=%this.getValue();
    parent::send(%this);
    if(%msg$="/open")
    {
         canvas.pushDialog(GuiNameHere);
    }
}
};
activatePackage(wot);
Should work, not 100% on it, as I'm not going to bother testing it.