| Mirage Source http://www.miragesource.net/forums/ |
|
| Chatroom help http://www.miragesource.net/forums/viewtopic.php?f=201&t=4268 |
Page 1 of 1 |
| Author: | DarkX [ Sat Sep 06, 2008 9:51 pm ] |
| Post subject: | Chatroom help |
Hey guys this does not really fit here but I don't want to waste posts in Advanced... but I started making a code for a chat room, I have gotten some of the code to work. Though I am kind of lost in a direction to go as far as getting the system to invite more then one player to the room, could someone give me an idea on how to work out the handling for more than one player. |
|
| Author: | William [ Thu Sep 11, 2008 11:19 am ] |
| Post subject: | Re: Chatroom help |
Well first of all your current system allows the reqruiting of 1 person. So you probably have a text box where you type the name to invite. A simple way would be to make it kind of like a guild. Where you have a array with the players in the chat/guild. So when you invite someone, you add his name to the array. Like: Code: Name(1 to 5) Now when adding it, you need to check what array slot is clear. Code: for i =1 to 5 if Player(index).ChatName(i) = vbnullstring then Player(index).ChatName(i) = Parse(1) end if next i Now he has been added to your list, but he also need the full current list of the owner. Code: for i =1 to 5 if Player(index).ChatName(i) = vbnullstring then Player(index).ChatName(i) = Player(owner).ChatName(i) end if next i And then you need to add a leave button on the chat so if a person leaves the chat, his name is cleared. Code: for i =1 to 5 if Player(index).ChatName(i) = getplayername(index) then Player(index).ChatName(i) = vbnullstring end if next i Well this was just a scetch, and it's not going to work in anyway. There are some problems with what I wrote. But I just tried to open your eyes for a easy way to do it. Of course you need to know some general programming to actually finish it. |
|
| Author: | DarkX [ Thu Sep 11, 2008 8:27 pm ] |
| Post subject: | Re: Chatroom help |
It does not matter if the code does not work, it gives me a idea to create a project to work on for the system. I am just modifing it anyway to where, there is a start IM and start ChatRoom, thanks for the help william. |
|
| Author: | William [ Sun Sep 14, 2008 6:19 pm ] |
| Post subject: | Re: Chatroom help |
No problem |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|