Jump to content

Recommended Posts

yes you can!
 

// TUTORIAL FOR NAME CHANGE ABOVE PC

In InstanceBaseEffect.cpp find:

UINT CInstanceBase::GetNameColorIndex()

below this:

        if (m_isKiller)
        {
            return NAMECOLOR_PK;
        }

add:

std::string stringMapName = CPythonBackground::Instance().GetWarpMapName();

if (stringMapName == "season1/metin2_map_oxevent")

{

return NAMECOLOR_PK;

}

change NAMECOLOR_PK with other NAMECOLOR or make your own.

import this at the top:

#include "PythonBackground.h"

 

// TUTORIAL FOR NAME COLOR IN CHAT:

in input_main.cpp find:

int CInputMain::Chat(LPCHARACTER ch, const char * data, size_t uiBytes)

below find:

len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);

(this line might be different if you have global chat/multi language or other systems, but it's pretty much the same principle)

 

and modify the function like this:

if (ch->GetMapIndex() == 113)

{

len = snprintf(chatbuf, sizeof(chatbuf), "|cFFffa200%s|h|r : %s", ch->GetName(), buf);

}

else

{

len = snprintf(chatbuf, sizeof(chatbuf), "%s : %s", ch->GetName(), buf);

}

 

now, config your line as you want:

  • |cFFffa200

ffa200 --> change with another HEX Color from the internet. (Search for HEX color generator)

  • if (ch->GetMapIndex() == 113)

113 --> change with your map index

 

now you have to do the binary part so that the name above the character is the same.

Edited by HFWhite
  • Love 1
Link to comment
https://metin2.dev/topic/32639-player-name-color/#findComment-165327
Share on other sites

It worked, 

but i want to make some changes to it so that my name and the duel are not included,

the whole idea is that i want to create a special map for dueling so that no player can hit other players

or he sees them as enemies only if there is a duel.

Link to comment
https://metin2.dev/topic/32639-player-name-color/#findComment-165405
Share on other sites

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.