Jump to content

DjSt3rios

Members
  • Posts

    113
  • Joined

  • Last visited

Everything posted by DjSt3rios

  1. my name always have color code, so i just restart, without changing name.. but still i dont want to make every player change their names everytime lol
  2. Yep no errors, but now it doesnt change my nick, maybe its not working properly Damn, im only working in lua like 5-6 days and im still confused how they are working.. but i think its working anyway.
  3. still.. colors are random with this...
  4. I put it in race_server.lua but still its not working properly plus it changes my name like 100 times, but i removed the code SetPlayerName
  5. in nametags.lua i put this: r,g,b=getPlayerNametagColor(player) and then it has this code: dxDrawText (getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false ) and in the same file, in the end, i added this: function process() players=getElementsByType("player") for _,v in pairs(players) do processPlayer(v) end end function processPlayer(p) local Player=source or p local nick=getPlayerName(Player) local colorcode=nick:match("^#%x%x%x%x%x%x") if colorcode then local red,blue,green=getColorFromString(colorcode) setPlayerNametagColor(Player,red,blue,green) end setPlayerName(Player,nick:gsub("#%x%x%x%x%x%x","")) end addEventHandler("onResouceStart",getResourceRootElement(),process) addEventHandler("onPlayerJoin",getRootElement(),processPlayer) addEventHandler("onPlayerChangeNick",getRootElement(),processPlayer) and with this it appears light green
  6. Hmm, now the color is light green, its not showing it properly any help?
  7. Well i tried something like this but its not working. Btw i want the name color to change, not vehicle. The name which is on the top of the car..
  8. I tried to do it, but it didnt work
  9. Well i dont think i need to do it like that. In Race it uses this: dxDrawText (getPlayerName(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, "default", "center", "bottom", false, false, false ) so i need to use dxDrawText..
  10. Yes but i want the code to put the name color on the top of the car, not on TAB or sth.. it works fine in TAB, but i want a code to read the color of the name, and put it on the top of the car, because now its always white even if the player name is red for example..
  11. I mean IF ur name is read.. i want to automatically check the name color of every player, and put the right color for every player. if ur name is red, i want the text to appear red, if ur name is green, i want the text to appear green, thats what i mean..
  12. Well in race name if ur name is #FF0000Test on the top of the car it appears as WHITE. Well, i want to make it red.
  13. Hello, im new here and i would like to ask something. In race resource, i changed the name tag colour, i made it to check the name color of the player, and put the same color in the tag. It was like that: local r,g,b = 255,255,255 and i changed it to this: local r,g,b = getPlayerNametagColor ( player ) but its not working, can somebody help me?
×
×
  • Create New...