Officer Johnson Posted August 7, 2014 Author Share Posted August 7, 2014 so i made a online list but made it in a form and updated the who's command so what you gotta do is download the form [here](https://www.dropbox.com/s/rd8lk2t1yju9lcf/frmOnline.frm)and add it to your clientnow lets get to the code so first off in modHandleData in sub handle data, add this above everything```Dim i as Long```then in the same sub find,``` CallWindowProc HandleDataSub(MsgType), 1, Buffer.ReadBytes(Buffer.Length), 0, 0```add this below it ' [ Online List ] frmOnline.lstOnline.Clear For i = 1 To Player_HighIndex frmOnline.lstOnline.AddItem Trim$(Player(i).Name) Next i Exit Sub ' [ Online List ]now go to mod inputand you got to choices1\. add new commandso find /stats and underneath it put```case "/Online" frmOnline.Show```or2\. Find /who and replace the code under it with this```frmOnline.Show```that should be it, i have tested it but i may have forgot something so let me know if any issues~no credit required~Features in future dialogue from the online list so you can click there name and: choose private message invite or trade(if i get time to do it)enjoy! Link to comment Share on other sites More sharing options...
Rob Janes Posted August 7, 2014 Share Posted August 7, 2014 In theory you're doing it correctly but at the moment you're updating the who's online list every single time a packet is received. You should make a sub called "UpdateWhosOnline", and put your loop in there, and call UpdateWhosOnline only when someone connects or disconnects from the game.Same idea as you have no just move it to a place where it's more appropriate, and avoiding loops where needed. Link to comment Share on other sites More sharing options...
Officer Johnson Posted August 7, 2014 Author Share Posted August 7, 2014 > In theory you're doing it correctly but at the moment you're updating the who's online list every single time a packet is received. You should make a sub called "UpdateWhosOnline", and put your loop in there, and call UpdateWhosOnline only when someone connects or disconnects from the game.> > Same idea as you have no just move it to a place where it's more appropriate, and avoiding loops where needed.ill look in to it thanks for the feedback Link to comment Share on other sites More sharing options...
WiseRock Posted August 7, 2014 Share Posted August 7, 2014 Nice this could come in handy Link to comment Share on other sites More sharing options...
abhi2011 Posted August 8, 2014 Share Posted August 8, 2014 Or instead of doing it every loop do it every time the window is shown or activated or something. Link to comment Share on other sites More sharing options...
Slasheree Posted November 5, 2014 Share Posted November 5, 2014 > ' [ Online List ]> frmOnline.lstOnline.Clear> > For i = 1 To Player_HighIndex> frmOnline.lstOnline.AddItem Trim$(Player(i).Name)> > Next i> Exit Sub> ' [ Online List ]Player_HighIndex only stores the value of the player with the highest index so there could be 'null players' between 1 and Player_HighIndex, so you might want to add a "isPlaying(i)" in there otherwise this will cause errors :) Link to comment Share on other sites More sharing options...
Officer Johnson Posted November 5, 2014 Author Share Posted November 5, 2014 > ,…,<>" data-cid="930432" data-time="1415189380">> > Player_HighIndex only stores the value of the player with the highest index so there could be 'null players' between 1 and Player_HighIndex, so you might want to add a "isPlaying(i)" in there otherwise this will cause errors :)Ive learned a lot more since this tutorial. I suppose i could re write it, if anyone needs this? 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