[CS:DE]Server Status

ok so i know there is a tutorial for this but it’s not for CS:DE
So here it is!!!

goto DrawMainMenu and add in

    If Sstatus = "Online" Then
        RenderText Font_Default, Sstatus, GUIWindow(GUI_MAINMENU).x + 420, GUIWindow(GUI_MAINMENU).y + 254, Green
    Else
        RenderText Font_Default, Sstatus, GUIWindow(GUI_MAINMENU).x + 420, GUIWindow(GUI_MAINMENU).y + 254, Red
    End If
    RenderText Font_Default, "Status: ", GUIWindow(GUI_MAINMENU).x + 375, GUIWindow(GUI_MAINMENU).y + 254, White

```at the bottom.

Then go into modGlobals
and add

Public SStatus As String


and add this in the code.

If ConnectToServer(1) Then
    Sstatus = “Online”
Else
    Sstatus = “Offline”
End If
Timer1.Enabled = False

and ur done!
Change the colors to however you want! :3

Clean. I like it 😄

i try to keep my tutorials and fixes as minimal as possible.

That is so usfull how didnt i thought about it 😛 thanks!

lol no problem

I do believe the Timer1.Enabled = False is unnecessary for this. Some people like leaving their clients open to wait for the server to return to its online state.

I just noticed what happens if you remove the Timer1.Enabled = False. My apologies.

ok so i know there is a tutorial for this but it’s not for CS:DE

What was the other one? I know it was for EO.

What was the other one? I know it was for EO.

It just checks the socket connection and changes a label.

It just checks the socket connection and changes a label.

This has no reference to a label, this is all rendered to the screen.

My post not related to this tutorial but the other one.

Either way I’ll add a quote.

Log in to reply