1. Hi,

    I would know if it's possible to add a color to player name. Cause unity text component have a color option. So if someone can tell me if it's possible to get this text and add color to it, it's will be cool !

    Thanks
     
  2. If you just want it in chat, look at BetterChat.
     
  3. I want to display this color on the name over the character. He is actually white by default.
     
  4. Over the character.. Oh.. You should write a request for OXIDE development. At this moment I think that this is impossible.
     
  5. Thanks for your quick reply :)
     
  6. You'll want to look at GameManager.ChangeNameServer(), and inject color tags there.
     
  7. But how i can inject some code here, how can i edit Assambly-CSharp.dll?
     
  8. Wulf

    Wulf Community Admin

    You'd need to use a plugin to run that, there's no need to edit the DLL manually.
     
  9. Can you describe how can i color player nickname overhead with this function:
    public void ChangeNameServer(string playerName, NetworkMessageInfo info)
     
  10. Wulf

    Wulf Community Admin

    You can use something like this:
    Code:
    GameManager.Instance.ChangeNameServer("<color=red>Your Name</color>", info);
    But the issue with that is that "info" is generally not exposed, so you'd need to find a way to convert session.Player to that.
     
  11. Also.. This function will color for example my nickname overhead in red?
     
  12. Wulf

    Wulf Community Admin

    I've never tested it for overhead names, but I assume it would.
     
  13. Thanks and please visit my theme about converting.
     
  14. use RPC "UpdateName" after using session.WorldPlayerEntity.GetComponent<HurtMonoBehavior>();
     
  15. Can you describe more clearer?
     
  16. Once you have their PlayerSession you can use:
    Code:
    session.WorldPlayerEntity.GetComponent<HurtMonoBehavior>().RPC("UpdateName", uLink.RPCMode.OthersExceptOwnerBuffered, "<color=red>"+session.Name+"</color>");
     
  17. I'm going to change the arg type of ChangeNameServer to NetworkPlayer instead of NetworkMessageInfo, which should make this much easier.
     
  18. Adding on to this is there any way to get Infamous/Outlaw symbol above player head if a player is infamous/outlaw?

    Thanks,
     
  19. The name of the player changes colour (red) linear to the amount of infamy they have.
     
  20. In which case it might be possible to find the hex values of the different states of infamy (if it has defaultincremented steps) and do something like
    str = str.replace('<color=#FF0000>,☠<br>''); ? using different unicode pictographs for the various states of infamy.