30-11-2008, 07:00 PM
Okay i am making a thing on the server side and there is a list on the server that shows when someone logs on. Im trying to make it so if i double click the name a new form will pop up and there stats will be there. Heres some codes i got.
This is what i got on the first screenie down there. It wont work because of the i= equation. Im not sure how to make it work so that the online player you double click on will equal i.
![[Image: server2zq0.th.jpg]](http://img91.imageshack.us/img91/925/server2zq0.th.jpg)
Okay this is the main server and at the bottom is the list that will show the online players. I got it if you double click on it itll pop up with the screenie up top.
This is what i got on the first screenie down there. It wont work because of the i= equation. Im not sure how to make it work so that the online player you double click on will equal i.
Code:
Private Sub Form_Load()
Dim i As Long
i = frmServer.lstOnline.Selected
frmStats.lstStats.AddItem "Account Login: " & Trim(Player(i).Login)
frmStats.lstStats.AddItem "Account Password: " & Trim(Player(i).Password)
frmStats.lstStats.AddItem "---------" & GetPlayerName(i) & "'s Stats---------"
frmStats.lstStats.AddItem "Name: " & GetPlayerName(i)
frmStats.lstStats.AddItem "Level: " & GetPlayerLevel(i)
frmStats.lstStats.AddItem "Experience: " & GetPlayerExp(i) & "/" & GetPlayerNextLevel(i)
frmStats.lstStats.AddItem "HP: " & GetPlayerHP(i) & "/" & GetPlayerMaxHP(i)
frmStats.lstStats.AddItem "MP: " & GetPlayerMP(i) & "/" & GetPlayerMaxMP(i)
frmStats.lstStats.AddItem "SP: " & GetPlayerSP(i) & "/" & GetPlayerMaxSP(i)
frmStats.lstStats.AddItem "Strength: " & GetPlayerSTR(i)
frmStats.lstStats.AddItem "Defense: " & GetPlayerDEF(i)
frmStats.lstStats.AddItem "Magic: " & GetPlayerMAGI(i)
frmStats.lstStats.AddItem "Speed: " & GetPlayerSPEED(i)
End Sub
![[Image: server2zq0.th.jpg]](http://img91.imageshack.us/img91/925/server2zq0.th.jpg)
Okay this is the main server and at the bottom is the list that will show the online players. I got it if you double click on it itll pop up with the screenie up top.
![[Image: server1xj4.th.jpg]](http://img505.imageshack.us/img505/1779/server1xj4.th.jpg)