Craselin Posted April 17, 2011 Author Share Posted April 17, 2011 Hello reader (and hopefully, question answerer),I wanted to set up a system in EO 2.0.0 in which there is a small button on the screen which when pressed a new window pops up showing a message/s from the head admin running the server (the text in the window should be edited from a file called "adminmessage.ini" (or .txt depending which is appropriate for this source edit)Unfortunately, I only have a vauge idea how to do this (i think you would make the command button call up the text from the server and display it in a text box on the new window) and I don't know what the codes would be.If someone could please share instructions on how to do this I would be very grateful.Kind regards,Craselin Link to comment Share on other sites More sharing options...
Ruins of Hell Posted April 17, 2011 Share Posted April 17, 2011 1\. Send a packet request when the player clicks the button. (See how it's done in other places.)2\. Have the server look up what's in "adminmessage.ini". (See how the options are loaded.)3\. Have the server send the packet back.4\. Have the message displayed in the textbox. Link to comment Share on other sites More sharing options...
Conra Posted April 17, 2011 Share Posted April 17, 2011 Why not just use a global message in the text box for when they log in??? Link to comment Share on other sites More sharing options...
Craselin Posted April 17, 2011 Author Share Posted April 17, 2011 lol, browser refresh error thingy, you double posted.Because i will use that for minor things or welcome messages or for telling people events that are on today etc bug the admin message thingy will have loads more information, to much to put into the MOTD Link to comment Share on other sites More sharing options...
Conra Posted April 17, 2011 Share Posted April 17, 2011 Yes i did accidentally double post because my phone refreshed but i did report it to a mod. Anyway if your game has an auto updater update the text box and then put that as an update. Will be really small and is as easy as editing your .ini file you wanted. Just without the programming. Link to comment Share on other sites More sharing options...
Craselin Posted April 18, 2011 Author Share Posted April 18, 2011 Good idea, but, I also want this messages to say if new updates are out so it would be pointless if i did it like that.And soul, i looked into what you said but i really cant work it out :huh: Link to comment Share on other sites More sharing options...
Conra Posted April 18, 2011 Share Posted April 18, 2011 There are going to be collisions with checking if there are new updates in game because of an updated server and an out dated client. I suggest running the auto updater automatically when the client starts to send the message and to update the client. Link to comment Share on other sites More sharing options...
cowin000 Posted April 18, 2011 Share Posted April 18, 2011 You would need to creat a file in your server directory, call it adminmessage.ini then send a packet from the server to the clie t so it can read it. If you need anyhelp pm me and ill give u details on how to do it. Link to comment Share on other sites More sharing options...
Conra Posted April 18, 2011 Share Posted April 18, 2011 Cowin why not just post it here to help all the other people with this out??? Link to comment Share on other sites More sharing options...
Ruins of Hell Posted April 18, 2011 Share Posted April 18, 2011 @Conra:> There are going to be collisions with checking if there are new updates in game because of an updated server and an out dated client. I suggest running the auto updater automatically when the client starts to send the message and to update the client.Then remove it or just don't use the feature at all? Or better yet: display the message when there is a new update and the version don't match.If you can't help the guy, don't post. >_>Craselin: there's some packet tutorials in the Source Tutorial section. Look at those and it will help. Link to comment Share on other sites More sharing options...
Craselin Posted April 18, 2011 Author Share Posted April 18, 2011 Thank you very much Link to comment Share on other sites More sharing options...
Conra Posted April 18, 2011 Share Posted April 18, 2011 I was just giving my advice Soul. . . Link to comment Share on other sites More sharing options...
Ruins of Hell Posted April 18, 2011 Share Posted April 18, 2011 @Conra:> I was just giving my advice Soul. . .No, you're not. You're spamming the boards in hopes of upping your post count. There is a clear distinction between helping and just spamming. 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