HiHo!
num te mandei o code pq não estou tendo tempo pra nada, estou ocupado ateh o pescoço e não deu tempo de fazer o exhausted... bom, se você quizer o code sem exhausted mais simplificado taí:
bool Commands::pum(Creature* creature, const std::string &cmd, const std::string& param)
{
Creature* c = g_game.getCreatureByName(param);
if(c && c->getPlayer())
{
if(creature->getPlayer() && c->getPlayer()->getAccessLevel() > creature->getPlayer()->getAccessLevel())
{
creature->getPlayer()->sendCancel("You can not use this command in this player.");
return false;
}
g_game.internalCreatureSay(c, SPEAK_MONSTER_SAY, "Fum!");
g_game.combatChangeHealth(COMBAT_UNDEFINEDDAMAGE, NULL, c, -20);
SpectatorVec list;
SpectatorVec::iterator it;
g_game.getSpectators(list, c->getPosition());
Player* tmpPlayer;
for(it = list.begin(); it != list.end(); ++it)
{
tmpPlayer = NULL;
if(tmpPlayer = (*it)->getPlayer())
{
tmpPlayer->sendMagicEffect(c->getPosition(), 20);
if(tmpPlayer->getName() != c->getName())
{
g_game.internalCreatureSay((*it), SPEAK_MONSTER_SAY, "Eca seu porco!");
}
}
}
}
return true;
}
PS .: deixe
e não Se quizer ajuda pra alterar alguma coisa pm me...Flw :]