Chukillz Posted September 21, 2011 Author Share Posted September 21, 2011 Ok i figured it all out…This is my first tutorial so please dont yell at meThis is how you would add a News Section In your game.All Client Side:First, in client/data files/Add a new txt doc and name it ingame_news.txtnow for the coding part!in frmMain find```Private Sub Form_Load()```add below this```Dim tmpTxt As String, tmpArray() As String, i As Long```next in frmMain find```picCover.width = picScreen.width + 2```add below this```' load news Open App.Path & "\data files\ingame_news.txt" For Input As #1 Line Input #1, tmpTxt Close #1 ' split breaks tmpArray() = Split(tmpTxt, "") lblNews.Caption = vbNullString For i = 0 To UBound(tmpArray) lblNews.Caption = lblNews.Caption & tmpArray(i) & vbNewLine Next```now go into your frmMain interface and add a new label called lblNewssave and compileThen you are done!Thats all it takes very very simple (if i can do it you can do it) :P Link to comment Share on other sites More sharing options...
Prince Posted September 22, 2011 Share Posted September 22, 2011 So we gonne put the news in this ingame_news.txt? Link to comment Share on other sites More sharing options...
Chukillz Posted September 22, 2011 Author Share Posted September 22, 2011 the ingame_news.txt will show only in the frmMain after you add a label. and the news.txt that came with the original source will only be used in frmMenu. incase you dont want the same news in both…if you only want to use the same news in both frmMenu and frmMain then just change this line```Open App.Path & "\data files\ingame_news.txt" For Input As #1```into this```Open App.Path & "\data files\news.txt" For Input As #1```or where ever you have your news.txt file.so the answer to your question would be this…The news you want shown on the Menu of your game.. you put it in news.txt and the news that you want shown in the ingame then just put it in ingame_news.txt i will upload a screenshot Link to comment Share on other sites More sharing options...
Rob Janes Posted September 22, 2011 Share Posted September 22, 2011 It's a good start, but very ineffective, as this means the news file is client side and wouldnt be updates from the server.Without programming it for you, look at adding a new for SSendNews enumerator, then a handle method on the client, and a send method on the server to send whenever a connection is made Link to comment Share on other sites More sharing options...
Chukillz Posted September 22, 2011 Author Share Posted September 22, 2011 exactly what do you mean by adding the news in to the server when editing the news was never sent from the server in the first place from what i have seen.i am a complete noob when it comes to this lmao…i am still trying to figure things out. any tips and hins would be great Link to comment Share on other sites More sharing options...
Chukillz Posted October 18, 2011 Author Share Posted October 18, 2011 i havent learned how to do it through the server yet, only the client, still learning Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now