Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char msg[300];
- sprintf_s(msg, 300, "%s : %s", player->getName(), chat);
- for (hash_map <int, Player*>::iterator iter = Players::players.begin(); iter != Players::players.end(); iter++) {
- if (iter->second->getMap() != player->getMap()) {
- PlayerPacket::showMessage(iter->second, msg, 5);
- }
- }
- PlayersPacket::showChat(player, Maps::maps[player->getMap()]->getPlayers(), message);
- printf("%s\n",msg);
- replace this line of code at the end of the Players::chatHandler() function in Players.cpp:
- Code:
- }
- PlayersPacket::showChat(player, Maps::maps[player->getMap()]->getPlayers(), message);
- }
Add Comment
Please, Sign In to add comment