Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
/pm instead of !
#5
i hleped you with this before, off the top of my head i believe its this:

Code:
' Player message
        If LCase(Mid(MyText, 1, 4)) = "/pm " Then
            ChatText = Mid(MyText, 5, Len(MyText) - 4)
            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: /pm name msghere", AlertColor)
            End If
            MyText = ""
            Exit Sub
        End If
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)