Tremulous Forum

Mods => Modding Center => Topic started by: Lonly on February 07, 2009, 02:02:22 PM

Title: Connect to a server UI Script
Post by: Lonly on February 07, 2009, 02:02:22 PM
I am working on my Mod's Hud and I added new features but I want to make a text connect to a server. Like /connect but in UI script form.

This is what I got.

    itemDef
    {
      name mainmenu
      text "Update"
      type ITEM_TYPE_BUTTON
      style WINDOW_STYLE_EMPTY
      textstyle ITEM_TEXTSTYLE_NORMAL
      rect X (Y+ELEM_H) W ELEM_H
      textalign ALIGN_CENTER
      textscale .416
      forecolor 1 1 1 1
      visible MENU_TRUE
      action
      {
        play "sound/misc/menu1.wav";
(Here I need the UI Script to connect to 67.163.190.79:32123)
      }
    }


So that every time you click Update (Since the server is up 24/7) you connect to the Mod's host server. I tried nearly everything that came to mind. I searched but I didn't find anything. Can I get the UI Script Action.
Title: Re: Connect to a server UI Script
Post by: kevlarman on February 07, 2009, 04:39:49 PM
connect 67.163.190.79:32123?
Title: Re: Connect to a server UI Script
Post by: Lonly on February 07, 2009, 06:21:59 PM
Quote from: kevlarman on February 07, 2009, 04:39:49 PM
connect 67.163.190.79:32123?

Tried it it says the following:::

unknown UI script 67.163.190.79
unknown UI script 32123
Title: Re: Connect to a server UI Script
Post by: remember on February 07, 2009, 06:49:04 PM
Try this :
exec "connect 67.163.190.79:32123"
Title: Re: Connect to a server UI Script
Post by: Lonly on February 07, 2009, 07:02:52 PM
Quote from: remember on February 07, 2009, 06:49:04 PM
Try this :
exec "connect 67.163.190.79:32123"


THANKS SO MUCH!