Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
About Konfuze PM Sys
#1
Use the same system as mirage does for sending packets.

Client side have the user type something like

/pminvite
send a packet to server
read packet from server
send request to "name"
print data on a picture box on "name's" client window
make two buttons so "name" can accept or decline
send "name's" input to the server
send "name's" input from server to person who sent invite

if "name" accepts, bring up the PM window
Reply
#2
Well you could do like I did, (yesturday) and make it so that the "buttons" are actually size 7 or size 6 labels that say invite accept and decline, and then change call playermsg and make it so that it says something like "You have been invited to chat with(Playername). click one of the labels above the text field to engage in a private conversation with (playername)."
Reply
#3
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:
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?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)