Jump to content

Nametags


'LinKin

Recommended Posts

Hello,

Where can I modify the nametags? I want it to draw the player's nick according to the colour codes he has.

Example: |SW|Lin#CCCCCCKin (|SW|LinKin) (As SW is an auto-team)

At the moment the nick is drawn only with the team's color. But how can I add the other color codes that a player has?

I tried changing nametags.lua in Race resource, and I added ,true to the dxDrawText line. But it's still the same

Thanks.

Link to comment
  • Moderators
I added ,true to the dxDrawText line. But it's still the same

So you tried this ?

dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false, true ) 

(Give it a try again, don't forget to restart the resource to apply to modifications)

If it's not working, then try this:

r, g, b = 255, 255, 255 
dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false, true ) 

If it's still not working, you are definitly modifying a file that isn't used by the resource you are running (did you extracted race.zip ?)

Edited by Guest
Link to comment

From nametags.lua inside Race resource:

  
--Draw our text 
                    local r,g,b = 255,255,255 
                    local team = getPlayerTeam(player) 
                    if team then 
                        r,g,b = getTeamColor(team) 
                    end 
                    local offset = (scale) * NAMETAG_TEXT_BAR_SPACE/2 
                    dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false, true ) 
  

Still the same.. Wierd

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...