Sauerworld Forum

Quick Connect Menu GUI

alebrije

  • *
  • 21
  • +4/-0
    • JuGadores Latinos eXtremos
Quick Connect Menu GUI
« on: January 07, 2016, 07:19:55 PM »
Hi all, i know there are many srcipts and GUIs for a quick connect but, i dont care,  :P
This is a GUI for /dev/open server and effic.me servers.

Code: [Select]
bind "F4" "showgui QuickConect"

newgui QuickConect [
    guilist [
        guilist [
            guitext "/dev/open:"
            guitext "/dev/open_usa: "
        ]
        guilist [
            guiradio "2  "  dev_open 4  [dev_port = 2000]
            guiradio "0"    dev_open 1  [dev_port = 2000]
        ]
        guilist [
            guiradio "3  "  dev_open 5  [dev_port = 2010]
            guiradio "1"    dev_open 2  [dev_port = 2010]
        ]
        guilist [
            guiradio "4"    dev_open 6  [dev_port = 2020]
            guiradio "2"    dev_open 3  [dev_port = 2020]
        ]
    ]
    guibar
    if $dev_open [
       
        local dev_server_ip
        dev_server_ip = (? (< $dev_open 4) 172.245.62.148 185.38.47.91)
       
        guilist [
            guibutton "Connect     "    [ connect @dev_server_ip $dev_port; dev_open = 0 ]
            guibutton "Say command"     [ say (concat "/connect" @dev_server_ip $dev_port); dev_open = 0 ]
        ]
    ][
        guitext "Select a server to show options."
    ]
   
    guitab "effic.me"
   
    guilist [
        guiradio "1  "   effic_me 1
        guiradio "2  "   effic_me 2
        guiradio "3  "   effic_me 3
        guiradio "4  "   effic_me 4
        guiradio "5  "   effic_me 5
        guiradio "6"     effic_me 6
    ]
    guibar
   
    if $effic_me [
   
        local effic_port
        effic_port = (* $effic_me 10000)
       
        guilist [
            guibutton "Connect     "    [ connect "effic.me" @effic_port; effic_me = 0 ]
            guibutton "Say command"     [ say (concat "/connect effic.me" @effic_port); effic_me = 0 ]
        ]
    ][
        guitext "Select a server to show options."
    ]
]

I tried to do all variables local but i cant  :'(

The GUI is binded to the F4 key: fell free to change it.

And just add the code to your autoexec.cfg or copy paste to an empty text file and name it as you want (with the extention cfg, of course), then add the lines exec file_name.cfg at the end of your autoexec.cfg

And here some screnshots:







« Last Edit: January 07, 2016, 11:16:53 PM by alebrije »
Verba volant, scripta manent

Alu

  • *
  • 43
  • +2/-0
Re: Quick Connect Menu GUI
« Reply #1 on: January 11, 2016, 05:26:32 PM »
gastas tiempo en hacer cosas que ya hay y no haces el script de los skins õ.õ no respetas :'v