Spyke25 Posted September 22, 2011 Share Posted September 22, 2011 Well, i would to make this changes at my race server : 1. How i can put the [ #00000 Example ] colors like the chat, up the cars too? [ Because the default is white nickname for every players ] Like that = 2. How i can move this time sensor from here to here like that ? 3. How i can remove the race position? Thanks in advance Link to comment
Aibo Posted September 22, 2011 Share Posted September 22, 2011 1a. iirc, MTA allows color-codes names in names by default (at least it did) 1b. for nametags you'll have to edit race/nametags.lua, and make dx text with color codes support. 2. you'll need to edit race resource also (race_client.lua to be precise) 3. same as 2, edit race_client.lua Link to comment
Spyke25 Posted September 22, 2011 Author Share Posted September 22, 2011 Thanks, but race_client.lua contains so much codes, you can help me to find what i need to edit ? Link to comment
Aibo Posted September 22, 2011 Share Posted September 22, 2011 for time position: -- line 25: timepassed = dxText:create('0:00:00', screenWidth - 10, screenHeight - 25, false, 'bankgothic', 0.7, 'right'), -- change screenWidth - 10, screenHeight - 25 to your desired location for ranking: -- line 22-23: ranknum = dxText:create('1', screenWidth - 60, screenHeight - 95, false, 'bankgothic', 2, 'right'), ranksuffix = dxText:create('st', screenWidth - 40, screenHeight - 86, false, 'bankgothic', 1), -- i doubt you can simply remove these lines (that probably will generate 'nil' errors) -- you'll need to search through race resource to see where else these dxTexts are referenced. -- though you can always move them offscreen by changing coordinates. Link to comment
Spyke25 Posted September 22, 2011 Author Share Posted September 22, 2011 Ok then, thanks so much. Last quest : For nametag i need to change from false to true in that line ? dxDrawText ( getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false ) Link to comment
Aibo Posted September 22, 2011 Share Posted September 22, 2011 no. dxDrawText does not support color-coded text. you'll have to write your own function for that (or search the forums). and i believe race resource redefines getPlayerName function to strip color codes, you'll have to fix that also. Link to comment
Spyke25 Posted September 23, 2011 Author Share Posted September 23, 2011 Well, thanks. I have fixed the "time bar" position and i decide to leave the rank at default position at the moment. But you can post me the code i need to put in my file for enable the color function ? Since i don't know where i can find it. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now