Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] who's online form


Officer Johnson
 Share

Recommended Posts

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 client

now 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 input

and you got to choices

1\. add new command

so find /stats and underneath it put

```
case "/Online"
frmOnline.Show

```
or

2\. 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

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

> 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

  • 2 months later...
> ' [ 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

> ,…,<>" 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...