Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with news
#1
Ok I had found this code in Elysium Debugged, and started working on my own here's the Elysium code

Code:
SERVER SIDE!!!!
modservertcp

Sub SendNewsTo(ByVal index As Long)
Dim Packet As String

    Packet = "NEWS" & SEP_CHAR & ReadINI("DATA", "ServerNews", App.Path & "\data\News.ini") & SEP_CHAR & END_CHAR
    
    Call SendDataTo(index, Packet)
End Sub

joingame
    Call SendNewsTo(index)

modgeneral---initserver
    If Not FileExist("News.ini") Then
        PutVar App.Path & "\data\News.ini", "DATA", "ServerNews", "News:*D-Bugged Elysium has been released!*If you can see this, the update worked!***"
    End If

CLIENT SIDE
    ' :::::::::::::::::::::::::::::::::
    ' ::     News Recieved packet    ::
    ' :::::::::::::::::::::::::::::::::
    If LCase(Parse(0)) = "news" Then
        Call WriteINI("DATA", "News", Parse(1), (App.Path & "\News.ini"))
        Exit Sub
    End If

also make a txt box
I think what I'm missing is a form of code to pull the file from server side, which I have been unable to figure out.
Reply
#2
Al lthis does it pull test from an INI, and send it client side...


Just use the MOTD code then, and create a label or textbox and have it set it's caption/text to the news sent when the packet is recieved.
Reply
#3
And i think elysium has its own website?
Reply
#4
Quote:Ok I had found this code in Elysium Debugged, and started working on my own here's the Elysium code

If you read that line fox, you'll understand he took the OUTLINE of elysium, and is making his OWN using that outline. So it's not elysium.
Reply
#5
Actually Elysium's news system does pretty much the samething I'm trying to accomplish, you wright the news.ini on the server side, and when someone logs on via there copy of the client it pulls the news.ini from server side and saves it Client side. I just can't get it to pull the one from server side, I have it to where it saves both client and server side but they are never the same thing and you have to self-update the .ini client side.
Reply
#6
Uuuusseeee the MOTD code.....


Like I said before.
And just write it to an INI when the client recieves the packet.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)