Jump to content
Sign in to follow this  
tierrilopes

Anti Shop Com Gm

Recommended Posts

Para impedir GM de criar lojas

 

Ir até ao ficheiro char_item.cpp:

Procurar por:

Please login or register to see this code.

Adicionar debaixo:

Please login or register to see this code.

Deverá ficar assim:

Please login or register to see this image.

 

 

Procurar por:

 

Please login or register to see this code.

Adicionar debaixo:

Please login or register to see this code.

Deverá ficar assim:

Please login or register to see this link.

  • Upvote 3

Share this post


Link to post
Share on other sites
Guest KemazI

As imagens estão trocadas mas bom tutorial Please login or register to see this image. /uploads/emoticons/xenforo-smilies-sprite.png.4a4a9fa87ba1790fde78e48a590c163b.png">

Share this post


Link to post
Share on other sites

A pedido, para bloquear todos os GMs excepto um em especifico seria:

 

std::string nNome = GetName();

 

if (IsGM() && nNome != "tierrilopes")

Não testei mas deverá funcionar bem, se houver erro avisar aqui.

Onde tierrilopes = nome do gm

  • Upvote 1

Share this post


Link to post
Share on other sites
Guest Gamers

Tierrilopes, e esse comando onde devo colocar? Não entendo muito de C++ poderia me explicar?

Share this post


Link to post
Share on other sites

Substitui no tutorial acima, onde diz if (IsGm()) no tutorial substituir pelo que meti

Share this post


Link to post
Share on other sites
Guest Gamers

Ah obrigado!

Share this post


Link to post
Share on other sites
Guest Gamers

Está dando erro na hora de compilar!

 

case 50200:

 

std::string nNome = GetName();

if (GetGMLevel() > GM_PLAYER && nNome != "tierrilopes")

{

ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Membros da equipe de GMs nao possuem permissao para esta acao."));

return false;

}

 

 

case 71049:

 

std::string nNome = GetName();

if (GetGMLevel() > GM_PLAYER && nNome != "tierrilopes")

{

ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Membros da equipe de GMs nao possuem permissao para esta acao."));

return false;

}

Share this post


Link to post
Share on other sites

Experimenta assim:

 

Elimina

 

std::string nNome = GetName();

 

if (IsGM() && nNome != "tierrilopes")

 

e substitui por:

 

if (IsGM() && (GetName() != (std::string)"tierrilopes"))

Ou como no teu caso não estás a usar IsGm seria assim:

 

if ((GetGMLevel() > GM_PLAYER) && (GetName() != (std::string)"tierrilopes"))

 

Será a mesma coisa para o outro case

  • Upvote 1

Share this post


Link to post
Share on other sites
Guest Gamers

Agora foi parece...

Share this post


Link to post
Share on other sites

Boas pessoal como faço como alternativa para desbloquear o anti shop aos GM, excepto um ou três personagens:

 

Please login or register to see this quote.

ja testei esta forma e o game compila bem so que os nome escolhido fica bloqueado a abrir um shop na mesma, obg

Share this post


Link to post
Share on other sites
Please login or register to see this quote.

 

tenho assim:

 

 

case 71049:

if (IsGM() && (GetName() != (std::string)"Nomedochar1") && (GetName() != (std::string)"Nomedochar2"))

{

ChatPacket(CHAT_TYPE_INFO, "Proibido criar loja como GM.");

return false;

}

 

Please login or register to see this code.

 

e funciona.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.

Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker.
You will be able to see content when you disable your adblocker and enable javascript.