12-09-2006, 03:25 AM
When the user accepts or declines you need to send a message back to the server, and then send the person who requested the private chat that message from the server.
Client:
Server:
If you want it in a message box then you need to set up a new command to display message on a messagebox.. and instead of sending the message using the "PlayerMsg" routine, use the following:
Server:
Client Side:
That make more sense?
Client:
Code:
Sub SendAnswer(ByVal MsgFrom as Long)
Dim packet as string
packet = "DECLINEINVITE" & SEP_CHAR & MsgFrom & SEP_CHAR & END_CHAR
SendData(packet)
End Sub
Server:
Code:
If LCase(Parse(0)) = "declineinvite" Then
Dim InviteFrom = Parse(1)
Call PlayerMsg(InviteFrom, "That person has declined your request to chat privately.", Red)
Exit Sub
End If
If you want it in a message box then you need to set up a new command to display message on a messagebox.. and instead of sending the message using the "PlayerMsg" routine, use the following:
Server:
Code:
If LCase(Parse(0)) = "declineinvite" Then
Dim InviteFrom = Parse(1)
Dim packet as String
Msg = "That person has declined your request to chat privately."
packet = "DECLINED" & SEP_CHAR & Msg & SPE_CHAR & END_CHAR
Call SendDataTo(InviteFrom, packet)
Exit Sub
End If
Client Side:
Code:
If LCase(Parse(0)) = "declined" Then
Call AlertBox(Parse(1))
Exit Sub
End If
Code:
Sub AlertBox(ByVal Message As String)
If LEN(Message) > 0 then
Call MsgBox(Message, vbOkOnly)
End If
End Sub
That make more sense?