I haven't managed to get a screen to pop up, but I have figured out the Mail packet for the most part (So that a message gets shown under "Community->Mail". It seems that if a user is offline the client sends packet 0x7e5 to the server when you try to send them a message. I'll post the packet in the Submit Code section for that, and I'll keep working on getting a popup message working.
Ok, weird, most of the server has that packets layout wrong. The first entry is a DWORD not a WORD. This will only work if the person that it is coming from is on the persons friend list who you are sending it to though. Otherwise the client has nowhere to get a name from so it just fails to show the message.
- BEGINPACKET( pak, 0x7e2 );
- ADDDWORD ( pak, 1 ); // 1 = id of my bot, auto added to all players
- ADDSTRING ( pak, "This is a message" ); // Change to change message.
- thisclient->SendPacket(&pak);