Jump to content
  • 0

[Request] Faction Enemy/ally Name Colors


Question

Posted

Hey guys. I've been working on a faction server for a while and what i'm trying to do is. Make enemies appear in red name and allies in white name but i have absolutely no idea how this could be done. I'd really appreciate it if anyone could help me with that.

Here's a picture of how it looks 

http://img259.imageshack.us/img259/2498/61426658.png

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

writeD(_activeChar.getFunction() != getClient().getActiveChar().getFunction() ? 0xFF0000 : _activeChar.getAppearance().getNameColor());

 

anyways im too kind as you see, thats the job of "mxcL2devs" not mine

Edited by xdem
  • 0
Posted (edited)

 I've already tried to make something. Here's what i did but it didn't work as i expected.

 
L2PcInstance tmp = getClient().getActingChar();
 
if ((tmp != null) && (_activeChar.getFactionId() == tmp.getFactionId()))
{
      writeD(_activeChar.getAppearance().getNameColor());
}
else
{
      writeD(0xFF0000);
}

anyway thanks for the replies guys! i really appreciate your help :) i'll try what xdem posted and i'll give you feedback.

it works! thank you very much xdem :)
Edited by Ratatat

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and 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..