17-01-2007, 11:46 PM
Code:
Function TotalOnlinePlayers() As Long
Dim i As Long
TotalOnlinePlayers = 0
frmServer.lstOnline.Clear
For i = 1 To MAX_PLAYERS
If IsPlaying(i) Then
TotalOnlinePlayers = TotalOnlinePlayers + 1
frmServer.lstOnline.AddItem Player(i).Char(Player(i).CharNum).Name
End If
Next i
End Function
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