• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.
Resource icon

Player messages logger and permanent mute system via storage

highsanta

Banned User
Joined
Dec 20, 2023
Messages
638
Solutions
6
Reaction score
255
highsanta submitted a new resource:

Player messages logger and permanent mute system via storage - logger

protocolgame.cpp

C++:
#include <fstream>
#include <ctime>


C++:
void ProtocolGame::sendCreatureSay(const Creature* creature, SpeakClasses type, const std::string& text, const Position* pos/* = nullptr*/)
{
    // Check if the receiving player has storage 187 set to 1
    if (player) {
        int32_t mutedValue = 0;
        if (player->getStorageValue(187, mutedValue) && mutedValue == 1) {
            return; // Player is muted, don't send any messages
        }
    }...

Read more about this resource...
 
Back
Top