Custom server redirect pk3


(McSteve) #1

Ghostworks want to use the server redirect facility on our server, i.e.

set sv_fullmsg “ET://x.x.x.x:port”

but its a little basic as it is. I created a custom pk3 and slapped it into ETPro so that people who have connected before get a custom message with the redirect dialog box, instead of the slightly dull “redirection advised” message. However, currently the default action if the user clicks “NO” is to exit back to ET’s main menu as per the code below:

BUTTON( SUBWINDOW_X+6+.5*(SUBWINDOW_WIDTH-18)+6, SUBWINDOW_Y+SUBWINDOW_HEIGHT-24, .5*(SUBWINDOW_WIDTH-18), 18, "NO", .3, 14, uiScript clearError ; close popupServerRedirect ; open main_opener )

Ideally, we would like the action on “NO” to be to resume ‘queuing’ for the server. My gut instinct is that this wont be possible and at best we could get the action to loop back and try again. However, I’m hoping that someone more knowledgeable than myself will be able to tell me otherwise.

My knowledge of the possible actions available is limited. Any help anyone can offer would be greatly appreciated.

Thanks

GhosT:McSteve
Ghostworks Public - 213.230.209.87:27970


(El Stupido) #2

It is possibly but will most likley have nasty side effects. You can run clientside commands from uiscripts (dont ask me how i dont work with uiscripts that much but it was something straight forward like exec x or something…) so you could make the NO button do something like set ui_autoredirect 0 ; connect yourserver.blah. But the problem would be that it would stay off and the client wont see any redirect ever again without knowing why…


(=>ETK<=Elite) #3

Boy, I need to start testing things before I post, but this is what I think about it.

Computers only do what they are told to do (code), and they don’t do anything more, or anything less.

So, when the popup is displayed, and the No button is clicked, something is telling it to go back to the main screen.

Based on this, it shouldn;t be very much of an issue. Most likely the last command it is receiveing is to head back to the main screen—just delete the last command (as long as it looks like it would take you back to the main screen) and see what happens.


(McSteve) #4

Yes, the first thing I tried was deleting the last action for the NO button, i.e.

“open main_opener”

Unfortunately this had no effect. Its also worth noting that when the redirect box pops up, the client stops pinging the server and so just deleting the entire button and instructing the client to wait if they dont want to redirect doesnt work either.


(El Stupido) #5

:rolleyes:


(=>ETK<=Elite) #6

Ideally, we would like the action on “NO” to be to resume ‘queuing’ for the server. My gut instinct is that this wont be possible and at best we could get the action to loop back and try again. However, I’m hoping that someone more knowledgeable than myself will be able to tell me otherwise.

Most likely the case then with your original thoughts. Who knows though, as you said, perhaps someone else knows a solution to this.

What is happening is it gets the server full message and aborts the connection. What you want to do is to keep that connection alive, so I would imagine it would need to be in the code rather then just a menu file.

A simple reconnect command would be the only other way I can think of doing it, which would/should work.