16-01-2007, 02:27 PM
I know this was around somewhere before. Basically just a listbox with the characters that are currently playing.
Server Players List
|
16-01-2007, 02:27 PM
I know this was around somewhere before. Basically just a listbox with the characters that are currently playing.
17-01-2007, 11:46 PM
Code: Function TotalOnlinePlayers() As Long Theres a TotalOnlinePlayers() function in modGameLogic in the server. That may not be exactly what yours looks like... close enough and the concept is the exact same. Just make a listbox named lstOnline within frmServer
18-01-2007, 12:23 AM
I have this somewhere. I can post it if you want?
18-01-2007, 02:08 PM
I got one working (See the link below) but I just want the list to show characters and nothing else, so i'll try lucidar's and see what that looks like.
http://www.mrpge.chronicalgames.com/ima ... r_main.jpg Edit: lucidar's doesn't work
19-01-2007, 01:02 AM
The code i use for mine is
Code: Private Sub Form_Load() The way it lists the player is diffrent but it does the same thing. Just it gets the player on a certain map as so i can see who i am chatting with.
19-01-2007, 03:28 AM
That seems like a really really really bad method to me
![]()
19-01-2007, 03:31 AM
GameBoy Wrote:That seems like a really really really bad method to meHow is that bad?
19-01-2007, 03:32 AM
I think I'm just lazy. I'd probably have written it myself if I'd have bothered to sit down and do it. I hate doing the boring bits though!!! :twisted:
20-01-2007, 07:50 AM
I just took the exact code from my server. (mine also has char,account,map and ip)
I think I may of changed when totalonlineplayers() was called though.. whatever, all you gotta do is throw a for loop with a call of >listbox.additem Player(i).Char(Player(i).CharNum).Name < I just put it in the function that I happenned to use whenever a character logged in/out. Just sit down for 5 damn minutes ![]() or for $2 I'll do it to your exact specs. :lol: Elmrok: I thought player index's didn't depend on the map#. Wouldn't you have to go something like: Code: Private Sub Form_Load() Wouldn't it be easier to call that with a command button, so you don't have to reload the form to 'refresh' the list too?
20-01-2007, 02:03 PM
Would that only check the online players once when the form loads? What about checking when a player connects and leaves? Unless that's what you want to do. I'll work with a new method, I don't need all the data, just the character name, so I'll get rid of my listview box.
20-01-2007, 02:27 PM
Zel, Elmrok's isn't lazy, he is showing whos on a map, not showing everyone online. Maybe that suites his purpose, and if you just didn't see that, read the whole code first.
JoinGame: Code: frmServer.lstOnline.AddItem GetPlayerName(index) LeaveGame: this should be the only time you have to refresh the list, but you could probably manage without it to Code: frmServer.lstOnline.Clear
21-01-2007, 04:30 AM
I never said anybody was lazy... lol, what's that all about?
21-01-2007, 04:51 AM
I misread your post about you being lazy then. But the bad method thing is still being scrutinized
![]()
21-01-2007, 06:03 PM
It checks the list for all online players when the form loads. That wouldn't really work on frmServer would it, since it only loads once...
21-01-2007, 06:48 PM
Ya, but for what he wanted, it works perfectly for. For what you want, the code i posted is ideal.
21-01-2007, 11:38 PM
Written a new one, works fine now.
Thanks to everybody for the help. |
« Next Oldest | Next Newest »
|