Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Display text in console rev 0.007

Status
Not open for further replies.
Newbie Spellweaver
Joined
Apr 10, 2008
Messages
50
Reaction score
0
Here is something that i got going after a while. Nothing great and it does make it so people have very little privacy in-game but basically what it does is when someone types text in-game which doesn't contain an exclamation mark at the beginning or isn't in whispers.

Open players.cpp.
Go to the bottom of the below code:

Code:
void Players::chatHandler(Player* player, unsigned char* packet){
Add the below code above the last curly bracket

Code:
printf (player->getName(), chat);
    printf (" says: ");
    printf (chat, chat);
    printf ("\n");
So it looks something like this:

Code:
else{
                Server::disableScrollingHeader();
                printf ("GM_%s has changed the Header.\n", player->getName());
            }
        }
        return;
    }
    PlayersPacket::showChat(player, Maps::info[player->getMap()].Players, chat);
    Players::Log(player->getName(), chat);
    [B]printf (player->getName(), chat);
    printf (" says: ");
    printf (chat, chat);
    printf ("\n");[/B]

}
 
Newbie Spellweaver
Joined
Apr 11, 2008
Messages
12
Reaction score
0
Re: [Release] Display text in console rev 0.007

printf ("%s says: %s\n", player->getName(), chat);
 
Newbie Spellweaver
Joined
Apr 10, 2008
Messages
50
Reaction score
0
Re: [Release] Display text in console rev 0.007

Yeah or that if you want to be simple :p
 
Newbie Spellweaver
Joined
Apr 5, 2008
Messages
22
Reaction score
0
Re: [Release] Display text in console rev 0.007

Works for rev 008 because I've been using it for awhile now. I'd rather it log the words & save them to a log file instead of just print them in the console though...
 
Newbie Spellweaver
Joined
Apr 7, 2008
Messages
66
Reaction score
0
Re: [Release] Display text in console rev 0.007

I'd rather do both xD
 
Status
Not open for further replies.
Back
Top