Liberty Unleashed

Scripting => Script Help => Topic started by: JamesConway on November 28, 2015, 01:23:57 pm

Title: Player NameTag Colour
Post by: JamesConway 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.
Title: Re: Player NameTag Colour
Post by: [RU]Kewun on November 28, 2015, 01:24:55 pm
try
player.NameTagColour( r, g, b );
example
Player.NameTagColour( 255, 125, 0 );
Title: Re: Player NameTag Colour
Post by: JamesConway 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?
Title: Re: Player NameTag Colour
Post by: [RU]Kewun on November 28, 2015, 05:21:37 pm
Player.NametagColour = Colour(r, g, b);
Title: Re: Player NameTag Colour
Post by: JamesConway 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)
Title: Re: Player NameTag Colour
Post by: [RU]Kewun on November 28, 2015, 06:22:45 pm
yea it should work
Title: Re: Player NameTag Colour
Post by: Theremin 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.
Title: Re: Player NameTag Colour
Post by: JamesConway on December 06, 2015, 01:08:48 pm
Is there anyway to change the colour of a player's name by script?
Title: Re: Player NameTag Colour
Post by: SugarD 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.
Title: Re: Player NameTag Colour
Post by: Motley 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  ??
Title: Re: Player NameTag Colour
Post by: Motley 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" />