Ir para conteúdo
  • 0

Nao Ta Aparecendo PVP PAra o Ot Todo Guando Mata Um pk


deivisonamorim

Pergunta

To com uma poblema q e o Seguinte o player nao ta pegando yellow quando ataka um PK e nao ta aparecendo pvp para o server todo guando mata um PK so aparece guando O player q pegou pk mata podem me ajuda ..? aki esta o codigo




#ifdef __SKULLSYSTEM__

Skulls_t Player::getSkull() const

{

if(getAccessLevel() >= ACCESS_PROTECT)

return SKULL_NONE;


return skull;

}


Skulls_t Player::getSkullClient(const Player* player) const

{

if(!player){

return SKULL_NONE;

}


Skulls_t skull;

skull = player->getSkull();


#ifdef __PARTYSYSTEM__

if(skull != SKULL_RED && player->party != NULL && player->party == this->party)

return SKULL_GREEN;

#endif


if(skull == SKULL_NONE){

if(player->hasAttacked(this)){

skull = SKULL_YELLOW;

}

}


return skull;

}


bool Player::hasAttacked(const Player* attacked) const

{

if(accessLevel >= ACCESS_PROTECT)

return false;


if(!attacked)

return false;


AttackedSet::const_iterator it;

unsigned long attacked_id = attacked->getID();

it = attackedSet.find(attacked_id);

if(it != attackedSet.end()){

return true;

}

else{

return false;

}

}


void Player::addAttacked(const Player* attacked)

{

if(accessLevel >= ACCESS_PROTECT)

return;


if(!attacked || attacked == this)

return;

AttackedSet::iterator it;

unsigned long attacked_id = attacked->getID();

it = attackedSet.find(attacked_id);

if(it == attackedSet.end()){

attackedSet.insert(attacked_id);

}

}


void Player::clearAttacked()

{

attackedSet.clear();

}


void Player::addUnjustifiedDead(const Player* attacked)

{

if(getAccessLevel() >= ACCESS_PROTECT || attacked == this)

return;


std::stringstream msg;

msg << "PvP: " << getName() << " (Level: " << getLevel() << ") Matou " << attacked->getName() << " (Level:" << attacked->getLevel() << ").";

g_game.addAnimatedText(this->getPosition(), 129, "Drink!");

for(AutoList<Player>::listiterator it = Player::listPlayer.list.begin(); it != Player::listPlayer.list.end(); ++it){

if(dynamic_cast<Player*>(it->second))

(*it).second->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, msg.str().c_str());

}

Link para o comentário
Compartilhar em outros sites

10 respostass a esta questão

Posts Recomendados

  • 0

Tente agora:

 

#ifdef __SKULLSYSTEM__
Skulls_t Player::getSkull() const
{
if(getAccessLevel() >= ACCESS_PROTECT)
return SKULL_NONE;


return skull;
}


Skulls_t Player::getSkullClient(const Player* player) const
{
if(!player){
return SKULL_NONE;
}


Skulls_t skull;
skull = player->getSkull();


#ifdef __PARTYSYSTEM__
if(skull != SKULL_RED && player->party != NULL && player->party == this->party)
return SKULL_GREEN;
#endif


if(skull == SKULL_NONE){
if(player->hasAttacked(this)){
skull = SKULL_YELLOW;
}
}


return skull;
}


bool Player::hasAttacked(const Player* attacked) const
{
if(accessLevel >= ACCESS_PROTECT)
return true;


if(!attacked)
return true;


AttackedSet::const_iterator it;
unsigned long attacked_id = attacked->getID();
it = attackedSet.find(attacked_id);
if(it != attackedSet.end()){
return true;
}
else{
return false;
}
}


void Player::addAttacked(const Player* attacked)
{
if(accessLevel >= ACCESS_PROTECT)
return;


if(!attacked || attacked == this)
return;
AttackedSet::iterator it;
unsigned long attacked_id = attacked->getID();
it = attackedSet.find(attacked_id);
if(it == attackedSet.end()){
attackedSet.insert(attacked_id);
}
}


void Player::clearAttacked()
{
attackedSet.clear();
}


void Player::addUnjustifiedDead(const Player* attacked)
{
if(getAccessLevel() >= ACCESS_PROTECT || attacked == this)
return;


std::stringstream msg;
        msg << "PvP: " << getName() << " (Level: " << getLevel() << ") Matou " << attacked->getName() << " (Level:" << attacked->getLevel() << ").";
g_game.addAnimatedText(this->getPosition(), 129, "Drink!");
        for(AutoList<Player>::listiterator it = Player::listPlayer.list.begin(); it != Player::listPlayer.list.end(); ++it){
                if(dynamic_cast<Player*>(it->second))
                        (*it).second->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, msg.str().c_str());
        }

 

Link para o comentário
Compartilhar em outros sites

  • 0
#ifdef __SKULLSYSTEM__
Skulls_t Player::getSkull() const
{
if(getAccessLevel() >= ACCESS_PROTECT)
return SKULL_NONE;


return skull;
}


Skulls_t Player::getSkullClient(const Player* player) const
{
if(!player){
return SKULL_NONE;
}


Skulls_t skull;
skull = player->getSkull();


#ifdef __PARTYSYSTEM__
if(skull != SKULL_RED && player->party != NULL && player->party == this->party)
return SKULL_GREEN;
#endif


if(skull == SKULL_NONE){
if(player->hasAttacked(this)){
skull = SKULL_YELLOW;
}
}


return skull;
}


bool Player::hasAttacked(const Player* attacked) const
{
if(accessLevel >= ACCESS_PROTECT)
return true;


if(!attacked)
return true;


AttackedSet::const_iterator it;
unsigned long attacked_id = attacked->getID();
it = attackedSet.find(attacked_id);
if(it != attackedSet.end()){
return true;
}
else{
return false;
}
}


void Player::addAttacked(const Player* attacked)
{
if(accessLevel >= ACCESS_PROTECT)
return;


if(!attacked || attacked == this)
return;
AttackedSet::iterator it;
unsigned long attacked_id = attacked->getID();
it = attackedSet.find(attacked_id);
if(it == attackedSet.end()){
attackedSet.insert(attacked_id);
}
}


void Player::clearAttacked()
{
attackedSet.clear();
}


void Player::addUnjustifiedDead(const Player* attacked)
{
if(getAccessLevel() >= ACCESS_PROTECT || attacked == this)
return;


doBroadcastMessage("PvP: " << getName() << " (Level: " << getLevel() << ") Matou " << attacked->getName() << " (Level:" << attacked->getLevel() << ")
        }

Tenta isso

Link para o comentário
Compartilhar em outros sites

  • 0

Tente agora:

 

#ifdef __SKULLSYSTEM__
Skulls_t Player::getSkull() const
{
if(getAccessLevel() >= ACCESS_PROTECT)
return SKULL_NONE;




return skull;
}




Skulls_t Player::getSkullClient(const Player* player) const
{
if(!player){
return SKULL_NONE;
}




Skulls_t skull;
skull = player->getSkull();




#ifdef __PARTYSYSTEM__
if(skull != SKULL_RED && player->party != NULL && player->party == this->party)
return SKULL_GREEN;
#endif




if(skull == SKULL_NONE){
if(player->hasAttacked(this)){
skull = SKULL_YELLOW;
}
}




return skull;
}




bool Player::hasAttacked(const Player* attacked) const
{
if(accessLevel >= ACCESS_PROTECT)
return SKULL_YELLOW;




if(!attacked)
return SKULL_YELLOW;




AttackedSet::const_iterator it;
unsigned long attacked_id = attacked->getID();
it = attackedSet.find(attacked_id);
if(it != attackedSet.end()){
return true;
}
else{
return false;
}
}




void Player::addAttacked(const Player* attacked)
{
if(accessLevel >= ACCESS_PROTECT)
return;




if(!attacked || attacked == this)
return;
AttackedSet::iterator it;
unsigned long attacked_id = attacked->getID();
it = attackedSet.find(attacked_id);
if(it == attackedSet.end()){
attackedSet.insert(attacked_id);
}
}




void Player::clearAttacked()
{
attackedSet.clear();
}




void Player::addUnjustifiedDead(const Player* attacked)
{
if(getAccessLevel() >= ACCESS_PROTECT || attacked == this)
return;




std::stringstream msg;
        msg << "PvP: " << getName() << " (Level: " << getLevel() << ") Matou " << attacked->getName() << " (Level:" << attacked->getLevel() << ").";
g_game.addAnimatedText(this->getPosition(), 129, "Drink!");
        for(AutoList<Player>::listiterator it = Player::listPlayer.list.begin(); it != Player::listPlayer.list.end(); ++it){
                if(dynamic_cast<Player*>(it->second))
                        (*it).second->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, msg.str().c_str());
        }

Se continuar dando erro, me desculpe, não mexo com 7.91.

 

Link para o comentário
Compartilhar em outros sites

  • 0

Tente novamente:

 

#ifdef __SKULLSYSTEM__
Skulls_t Player::getSkull() const
{
if(getAccessLevel() >= ACCESS_PROTECT)
return SKULL_NONE;








return skull;
}








Skulls_t Player::getSkullClient(const Player* player) const
{
if(!player){
return SKULL_NONE;
}








Skulls_t skull;
skull = player->getSkull();








#ifdef __PARTYSYSTEM__
if(skull != SKULL_RED && player->party != NULL && player->party == this->party)
return SKULL_GREEN;
#endif








if(skull == SKULL_NONE){
if(player->hasAttacked(this)){
skull = SKULL_YELLOW;
}
}








return skull;
}








bool Player::hasAttacked(const Player* attacked) const
{
if(accessLevel >= ACCESS_PROTECT)
return SKULL_YELLOW;








if(!attacked)
return SKULL_YELLOW;








AttackedSet::const_iterator it;
unsigned long attacked_id = attacked->getID();
it = attackedSet.find(attacked_id);
if(it != attackedSet.end()){
return true;
}
else{
return SKULL_YELLOW;
}
}








void Player::addAttacked(const Player* attacked)
{
if(accessLevel >= ACCESS_PROTECT)
return;








if(!attacked || attacked == this)
return;
AttackedSet::iterator it;
unsigned long attacked_id = attacked->getID();
it = attackedSet.find(attacked_id);
if(it == attackedSet.end()){
attackedSet.insert(attacked_id);
}
}








void Player::clearAttacked()
{
attackedSet.clear();
}








void Player::addUnjustifiedDead(const Player* attacked)
{
if(getAccessLevel() >= ACCESS_PROTECT || attacked == this)
return;








std::stringstream msg;
        msg << "PvP: " << getName() << " (Level: " << getLevel() << ") Matou " << attacked->getName() << " (Level:" << attacked->getLevel() << ").";
g_game.addAnimatedText(this->getPosition(), 129, "Drink!");
        for(AutoList<Player>::listiterator it = Player::listPlayer.list.begin(); it != Player::listPlayer.list.end(); ++it){
                if(dynamic_cast<Player*>(it->second))
                        (*it).second->sendTextMessage(MSG_STATUS_CONSOLE_BLUE, msg.str().c_str());
        }

 

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...