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
#2
Not shure if this is all that is needed but

take this code
Code:
Call AddText("Usage: !playername msghere", AlertColor)

and change to
Code:
Call AddText("Usage: /pm playername msghere", AlertColor)

if that doesnt im a retard or theres more to it


EDIT:
Id check it but sadly i dont have vb anymore
Reply
#3
dude... that's to just like say how to USE it... not to make it work Tongue

you'll have to make it detect that you're saying /pm and then make it send that message..... just make a new PM window... they're a LOT more fun and less clutter when you've got like... the main thing saying how much hp you've lost and damage done and stuff.. it's easy to miss a PM while hunting on MSE... i could release a basic PM window tutorial if people want?
Reply
#4
Tosuxo Wrote:dude... that's to just like say how to USE it... not to make it work Tongue

you'll have to make it detect that you're saying /pm and then make it send that message..... just make a new PM window... they're a LOT more fun and less clutter when you've got like... the main thing saying how much hp you've lost and damage done and stuff.. it's easy to miss a PM while hunting on MSE... i could release a basic PM window tutorial if people want?

that would be great if you d release a tut for that Smile

and @anarchy

#thanks that you are trying to help, but this doesnt work because as Tosuxo said, it just tells you how to use it Smile
Reply
#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
#6
grimsk8ter11 Wrote: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

thanks again Smile
Reply
#7
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
Reply
#8
same exact thing cept you used tell imstead of pm
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)