Jump to content
  • 0

Block attack on map

Go to solution Solved by Mali61,


I did this but after i teleported another map I still can't attack


//1.) Search:
void CPythonPlayerEventHandler::OnHit(UINT uSkill, CActorInstance& rkActorVictim, BOOL isSendPacket)
//2.) Add bellow:
	static std::string uCurrentMap = CPythonBackground::Instance().GetWarpMapName();
	static std::string uArrayListOfMaps[] = {
		"metin2_map_b1",	/* loaded from atlasinfo.txt */
	for (int i=0;i<_countof(uArrayListOfMaps);i++)
		if (rkActorVictim.IsPC() && (!uCurrentMap.compare(uArrayListOfMaps[i])))
			TraceError("CPythonPlayerEventHandler::OnHit on map %s was blocked because players is protected.", uArrayListOfMaps[i].c_str());

//3.) And add on first line or where you want:
#include "PythonBackground.h"


What is the problem?

Edited by nyugione
Link to post

2 answers to this question

Recommended Posts

  • 0
  • Honorable Member
  • Solution
Posted (edited)

remove static keyword for uCurrentMap

Edited by Mali61
wrong alarm
  • Love 1


Link to post
This topic is now closed to further replies.

  • 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.