Bom,isso vai normalizar o sistema de mensagens privadas em seu jogo.
Esse é um bug que já veio com a engine...
Em modInput,troque isso:
Por isso:
Agora,no modClientTCP em PlayerMsg,troque isso:
Por isso:
Esse é um bug que já veio com a engine...
Em modInput,troque isso:
- Código:
' Player message
If Left$(ChatText, 1) = "!" Then
Exit Sub
ChatText = Mid$(ChatText, 2, Len(ChatText) - 1)
Name = vbNullString
' Get the desired player from the user text
For i = 1 To Len(ChatText)
If Mid$(ChatText, i, 1) <> Space(1) Then
Name = Name & Mid$(ChatText, i, 1)
Else
Exit For
End If
Next
ChatText = Mid$(ChatText, i, Len(ChatText) - 1)
' Make sure they are actually sending something
If Len(ChatText) - i > 0 Then
MyText = Mid$(ChatText, i + 1, Len(ChatText) - i)
' Send the message to the player
Call PlayerMsg(ChatText, Name)
Else
Call AddText("Usage: !playername (message)", AlertColor)
End If
MyText = vbNullString
frmMain.txtMyChat.text = vbNullString
Exit Sub
End If
Por isso:
- Código:
' Player message
If Left$(ChatText, 1) = "!" Then
ChatText = Mid(MyText, 2, Len(MyText) - 1)
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: !playername msghere", AlertColor)
End If
MyText = ""
frmMain.txtMyChat.text = ""
Exit Sub
End If
Agora,no modClientTCP em PlayerMsg,troque isso:
- Código:
Buffer.WriteLong CSayMsg
Por isso:
- Código:
Buffer.WriteLong CPlayerMsg