Jump to content

Give Colour to ...


Overkillz

Recommended Posts

Go to "race/textlib.lua" and search for dxDrawText, then you must enable the colorCoded argument of the function.

Will be how this ?

dxDrawText(self.strText, l + offsetX, t + offsetY, r + offsetX, b + offsetY, tocolor(att2, att3, att4, att5), self.fScale, self.strFont, self.bHorizontalAlign, self.bVerticalAlign, self.bClip, self.bWordWrap, self.bPostGUI ) 
                                end 
                            end 
                        end 
                    end 
                elseif type == "shadow" then 
                    local shadowDist = att1 
                    att2 = att2 or 0 
                    att3 = att3 or 0 
                    att4 = att4 or 0 
                    att5 = att5 or self.tColor[4] 
                    dxDrawText(self.strText, l + shadowDist, t + shadowDist, r + shadowDist, b + shadowDist, tocolor(att2, att3, att4, att5), self.fScale, self.strFont, self.bHorizontalAlign, self.bVerticalAlign, self.bClip, self.bWordWrap, self.bPostGUI ) 
                end 
                dxDrawText ( self.strText, l, t, r, b, tocolor(unpack(self.tColor)), self.fScale, self.strFont, self.bHorizontalAlign, self.bVerticalAlign, self.bClip, self.bWordWrap, self.bPostGUI ) 

IDK how :(

I could get only this:

- gsub( '#%x%x%x%x%x%x', '')

or this

- ,255,255,255,true)

Regards.

Link to comment
dxDrawText(self.strText, l + offsetX, t + offsetY, r + offsetX, b + offsetY, tocolor(att2, att3, att4, att5), self.fScale, self.strFont, self.bHorizontalAlign, self.bVerticalAlign, self.bClip, self.bWordWrap, self.bPostGUI, true ) 
                                end 
                            end 
                        end 
                    end 
                elseif type == "shadow" then 
                    local shadowDist = att1 
                    att2 = att2 or 0 
                    att3 = att3 or 0 
                    att4 = att4 or 0 
                    att5 = att5 or self.tColor[4] 
                    dxDrawText(self.strText, l + shadowDist, t + shadowDist, r + shadowDist, b + shadowDist, tocolor(att2, att3, att4, att5), self.fScale, self.strFont, self.bHorizontalAlign, self.bVerticalAlign, self.bClip, self.bWordWrap, self.bPostGUI, true ) 
                end 
                dxDrawText ( self.strText, l, t, r, b, tocolor(unpack(self.tColor)), self.fScale, self.strFont, self.bHorizontalAlign, self.bVerticalAlign, self.bClip, self.bWordWrap, self.bPostGUI, true ) 

Try it.

Link to comment

Thanks for all, all working correctly, but now i want to see the tag colour from others user, i can´t see.

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

Need to bee this ?

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

?

Regards.

Link to comment

Doesnt work

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

mmm IDK why it doesnt work.

Link to comment

Race game mode removes the HEX color codes, instead of using getPlayerName, use _getPlayerName.

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

Link to comment

Working perfectly, but i prefer the color for default be

tocolor(255,255,255) 

What i need to do for change the font ?

textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", true, true, true, true) 
textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", true, true, true, false) 

Is here ?

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