Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
/pm instead of !
#1
hey guys,

ok i have this problem:

i want to write
Quote:/pm Gilgamesch Hello!
Instead of:
Quote:!Gilgamesch Hello!


This is the code, but unfortuantely i didnt know how a nd what to change to get it to work, and if you knbow the fix, please post it and explain it to me! thanks!
Code:
' 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: !playername msghere", AlertColor)
            End If
            MyText = ""
            Exit Sub
        End If
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)