Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JuantloToday at 2:41 PM
- gay
- try this msg
- find bool isRegisterDialog = false;
- and add new line
- then fill bool isMSGDialog = false;
- there
- string username = "";
- string password = '";
- add new line
- and add
- string message = "";
- after
- if (isRegisterDialog) {
- if (infoDat[0] == "username") username = infoDat[1];
- if (infoDat[0] == "password") password = infoDat[1];
- }
- add new line
- and fill
- if (infoDat[0] == "dialog_name" && infoDat[1] == "msg")
- {
- isMSGDialog = true;
- }
- if (isMSGDialog) {
- if (infoDat[0] == "username") username = infoDat[1];
- if (infoDat[0] == "message") message = infoDat[1];
- }
- find #ifdef REGISTRATION
- and add new line
- then fill
- if (isMSGDialog) {
- string worldname = ((PlayerInfo*)(peer->data))->currentWorld;
- ENetPeer * currentPeer;
- for (currentPeer = server->peers;
- currentPeer < &server->peers[server->peerCount];
- ++currentPeer)
- {
- if (currentPeer->state != ENET_PEER_STATE_CONNECTED)
- continue;
- if (((PlayerInfo*)(currentPeer->data))->rawName == username) {
- if (((PlayerInfo*)(currentPeer->data))->haveGrowId == false) continue;
- GamePacket ps = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`6>> Private msg from `0" + ((PlayerInfo*)(peer->data))->rawName + "`6 (`$in " + worldname + "`6) : " + message + "`6."));
- GamePacket ps2 = packetEnd(appendString(appendString(createPacket(), "OnConsoleMessage"), "`6>> (Sent to `$" + username + "`6)"));
- ENetPacket * packet23 = enet_packet_create(ps2.data,
- ps2.len,
- ENET_PACKET_FLAG_RELIABLE);
- enet_peer_send(peer, 0, packet23);
- ENetPacket * packetdd = enet_packet_create(ps.data,
- ps.len,
- ENET_PACKET_FLAG_RELIABLE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement