[Admin] tierrilopes Posted December 15, 2015 at 09:27 PM Share Posted December 15, 2015 at 09:27 PM Para impedir GM de criar lojas Ir até ao ficheiro char_item.cpp: Procurar por: case 50200: Adicionar debaixo: if (IsGM()) { ChatPacket(CHAT_TYPE_INFO, "Proibido criar loja como GM."); return false; } Deverá ficar assim: Procurar por: case 71049: Adicionar debaixo: if (IsGM()) { ChatPacket(CHAT_TYPE_INFO, "Proibido criar loja como GM."); return false; } Deverá ficar assim: Link to comment Share on other sites More sharing options...
Guest KemazI Posted March 19, 2016 at 01:46 PM Share Posted March 19, 2016 at 01:46 PM As imagens estão trocadas mas bom tutorial Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted June 3, 2016 at 04:57 PM Author Share Posted June 3, 2016 at 04:57 PM 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 Link to comment Share on other sites More sharing options...
Guest Gamers Posted June 3, 2016 at 05:06 PM Share Posted June 3, 2016 at 05:06 PM Tierrilopes, e esse comando onde devo colocar? Não entendo muito de C++ poderia me explicar? Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted June 3, 2016 at 05:08 PM Author Share Posted June 3, 2016 at 05:08 PM Substitui no tutorial acima, onde diz if (IsGm()) no tutorial substituir pelo que meti Link to comment Share on other sites More sharing options...
Guest Gamers Posted June 3, 2016 at 05:11 PM Share Posted June 3, 2016 at 05:11 PM Ah obrigado! Link to comment Share on other sites More sharing options...
Guest Gamers Posted June 3, 2016 at 05:22 PM Share Posted June 3, 2016 at 05:22 PM 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; } Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted June 3, 2016 at 05:40 PM Author Share Posted June 3, 2016 at 05:40 PM 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 Link to comment Share on other sites More sharing options...
Guest Gamers Posted June 3, 2016 at 06:23 PM Share Posted June 3, 2016 at 06:23 PM Agora foi parece... Link to comment Share on other sites More sharing options...
CoMaSkyWar Posted January 19, 2017 at 10:00 AM Share Posted January 19, 2017 at 10:00 AM Boas pessoal como faço como alternativa para desbloquear o anti shop aos GM, excepto um ou três personagens: 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 ja testei esta forma e o game compila bem so que os nome escolhido fica bloqueado a abrir um shop na mesma, obg Link to comment Share on other sites More sharing options...
Dynamic Things Posted January 19, 2017 at 01:55 PM Share Posted January 19, 2017 at 01:55 PM Boas pessoal como faço como alternativa para desbloquear o anti shop aos GM, excepto um ou três personagens: ja testei esta forma e o game compila bem so que os nome escolhido fica bloqueado a abrir um shop na mesma, obg 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; } case 50200: if (IsGM() && (GetName() != (std::string)"Nomedochar1") && (GetName() != (std::string)"Nomedochar2")) { ChatPacket(CHAT_TYPE_INFO, "Proibido criar loja como GM."); return false; } e funciona. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now