FuveZeq 0 Posted December 26, 2022 Share Posted December 26, 2022 (edited) Hello, i tried to restrict the GM permissions.. that the implementor can do anything but lower gm not I tried out this "system" https://metin2.dev/topic/24089-gamemaster-restriction-without-sql/#comment-129214 with the IsLowGM function, but didn't work What can i do now? sorry for my bad englis if it is. Edited December 26, 2022 by FuveZeq Link to comment Share on other sites More sharing options...
Contributor TMP4 11067 Posted December 26, 2022 Contributor Share Posted December 26, 2022 Quote return m_pointsInstant.gm_level > GM_PLAYER && m_pointsInstant.gm_level > GM_HIGH_WIZARD && m_pointsInstant.gm_level < GM_IMPLEMENTOR; That means higher then a player and HIGH_WIZARD but lower then GM_IMPLEMENTOR. Modify it to your needs. If you want to restrict every GM except Impelentor, do this: BOOL CHARACTER::IsLowGM() const { return m_pointsInstant.gm_level > GM_PLAYER && m_pointsInstant.gm_level < GM_IMPLEMENTOR; } Link to comment Share on other sites More sharing options...
FuveZeq 0 Posted December 26, 2022 Author Share Posted December 26, 2022 Ha már úgyis magyar vagy.. az volt a baja nem tudom miért most nézem hogy mikor a funkciót hozzáadtam az IsGM alá kapta a blokkot, és valamiért nem tetszett neki szóval úgy let megoldva hogy char.cpp char.h IsLowGM felül IsGM alul Már csak annyi a problémám hogy ha meg is adom neki így az értékeket: return m_pointsInstant.gm_level > GM_PLAYER && m_pointsInstant.gm_level > GM_LOW_WIZARD && m_pointsInstant.gm_level < GM_IMPLEMENTOR; Akkor IMPLEMENTOR alatt tudnak kereskedni egymással, de implementor nem tud velük csak playerekkel, erre tudnál valamit mondani? sorry for litle hungary Link to comment Share on other sites More sharing options...
Contributor TMP4 11067 Posted December 26, 2022 Contributor Share Posted December 26, 2022 (edited) 15 hours ago, FuveZeq said: Ha már úgyis magyar vagy.. az volt a baja nem tudom miért most nézem hogy mikor a funkciót hozzáadtam az IsGM alá kapta a blokkot, és valamiért nem tetszett neki szóval úgy let megoldva hogy char.cpp char.h IsLowGM felül IsGM alul Már csak annyi a problémám hogy ha meg is adom neki így az értékeket: return m_pointsInstant.gm_level > GM_PLAYER && m_pointsInstant.gm_level > GM_LOW_WIZARD && m_pointsInstant.gm_level < GM_IMPLEMENTOR; Akkor IMPLEMENTOR alatt tudnak kereskedni egymással, de implementor nem tud velük csak playerekkel, erre tudnál valamit mondani? sorry for litle hungary It's against the rules to write in non-english. (His question was why implementors can't trade with LowGMs) Implementors can't trade with LowGMs because of this line: if (!IsLowGM() && victim->IsLowGM()) If you want to enable implementors trading with LowGMs add an exclusion for the checks for implementors like this: //exchange.cpp bool CHARACTER::ExchangeStart(LPCHARACTER victim) { if (GetGMLevel() != GM_IMPLEMENTOR) { if (!IsLowGM() && victim->IsLowGM()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You cannot trade items with a Game Master.")); return false; } if (IsLowGM() && !victim->IsLowGM()) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Game Masters cannot trade items with players.")); return false; } } //... Edited December 27, 2022 by TMP4 Link to comment Share on other sites More sharing options...
FuveZeq 0 Posted December 28, 2022 Author Share Posted December 28, 2022 thx solved Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now