02-07-2006, 07:50 PM
this is what i use
Code:
' Player message
If Mid(MyText, 1, 5) = "/tell" Then
ChatText = Mid(MyText, 7, Len(MyText) - 6)
name = ""
' Get the desired player from the user text
For i = 1 To Len(ChatText)
If Mid(ChatText, i, 1) " " Then
name = name & Mid(ChatText, i, 1)
Else
Exit For
End If
Next i
' Make sure they are actually sending something
If Len(ChatText) - i > 0 Then
ChatText = Mid(ChatText, i + 1, Len(ChatText) - i)
' Send the message to the player
Call PlayerMsg(ChatText, name)
Else
Call AddText("Usage: /tell ", AlertColor)
End If
MyText = ""
frmMirage.txtChatText.Text = ""
Exit Sub
End If