Jump to content

Recommended Posts

Hello Dev's!

Yesterday, I saw on my server that there were a lot of mount on map1, which was quite distracting. So, I blocked them in the source code using map indexes.
 

If you're using MountSystem.cpp, insert it above m_pkChar->SetMount();

	#include <unordered_set>

	if (m_pkOwner) 
	{
		static const std::unordered_set<int> restrictedMaps = {1, 21, 41, 61, 63}; // here you can add more mapindex or what u want
		
		if (restrictedMaps.count(m_pkOwner->GetMapIndex()))
		{
			m_pkOwner->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Ezen a pályán nem tudsz használni hátast.")); // and here a little message for player's
			LPITEM item = m_pkOwner->GetWear(WEAR_COSTUME_MOUNT);
			if (item != nullptr)
				m_pkOwner->UnequipItem(item);
			return 0;
		}
	}

 

Edited by HUNgarocel1

spacer.png

Link to comment
https://metin2.dev/topic/33466-cblock-mount-on-map-index/
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.