Author Topic: Player NameTag Colour  (Read 2135 times)

JamesConway

  • Newbie
  • *
  • Posts: 39
  • Karma: +9/-3
    • View Profile
Player NameTag Colour
« on: November 28, 2015, 01:23:57 pm »
Hello dear scripters,

I have tried to change the color of the name of a player (also seeable in TAB player list). But so far no luck.

Could anyone give me an example of how you could change the color of a players name by script?

I did see Player.NametagColour, but I have no idea how to use it.

[RU]Kewun

  • Full Member
  • ***
  • Posts: 126
  • Karma: +11/-21
  • C.R.C Marshal
    • View Profile
Re: Player NameTag Colour
« Reply #1 on: November 28, 2015, 01:24:55 pm »
try
player.NameTagColour( r, g, b );
example
Player.NameTagColour( 255, 125, 0 );
Fear the wrath of god!


JamesConway

  • Newbie
  • *
  • Posts: 39
  • Karma: +9/-3
    • View Profile
Re: Player NameTag Colour
« Reply #2 on: November 28, 2015, 01:48:47 pm »
When I try this:

player.NametagColour(255, 0, 255);

It gives me an error: "attempt to call instance". Any idea how this might have occurred?

[RU]Kewun

  • Full Member
  • ***
  • Posts: 126
  • Karma: +11/-21
  • C.R.C Marshal
    • View Profile
Re: Player NameTag Colour
« Reply #3 on: November 28, 2015, 05:21:37 pm »
Player.NametagColour = Colour(r, g, b);
Fear the wrath of god!


JamesConway

  • Newbie
  • *
  • Posts: 39
  • Karma: +9/-3
    • View Profile
Re: Player NameTag Colour
« Reply #4 on: November 28, 2015, 06:21:56 pm »
Player.NametagColour = Colour(r, g, b);

Does this also work for the color in the playerlist? (TAB)

[RU]Kewun

  • Full Member
  • ***
  • Posts: 126
  • Karma: +11/-21
  • C.R.C Marshal
    • View Profile
Re: Player NameTag Colour
« Reply #5 on: November 28, 2015, 06:22:45 pm »
yea it should work
Fear the wrath of god!


Theremin

  • Full Member
  • ***
  • Posts: 154
  • Karma: +48/-18
  • Worst Server Owner
    • View Profile
    • Visit my YouTube channel
Re: Player NameTag Colour
« Reply #6 on: November 28, 2015, 10:05:19 pm »
I've stress tested this function in the past and obtained nothing therefore I'm quite sure it's broken.

JamesConway

  • Newbie
  • *
  • Posts: 39
  • Karma: +9/-3
    • View Profile
Re: Player NameTag Colour
« Reply #7 on: December 06, 2015, 01:08:48 pm »
Is there anyway to change the colour of a player's name by script?

SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: Player NameTag Colour
« Reply #8 on: December 06, 2015, 07:51:47 pm »
Is there anyway to change the colour of a player's name by script?
It should be possible. We did it in the past.

Motley

  • Full Member
  • ***
  • Posts: 252
  • Karma: +32/-34
    • View Profile
Re: Player NameTag Colour
« Reply #9 on: December 07, 2015, 02:54:56 am »
How are you calling for the colors?
how does r, g, b get generated?

There Should be a variable that calls for these colors? right?
I wouldn't think that this command is implemented on programming.

i would suggest to do something like

And set something like

Code: [Select]
//Nametag_Colour
R <- Colour(255, 0, 0);
B <- Colour(0, 0, 223);
G <- Colour(0, 253, 0);
//Nametag_Colour

    //Nametag_Colour
    else {
      Colour(r, g, b) = random(3);
    }
    //Nametag_Colour

Player.NametagColour = (Nametag_Colour[R], Nametag_Colour[B], Nametag_Colour[G]);
    Player.NametagColour = Colour(r, g, b);
  } 

This is not a script this is just a way to possible do this/ and questioning this way? and hoping this may help..

But really where would //////Colour(r, g, b);\\\\\\ these colours be generated from? maybe this is part of the Error??

??  :o  ??
« Last Edit: December 07, 2015, 03:05:10 am by Motley »

Motley

  • Full Member
  • ***
  • Posts: 252
  • Karma: +32/-34
    • View Profile
Re: Player NameTag Colour
« Reply #10 on: December 10, 2015, 12:03:38 am »
In the gta 3 user files of LU The scoreboard looks like this =
Code: [Select]
<scoreboardbackcol r="999" g="999" b="9" /> when edited maybe this is how its supposed to be written you should try




Code: [Select]
Player.NametagColour = Colour(r="0", g="0", b="223");
or

Code: [Select]
Player.NametagColour = Colour(r=0, g=0, b=223);
or

Code: [Select]
Player.NametagColour = Colour r="0", g="0", b="223"
honestly i would try more in thes sequence like

Code: [Select]
Player.NametagColour = r="0", g="0", b="223"
Code: [Select]
Player.NametagColour = (r="0", g="0", b="223")
Code: [Select]
Player.NametagColour = r=0, g=0, b=223
honestly if this was done in early years on Liberty Unleashed for beta testers maybe the format is in this style
If all fails maybe Force,,VRocker,,SugarD anyone that was fimiliar with the script they could release it .

Im incapable of working on this at this time in my scripts
Its blocked on the wiki.

Thanks to [RU]Kewun for reminding me today durring gameplay of the
Code: [Select]
scoreboardbackcol r="999" g="999" b="9" />
« Last Edit: December 10, 2015, 02:22:42 am by Motley »

 

© Liberty Unleashed Team.