Guest User

Untitled

a guest
Mar 17th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. char msg[300];
  2. sprintf_s(msg, 300, "%s : %s", player->getName(), chat);
  3. for (hash_map <int, Player*>::iterator iter = Players::players.begin(); iter != Players::players.end(); iter++) {
  4. if (iter->second->getMap() != player->getMap()) {
  5. PlayerPacket::showMessage(iter->second, msg, 5);
  6. }
  7. }
  8. PlayersPacket::showChat(player, Maps::maps[player->getMap()]->getPlayers(), message);
  9. printf("%s\n",msg);
  10.  
  11.  
  12. replace this line of code at the end of the Players::chatHandler() function in Players.cpp:
  13. Code:
  14. }
  15. PlayersPacket::showChat(player, Maps::maps[player->getMap()]->getPlayers(), message);
  16. }
Add Comment
Please, Sign In to add comment