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

Send Msg (Server)


Golf
 Share

Recommended Posts

Boring ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)

So this tut allows you to send msg to other players from server

**Only Server Side**

Open frmServer and go to Menu Editor(Ctrl + E)

Now go down with enter!

Add new textbox and name it textmsg

Put this in the caption : "Send Msg"

Put this in the name: "mnuMsg"

Click ok and search for Private Sub mnuKick_Click()

Above add

```

Sub mnuMsg_click()

Dim Name As String

Name = frmServer.lvwInfo.SelectedItem.SubItems(3)

If Not Name = "Not Playing" Then

Call SendPlayerData(FindPlayer(Name))

Call PlayerMsg(FindPlayer(Name), textmsg.Text, BrightGreen)

End If

End Sub

```
To send msg just type something in textbox and right click on player then Send Msg

Thats all. ![:biker:](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/bike-038.gif)
Link to comment
Share on other sites

First off, why are you using a menu for this? A slash command would be more than sufficient. ( /msg )

```

Call SendPlayerData(FindPlayer(Name))

```
Second, why are you sending the player data? This just increases bandwidth usage.

Third, if it is necessary to send the playerdata why are you calling FindPlayer twice? You could make a variable and set the player index to that specific variable, and use it in PlayerMsg and SendPlayerData.
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...