Jump to content

No in hostile zone


Guest NewAge

Recommended Posts

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!

Link to comment
Share on other sites

×
×
  • 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