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

thanks for the quick reply. Can you please explain a bit further what should be done with charinfo? i really have no idea how i can do this

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

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock