Advertisement
Guest User

Untitled

a guest
Oct 31st, 2018
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. JuantloToday at 2:41 PM
  2. gay
  3. try this msg
  4. find bool isRegisterDialog = false;
  5. and add new line
  6. then fill bool isMSGDialog = false;
  7. there
  8. string username = "";
  9. string password = '";
  10. add new line
  11. and add
  12. string message = "";
  13. after
  14. if (isRegisterDialog) {
  15. if (infoDat[0] == "username") username = infoDat[1];
  16. if (infoDat[0] == "password") password = infoDat[1];
  17. }
  18. add new line
  19. and fill
  20. if (infoDat[0] == "dialog_name" && infoDat[1] == "msg")
  21. {
  22. isMSGDialog = true;
  23. }
  24. if (isMSGDialog) {
  25. if (infoDat[0] == "username") username = infoDat[1];
  26. if (infoDat[0] == "message") message = infoDat[1];
  27. }
  28. find #ifdef REGISTRATION
  29. and add new line
  30. then fill
  31. if (isMSGDialog) {
  32. string worldname = ((PlayerInfo*)(peer->data))->currentWorld;
  33. ENetPeer * currentPeer;
  34. for (currentPeer = server->peers;
  35. currentPeer < &server->peers[server->peerCount];
  36. ++currentPeer)
  37. {
  38. if (currentPeer->state != ENET_PEER_STATE_CONNECTED)
  39. continue;
  40.  
  41. if (((PlayerInfo*)(currentPeer->data))->rawName == username) {
  42. if (((PlayerInfo*)(currentPeer->data))->haveGrowId == false) continue;
  43. GamePacket ps = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`6>> Private msg from `0" + ((PlayerInfo*)(peer->data))->rawName + "`6 (`$in " + worldname + "`6) : " + message + "`6."));
  44. GamePacket ps2 = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`6>> (Sent to `$" + username + "`6)"));
  45. ENetPacket * packet23 = enet_packet_create(ps2.data,
  46. ps2.len,
  47. ENET_PACKET_FLAG_RELIABLE);
  48. enet_peer_send(peer, 0, packet23);
  49. ENetPacket * packetdd = enet_packet_create(ps.data,
  50. ps.len,
  51. ENET_PACKET_FLAG_RELIABLE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement