Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/01/16 in all areas

  1. M2 Download Center Download Here ( Internal ) Hello Metin2Dev , I make this Mount and i decided to post this Download
    2 points
  2. Yes. You can use vps for play with your friend
    1 point
  3. Hello,i'm looking for high quality mapper. I'm paying via paypal or PSC. Contact me,skype: guy_army2012
    1 point
  4. The thread and the idea is great, but NEVER do something like this on client-side. Here is the server-side solution: Add mapindex.cpp and mapindex.h to your project Copy this to mapindex.cpp: #include "fstream" #include "stdafx.h" std::vector<std::string> ExcludeIndex; void LoadIndexes() { std::string tempIndex; std::ifstream File("locale/mapindex.txt"); if (!File.is_open()) { sys_log(0, "WARNING: locale/mapindex.txt"); return; } ExcludeIndex.clear(); while (!File.eof()) { File >> tempIndex; ExcludeIndex.push_back(tempIndex); } File.close(); } Copy this to mapindex.h: extern std::vector<std::string> ExcludeIndex; extern void LoadIndexes(); Add this to main.cpp: #include "mapindex.h" Add this under PanamaLoad(); still in main.cpp: LoadIndexes(); Add this to char.cpp: #include "mapindex.h" And these events: std::string CHARACTER::LongToString(long data) { std::ostringstream convert; convert << data; return convert.str(); } bool CHARACTER::AllowMapIndex() { for (int i = 0; i < ExcludeIndex.size(); i++) { if (!strcmp(LongToString(GetMapIndex()).c_str(), ExcludeIndex[i].c_str())) { return false; } } return true; } Open cmd_general.cpp and navigate to ACMD(do_pvp) Add this to the begin of the event: if (!ch->AllowMapIndex()) { ch->ChatPacket(CHAT_TYPE_INFO, ("PVP has been blocked on this map!")); return; } Example mapindex.txt: 1 2 3 4 5 6 7
    1 point
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.