Mirage Source http://www.miragesource.net/forums/ |
|
/pm instead of ! http://www.miragesource.net/forums/viewtopic.php?f=210&t=220 |
Page 1 of 1 |
Author: | Gilgamesch [ Sun Jul 02, 2006 10:20 am ] |
Post subject: | /pm instead of ! |
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 |
Author: | Anarchy [ Sun Jul 02, 2006 3:48 pm ] |
Post subject: | |
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 |
Author: | Tosuxo [ Sun Jul 02, 2006 4:23 pm ] |
Post subject: | |
dude... that's to just like say how to USE it... not to make it work 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? |
Author: | Gilgamesch [ Sun Jul 02, 2006 4:45 pm ] |
Post subject: | |
Tosuxo wrote: dude... that's to just like say how to USE it... not to make it work
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 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 |
Author: | grimsk8ter11 [ Sun Jul 02, 2006 4:51 pm ] |
Post subject: | |
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 |
Author: | Gilgamesch [ Sun Jul 02, 2006 6:40 pm ] |
Post subject: | |
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 |
Author: | Leighland [ Sun Jul 02, 2006 7:50 pm ] |
Post subject: | |
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 <player> <msg>", AlertColor) End If MyText = "" frmMirage.txtChatText.Text = "" Exit Sub End If |
Author: | grimsk8ter11 [ Mon Jul 03, 2006 5:32 am ] |
Post subject: | |
same exact thing cept you used tell imstead of pm |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |