Jump to content

No in hostile zone


Recommended Posts

Posted

How can I control the power of all my Gm?

exemple: Level3.cpp

I want that a Gm can't to use .flymode in a hostile area ( yes in contested ) and in combat. How can I modify "bool ChatHandler::HandleFlyModeCommand(const char* args)" ?

I tried to insert this code but it doesn't work....

Player* targetPlayer = getSelectedPlayer();

Player* myself = m_session->GetPlayer();

AreaTableEntry struttura_mioteam; // Crea una struttura

AreaTableEntry *puntatore_mioteam = &struttura_mioteam;

uint32 mioteam = puntatore_mioteam->team;

if( myself->isInCombat()|| myself->pvpInfo.inHostileArea && !(mioteam == AREATEAM_NONE) && !(myself->isGameMaster()) )

{

SendSysMessage("You can't if you are in PvP, in a Hostile zone, or if you are in combat!");

return false;

}

Thx!

Posted

It doesn't work in the contested zone: if I want to use a command in contested zone, The mangos server "blocks" me. It should only block in hostile zone.

Thx

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use