Quick join button from main menu?

If somebody could help me, here is my problem:

I am trying to figure out how to set a UI menu button for quick joining a server from main menu. I made the quick join button but the function does not work. It always sets the connect IP to the localhost 192.168.0.0 I don’t have any source code so I can just work with the UI menu files. I’m not able to change the UI.scripts itself…
It looks like this

itemDef {
name playselection
text “QuickGame”
type 1
style 0
textstyle 0
rect 80 210 140 30
textalign 1
textalignx 70
textaligny 22
textscale .333
forecolor 0.55 0.73 0.53 .8
visible 0
action { play “sound/misc/menu2.wav” ;
close main ;
exec “set connect 51.15.26.38:27950”}

Is this even possible? Thanks for any help :slight_smile:

1 Like

Try exec "connect 51.15.26.38:27950”.

set is for variables but connect is a command.

2 Likes

Thanks for your answer :slight_smile: but with
exec “connect 51.15.26.38:27950”
The button just disappeared from menu and is not usable :frowning:
Any other idea?

SOLVED:

I found out that when I first enter the multiplayer (serverlist menu) and then go back to main menu the quick join button is working fine. I figured that I can take the information on the serverlist / joinserver.menu - uiScript UpdateFilter and then run the uiScript JoinServer.

itemDef {
name playselection
text “QuickGame”
type 1
style 0
textstyle 0
rect 80 210 140 30
textalign 1 // center
textalignx 70
textaligny 22
textscale .333
forecolor 0.55 0.73 0.53 .8
visible 0
action { play “sound/misc/menu2.wav” ;
uiScript UpdateFilter ; <-------------- :smiling_face_with_sunglasses:
close main ;
open { uiScript JoinServer }
}

Now it’s working fine :melting_face:

1 Like