Admigo Posted September 5, 2011 Share Posted September 5, 2011 Heey guys, How and where can i set the spectate colour to the colour of hex what the player has in name? So if i am #FFFF00Admigo and the players spectate me,the playername above car is then red. Thanks admigo Link to comment
IIIIlllllIII Posted September 5, 2011 Share Posted September 5, 2011 for example to put red color type this code 205,92,92 to but black color type this code 0,0,0 and this all lua colors numbers snow=Color.new(255,250,250) GhostWhite=Color.new(248,248,255) WhiteSmoke=Color.new(245,245,245) gainsboro=Color.new(220,220,220) FloralWhite=Color.new(255,250,240) OldLace=Color.new(253,245,230) linen=Color.new(250,240,230) AntiqueWhite=Color.new(250,235,215) PapayaWhip=Color.new(255,239,213) BlanchedAlmond=Color.new(255,235,205) bisque=Color.new(255,228,196) PeachPuff=Color.new(255,218,185) NavajoWhite=Color.new(255,222,173) moccasin=Color.new(255,228,181) cornsilk=Color.new(255,248,220) ivory=Color.new(255,255,240) LemonChiffon=Color.new(255,250,205) seashell=Color.new(255,245,238) honeydew=Color.new(240,255,240) MintCream=Color.new(245,255,250) azure=Color.new(240,255,255) AliceBlue=Color.new(240,248,255) lavender=Color.new(230,230,250) LavenderBlush=Color.new(255,240,245) MistyRose=Color.new(255,228,225) white=Color.new(255,255,255) black=Color.new(0,0,0) DarkSlateGray=Color.new(47,79,79) DarkSlateGrey=Color.new(47,79,79) DimGray=Color.new(105,105,105) DimGrey=Color.new(105,105,105) SlateGray=Color.new(112,128,144) SlateGrey=Color.new(112,128,144) LightSlateGray=Color.new(119,136,153) LightSlateGrey=Color.new(119,136,153) gray=Color.new(190,190,190) grey=Color.new(190,190,190) LightGrey=Color.new(211,211,211) LightGray=Color.new(211,211,211) MidnightBlue=Color.new(25,25,112) navy=Color.new(0,0,128) NavyBlue=Color.new(0,0,128) CornflowerBlue=Color.new(100,149,237) DarkSlateBlue=Color.new(72,61,139) slate,blue=Color.new(106,90,205) SlateBlue=Color.new(106,90,205) MediumSlateBlue=Color.new(123,104,238) LightSlateBlue=Color.new(132,112,255) MediumBlue=Color.new(0,0,205) RoyalBlue=Color.new(65,105,225) blue=Color.new(0,0,255) DodgerBlue=Color.new(30,144,255) DeepSkyBlue=Color.new(0,191,255) SkyBlue=Color.new(135,206,235) LightSkyBlue=Color.new(135,206,250) SteelBlue=Color.new(70,130,180) LightSteelBlue=Color.new(176,196,222) LightBlue=Color.new(173,216,230) PowderBlue=Color.new(176,224,230) PaleTurquoise=Color.new(175,238,238) DarkTurquoise=Color.new(0,206,209) MediumTurquoise=Color.new(72,209,204) turquoise=Color.new(64,224,208) cyan=Color.new(0,255,255) LightCyan=Color.new(224,255,255) CadetBlue=Color.new(95,158,160) MediumAquamarine=Color.new(102,205,170) aquamarine=Color.new(127,255,212) DarkGreen=Color.new(0,100,0) DarkOliveGreen=Color.new(85,107,47) DarkSeaGreen=Color.new(143,188,143) SeaGreen=Color.new(46,139,87) MediumSeaGreen=Color.new(60,179,113) LightSeaGreen=Color.new(32,178,170) PaleGreen=Color.new(152,251,152) SpringGreen=Color.new(0,255,127) LawnGreen=Color.new(124,252,0) green=Color.new(0,255,0) chartreuse=Color.new(127,255,0) MediumSpringGreen=Color.new(0,250,154) green,yellow=Color.new(173,255,47) GreenYellow=Color.new(173,255,47) LimeGreen=Color.new(50,205,50) YellowGreen=Color.new(154,205,50) ForestGreen=Color.new(34,139,34) OliveDrab=Color.new(107,142,35) DarkKhaki=Color.new(189,183,107) khaki=Color.new(240,230,140) PaleGoldenrod=Color.new(238,232,170) LightGoldenrodYellow=Color.new(250,250,210) LightYellow=Color.new(255,255,224) yellow=Color.new(255,255,0) gold=Color.new(255,215,0) LightGoldenrod=Color.new(238,221,130) goldenrod=Color.new(218,165,32) DarkGoldenrod=Color.new(184,134,11) RosyBrown=Color.new(188,143,143) IndianRed=Color.new(205,92,92) SaddleBrown=Color.new(139,69,19) sienna=Color.new(160,82,45) peru=Color.new(205,133,63) burlywood=Color.new(222,184,135) beige=Color.new(245,245,220) wheat=Color.new(245,222,179) SandyBrown=Color.new(244,164,96) tancolor=Color.new(210,180,140) chocolate=Color.new(210,105,30) firebrick=Color.new(178,34,34) brown=Color.new(165,42,42) DarkSalmon=Color.new(233,150,122) salmon=Color.new(250,128,114) LightSalmon=Color.new(255,160,122) orange=Color.new(255,165,0) DarkOrange=Color.new(255,140,0) coral=Color.new(255,127,80) LightCoral=Color.new(240,128,128) tomato=Color.new(255,99,71) OrangeRed=Color.new(255,69,0) red=Color.new(255,0,0) HotPink=Color.new(255,105,180) DeepPink=Color.new(255,20,147) pink=Color.new(255,192,203) LightPink=Color.new(255,182,193) PaleVioletRed=Color.new(219,112,147) maroon=Color.new(176,48,96) MediumVioletRed=Color.new(199,21,133) violet,red=Color.new(208,32,144) VioletRed=Color.new(208,32,144) magenta=Color.new(255,0,255) violet=Color.new(238,130,238) plum=Color.new(221,160,221) orchid=Color.new(218,112,214) MediumOrchid=Color.new(186,85,211) DarkOrchid=Color.new(153,50,204) DarkViolet=Color.new(148,0,211) BlueViolet=Color.new(138,43,226) purple=Color.new(160,32,240) MediumPurple=Color.new(147,112,219) thistle=Color.new(216,191,216) snow1=Color.new(255,250,250) snow2=Color.new(238,233,233) snow3=Color.new(205,201,201) snow4=Color.new(139,137,137) seashell1=Color.new(255,245,238) seashell2=Color.new(238,229,222) seashell3=Color.new(205,197,191) seashell4=Color.new(139,134,130) AntiqueWhite1=Color.new(255,239,219) AntiqueWhite2=Color.new(238,223,204) AntiqueWhite3=Color.new(205,192,176) AntiqueWhite4=Color.new(139,131,120) bisque1=Color.new(255,228,196) bisque2=Color.new(238,213,183) bisque3=Color.new(205,183,158) bisque4=Color.new(139,125,107) PeachPuff1=Color.new(255,218,185) PeachPuff2=Color.new(238,203,173) PeachPuff3=Color.new(205,175,149) PeachPuff4=Color.new(139,119,101) NavajoWhite1=Color.new(255,222,173) NavajoWhite2=Color.new(238,207,161) NavajoWhite3=Color.new(205,179,139) NavajoWhite4=Color.new(139,121,94) LemonChiffon1=Color.new(255,250,205) LemonChiffon2=Color.new(238,233,191) LemonChiffon3=Color.new(205,201,165) LemonChiffon4=Color.new(139,137,112) cornsilk1=Color.new(255,248,220) cornsilk2=Color.new(238,232,205) cornsilk3=Color.new(205,200,177) cornsilk4=Color.new(139,136,120) ivory1=Color.new(255,255,240) ivory2=Color.new(238,238,224) ivory3=Color.new(205,205,193) ivory4=Color.new(139,139,131) honeydew1=Color.new(240,255,240) honeydew2=Color.new(224,238,224) honeydew3=Color.new(193,205,193) honeydew4=Color.new(131,139,131) LavenderBlush1=Color.new(255,240,245) LavenderBlush2=Color.new(238,224,229) LavenderBlush3=Color.new(205,193,197) LavenderBlush4=Color.new(139,131,134) MistyRose1=Color.new(255,228,225) MistyRose2=Color.new(238,213,210) MistyRose3=Color.new(205,183,181) MistyRose4=Color.new(139,125,123) azure1=Color.new(240,255,255) azure2=Color.new(224,238,238) azure3=Color.new(193,205,205) azure4=Color.new(131,139,139) SlateBlue1=Color.new(131,111,255) SlateBlue2=Color.new(122,103,238) SlateBlue3=Color.new(105,89,205) SlateBlue4=Color.new(71,60,139) RoyalBlue1=Color.new(72,118,255) RoyalBlue2=Color.new(67,110,238) RoyalBlue3=Color.new(58,95,205) RoyalBlue4=Color.new(39,64,139) blue1=Color.new(0,0,255) blue2=Color.new(0,0,238) blue3=Color.new(0,0,205) blue4=Color.new(0,0,139) DodgerBlue1=Color.new(30,144,255) DodgerBlue2=Color.new(28,134,238) DodgerBlue3=Color.new(24,116,205) DodgerBlue4=Color.new(16,78,139) SteelBlue1=Color.new(99,184,255) SteelBlue2=Color.new(92,172,238) SteelBlue3=Color.new(79,148,205) SteelBlue4=Color.new(54,100,139) DeepSkyBlue1=Color.new(0,191,255) DeepSkyBlue2=Color.new(0,178,238) DeepSkyBlue3=Color.new(0,154,205) DeepSkyBlue4=Color.new(0,104,139) SkyBlue1=Color.new(135,206,255) SkyBlue2=Color.new(126,192,238) SkyBlue3=Color.new(108,166,205) SkyBlue4=Color.new(74,112,139) LightSkyBlue1=Color.new(176,226,255) LightSkyBlue2=Color.new(164,211,238) LightSkyBlue3=Color.new(141,182,205) LightSkyBlue4=Color.new(96,123,139) SlateGray1=Color.new(198,226,255) SlateGray2=Color.new(185,211,238) SlateGray3=Color.new(159,182,205) SlateGray4=Color.new(108,123,139) LightSteelBlue1=Color.new(202,225,255) LightSteelBlue2=Color.new(188,210,238) LightSteelBlue3=Color.new(162,181,205) LightSteelBlue4=Color.new(110,123,139) LightBlue1=Color.new(191,239,255) LightBlue2=Color.new(178,223,238) LightBlue3=Color.new(154,192,205) LightBlue4=Color.new(104,131,139) LightCyan1=Color.new(224,255,255) LightCyan2=Color.new(209,238,238) LightCyan3=Color.new(180,205,205) LightCyan4=Color.new(122,139,139) PaleTurquoise1=Color.new(187,255,255) PaleTurquoise2=Color.new(174,238,238) PaleTurquoise3=Color.new(150,205,205) PaleTurquoise4=Color.new(102,139,139) CadetBlue1=Color.new(152,245,255) CadetBlue2=Color.new(142,229,238) CadetBlue3=Color.new(122,197,205) CadetBlue4=Color.new(83,134,139) turquoise1=Color.new(0,245,255) turquoise2=Color.new(0,229,238) turquoise3=Color.new(0,197,205) turquoise4=Color.new(0,134,139) cyan1=Color.new(0,255,255) cyan2=Color.new(0,238,238) cyan3=Color.new(0,205,205) cyan4=Color.new(0,139,139) DarkSlateGray1=Color.new(151,255,255) DarkSlateGray2=Color.new(141,238,238) DarkSlateGray3=Color.new(121,205,205) DarkSlateGray4=Color.new(82,139,139) aquamarine1=Color.new(127,255,212) aquamarine2=Color.new(118,238,198) aquamarine3=Color.new(102,205,170) aquamarine4=Color.new(69,139,116) DarkSeaGreen1=Color.new(193,255,193) DarkSeaGreen2=Color.new(180,238,180) DarkSeaGreen3=Color.new(155,205,155) DarkSeaGreen4=Color.new(105,139,105) SeaGreen1=Color.new(84,255,159) SeaGreen2=Color.new(78,238,148) SeaGreen3=Color.new(67,205,128) SeaGreen4=Color.new(46,139,87) PaleGreen1=Color.new(154,255,154) PaleGreen2=Color.new(144,238,144) PaleGreen3=Color.new(124,205,124) PaleGreen4=Color.new(84,139,84) SpringGreen1=Color.new(0,255,127) SpringGreen2=Color.new(0,238,118) SpringGreen3=Color.new(0,205,102) SpringGreen4=Color.new(0,139,69) green1=Color.new(0,255,0) green2=Color.new(0,238,0) green3=Color.new(0,205,0) green4=Color.new(0,139,0) chartreuse1=Color.new(127,255,0) chartreuse2=Color.new(118,238,0) chartreuse3=Color.new(102,205,0) chartreuse4=Color.new(69,139,0) OliveDrab1=Color.new(192,255,62) OliveDrab2=Color.new(179,238,58) OliveDrab3=Color.new(154,205,50) OliveDrab4=Color.new(105,139,34) DarkOliveGreen1=Color.new(202,255,112) DarkOliveGreen2=Color.new(188,238,104) DarkOliveGreen3=Color.new(162,205,90) DarkOliveGreen4=Color.new(110,139,61) khaki1=Color.new(255,246,143) khaki2=Color.new(238,230,133) khaki3=Color.new(205,198,115) khaki4=Color.new(139,134,78) LightGoldenrod1=Color.new(255,236,139) LightGoldenrod2=Color.new(238,220,130) LightGoldenrod3=Color.new(205,190,112) LightGoldenrod4=Color.new(139,129,76) LightYellow1=Color.new(255,255,224) LightYellow2=Color.new(238,238,209) LightYellow3=Color.new(205,205,180) LightYellow4=Color.new(139,139,122) yellow1=Color.new(255,255,0) yellow2=Color.new(238,238,0) yellow3=Color.new(205,205,0) yellow4=Color.new(139,139,0) gold1=Color.new(255,215,0) gold2=Color.new(238,201,0) gold3=Color.new(205,173,0) gold4=Color.new(139,117,0) goldenrod1=Color.new(255,193,37) goldenrod2=Color.new(238,180,34) goldenrod3=Color.new(205,155,29) goldenrod4=Color.new(139,105,20) DarkGoldenrod1=Color.new(255,185,15) DarkGoldenrod2=Color.new(238,173,14) DarkGoldenrod3=Color.new(205,149,12) DarkGoldenrod4=Color.new(139,101, RosyBrown1=Color.new(255,193,193) RosyBrown2=Color.new(238,180,180) RosyBrown3=Color.new(205,155,155) RosyBrown4=Color.new(139,105,105) IndianRed1=Color.new(255,106,106) IndianRed2=Color.new(238,99,99) IndianRed3=Color.new(205,85,85) IndianRed4=Color.new(139,58,58) sienna1=Color.new(255,130,71) sienna2=Color.new(238,121,66) sienna3=Color.new(205,104,57) sienna4=Color.new(139,71,38) burlywood1=Color.new(255,211,155) burlywood2=Color.new(238,197,145) burlywood3=Color.new(205,170,125) burlywood4=Color.new(139,115,85) wheat1=Color.new(255,231,186) wheat2=Color.new(238,216,174) wheat3=Color.new(205,186,150) wheat4=Color.new(139,126,102) tan1=Color.new(255,165,79) tan2=Color.new(238,154,73) tan3=Color.new(205,133,63) tan4=Color.new(139,90,43) chocolate1=Color.new(255,127,36) chocolate2=Color.new(238,118,33) chocolate3=Color.new(205,102,29) chocolate4=Color.new(139,69,19) firebrick1=Color.new(255,48,48) firebrick2=Color.new(238,44,44) firebrick3=Color.new(205,38,38) firebrick4=Color.new(139,26,26) brown1=Color.new(255,64,64) brown2=Color.new(238,59,59) brown3=Color.new(205,51,51) brown4=Color.new(139,35,35) salmon1=Color.new(255,140,105) salmon2=Color.new(238,130,98) salmon3=Color.new(205,112,84) salmon4=Color.new(139,76,57) LightSalmon1=Color.new(255,160,122) LightSalmon2=Color.new(238,149,114) LightSalmon3=Color.new(205,129,98) LightSalmon4=Color.new(139,87,66) orange1=Color.new(255,165,0) orange2=Color.new(238,154,0) orange3=Color.new(205,133,0) orange4=Color.new(139,90,0) DarkOrange1=Color.new(255,127,0) DarkOrange2=Color.new(238,118,0) DarkOrange3=Color.new(205,102,0) DarkOrange4=Color.new(139,69,0) coral1=Color.new(255,114,86) coral2=Color.new(238,106,80) coral3=Color.new(205,91,69) coral4=Color.new(139,62,47) tomato1=Color.new(255,99,71) tomato2=Color.new(238,92,66) tomato3=Color.new(205,79,57) tomato4=Color.new(139,54,38) OrangeRed1=Color.new(255,69,0) OrangeRed2=Color.new(238,64,0) OrangeRed3=Color.new(205,55,0) OrangeRed4=Color.new(139,37,0) red1=Color.new(255,0,0) red2=Color.new(238,0,0) red3=Color.new(205,0,0) red4=Color.new(139,0,0) DeepPink1=Color.new(255,20,147) DeepPink2=Color.new(238,18,137) DeepPink3=Color.new(205,16,118) DeepPink4=Color.new(139,10,80) HotPink1=Color.new(255,110,180) HotPink2=Color.new(238,106,167) HotPink3=Color.new(205,96,144) HotPink4=Color.new(139,58,98) pink1=Color.new(255,181,197) pink2=Color.new(238,169,184) pink3=Color.new(205,145,158) pink4=Color.new(139,99,108) LightPink1=Color.new(255,174,185) LightPink2=Color.new(238,162,173) LightPink3=Color.new(205,140,149) LightPink4=Color.new(139,95,101) PaleVioletRed1=Color.new(255,130,171) PaleVioletRed2=Color.new(238,121,159) PaleVioletRed3=Color.new(205,104,137) PaleVioletRed4=Color.new(139,71,93) maroon1=Color.new(255,52,179) maroon2=Color.new(238,48,167) maroon3=Color.new(205,41,144) maroon4=Color.new(139,28,98) VioletRed1=Color.new(255,62,150) VioletRed2=Color.new(238,58,140) VioletRed3=Color.new(205,50,120) VioletRed4=Color.new(139,34,82) magenta1=Color.new(255,0,255) magenta2=Color.new(238,0,238) magenta3=Color.new(205,0,205) magenta4=Color.new(139,0,139) orchid1=Color.new(255,131,250) orchid2=Color.new(238,122,233) orchid3=Color.new(205,105,201) orchid4=Color.new(139,71,137) plum1=Color.new(255,187,255) plum2=Color.new(238,174,238) plum3=Color.new(205,150,205) plum4=Color.new(139,102,139) MediumOrchid1=Color.new(224,102,255) MediumOrchid2=Color.new(209,95,238) MediumOrchid3=Color.new(180,82,205) MediumOrchid4=Color.new(122,55,139) DarkOrchid1=Color.new(191,62,255) DarkOrchid2=Color.new(178,58,238) DarkOrchid3=Color.new(154,50,205) DarkOrchid4=Color.new(104,34,139) purple1=Color.new(155,48,255) purple2=Color.new(145,44,238) purple3=Color.new(125,38,205) purple4=Color.new(85,26,139) MediumPurple1=Color.new(171,130,255) MediumPurple2=Color.new(159,121,238) MediumPurple3=Color.new(137,104,205) MediumPurple4=Color.new(93,71,139) thistle1=Color.new(255,225,255) thistle2=Color.new(238,210,238) thistle3=Color.new(205,181,205) thistle4=Color.new(139,123,139) gray0=Color.new(0,0,0) grey0=Color.new(0,0,0) gray1=Color.new(3,3,3) grey1=Color.new(3,3,3) gray2=Color.new(5,5,5) grey2=Color.new(5,5,5) gray3=Color.new(8,8, grey3=Color.new(8,8, gray4=Color.new(10,10,10) grey4=Color.new(10,10,10) gray5=Color.new(13,13,13) grey5=Color.new(13,13,13) gray6=Color.new(15,15,15) grey6=Color.new(15,15,15) gray7=Color.new(18,18,18) grey7=Color.new(18,18,18) gray8=Color.new(20,20,20) grey8=Color.new(20,20,20) gray9=Color.new(23,23,23) grey9=Color.new(23,23,23) gray10=Color.new(26,26,26) grey10=Color.new(26,26,26) gray11=Color.new(28,28,28) grey11=Color.new(28,28,28) gray12=Color.new(31,31,31) grey12=Color.new(31,31,31) gray13=Color.new(33,33,33) grey13=Color.new(33,33,33) gray14=Color.new(36,36,36) grey14=Color.new(36,36,36) gray15=Color.new(38,38,38) grey15=Color.new(38,38,38) gray16=Color.new(41,41,41) grey16=Color.new(41,41,41) gray17=Color.new(43,43,43) grey17=Color.new(43,43,43) gray18=Color.new(46,46,46) grey18=Color.new(46,46,46) gray19=Color.new(48,48,48) grey19=Color.new(48,48,48) gray20=Color.new(51,51,51) grey20=Color.new(51,51,51) gray21=Color.new(54,54,54) grey21=Color.new(54,54,54) gray22=Color.new(56,56,56) grey22=Color.new(56,56,56) gray23=Color.new(59,59,59) grey23=Color.new(59,59,59) gray24=Color.new(61,61,61) grey24=Color.new(61,61,61) gray25=Color.new(64,64,64) grey25=Color.new(64,64,64) gray26=Color.new(66,66,66) grey26=Color.new(66,66,66) gray27=Color.new(69,69,69) grey27=Color.new(69,69,69) gray28=Color.new(71,71,71) grey28=Color.new(71,71,71) gray29=Color.new(74,74,74) grey29=Color.new(74,74,74) gray30=Color.new(77,77,77) grey30=Color.new(77,77,77) gray31=Color.new(79,79,79) grey31=Color.new(79,79,79) gray32=Color.new(82,82,82) grey32=Color.new(82,82,82) gray33=Color.new(84,84,84) grey33=Color.new(84,84,84) gray34=Color.new(87,87,87) grey34=Color.new(87,87,87) gray35=Color.new(89,89,89) grey35=Color.new(89,89,89) gray36=Color.new(92,92,92) grey36=Color.new(92,92,92) gray37=Color.new(94,94,94) grey37=Color.new(94,94,94) gray38=Color.new(97,97,97) grey38=Color.new(97,97,97) gray39=Color.new(99,99,99) grey39=Color.new(99,99,99) gray40=Color.new(102,102,102) grey40=Color.new(102,102,102) gray41=Color.new(105,105,105) grey41=Color.new(105,105,105) gray42=Color.new(107,107,107) grey42=Color.new(107,107,107) gray43=Color.new(110,110,110) grey43=Color.new(110,110,110) gray44=Color.new(112,112,112) grey44=Color.new(112,112,112) gray45=Color.new(115,115,115) grey45=Color.new(115,115,115) gray46=Color.new(117,117,117) grey46=Color.new(117,117,117) gray47=Color.new(120,120,120) grey47=Color.new(120,120,120) gray48=Color.new(122,122,122) grey48=Color.new(122,122,122) gray49=Color.new(125,125,125) grey49=Color.new(125,125,125) gray50=Color.new(127,127,127) grey50=Color.new(127,127,127) gray51=Color.new(130,130,130) grey51=Color.new(130,130,130) gray52=Color.new(133,133,133) grey52=Color.new(133,133,133) gray53=Color.new(135,135,135) grey53=Color.new(135,135,135) gray54=Color.new(138,138,138) grey54=Color.new(138,138,138) gray55=Color.new(140,140,140) grey55=Color.new(140,140,140) gray56=Color.new(143,143,143) grey56=Color.new(143,143,143) gray57=Color.new(145,145,145) grey57=Color.new(145,145,145) gray58=Color.new(148,148,148) grey58=Color.new(148,148,148) gray59=Color.new(150,150,150) grey59=Color.new(150,150,150) gray60=Color.new(153,153,153) grey60=Color.new(153,153,153) gray61=Color.new(156,156,156) grey61=Color.new(156,156,156) gray62=Color.new(158,158,158) grey62=Color.new(158,158,158) gray63=Color.new(161,161,161) grey63=Color.new(161,161,161) gray64=Color.new(163,163,163) grey64=Color.new(163,163,163) gray65=Color.new(166,166,166) grey65=Color.new(166,166,166) gray66=Color.new(168,168,168) grey66=Color.new(168,168,168) gray67=Color.new(171,171,171) grey67=Color.new(171,171,171) gray68=Color.new(173,173,173) grey68=Color.new(173,173,173) gray69=Color.new(176,176,176) grey69=Color.new(176,176,176) gray70=Color.new(179,179,179) grey70=Color.new(179,179,179) gray71=Color.new(181,181,181) grey71=Color.new(181,181,181) gray72=Color.new(184,184,184) grey72=Color.new(184,184,184) gray73=Color.new(186,186,186) grey73=Color.new(186,186,186) gray74=Color.new(189,189,189) grey74=Color.new(189,189,189) gray75=Color.new(191,191,191) grey75=Color.new(191,191,191) gray76=Color.new(194,194,194) grey76=Color.new(194,194,194) gray77=Color.new(196,196,196) grey77=Color.new(196,196,196) gray78=Color.new(199,199,199) grey78=Color.new(199,199,199) gray79=Color.new(201,201,201) grey79=Color.new(201,201,201) gray80=Color.new(204,204,204) grey80=Color.new(204,204,204) gray81=Color.new(207,207,207) grey81=Color.new(207,207,207) gray82=Color.new(209,209,209) grey82=Color.new(209,209,209) gray83=Color.new(212,212,212) grey83=Color.new(212,212,212) gray84=Color.new(214,214,214) grey84=Color.new(214,214,214) gray85=Color.new(217,217,217) grey85=Color.new(217,217,217) gray86=Color.new(219,219,219) grey86=Color.new(219,219,219) gray87=Color.new(222,222,222) grey87=Color.new(222,222,222) gray88=Color.new(224,224,224) grey88=Color.new(224,224,224) gray89=Color.new(227,227,227) grey89=Color.new(227,227,227) gray90=Color.new(229,229,229) grey90=Color.new(229,229,229) gray91=Color.new(232,232,232) grey91=Color.new(232,232,232) gray92=Color.new(235,235,235) grey92=Color.new(235,235,235) gray93=Color.new(237,237,237) grey93=Color.new(237,237,237) gray94=Color.new(240,240,240) grey94=Color.new(240,240,240) gray95=Color.new(242,242,242) grey95=Color.new(242,242,242) gray96=Color.new(245,245,245) grey96=Color.new(245,245,245) gray97=Color.new(247,247,247) grey97=Color.new(247,247,247) gray98=Color.new(250,250,250) grey98=Color.new(250,250,250) gray99=Color.new(252,252,252) grey99=Color.new(252,252,252) gray100=Color.new(255,255,255) grey100=Color.new(255,255,255) Link to comment
CapY Posted September 5, 2011 Share Posted September 5, 2011 for example to put red color type this code205,92,92 Red color is 255,0,0 AFAIK. Link to comment
Castillo Posted September 5, 2011 Share Posted September 5, 2011 I think he's talking about nametags with color codes, example if you have a HEX color #00FF00Solidsnake14 it'll be GREEN, and if you have #00FF00Solid#FF0000snake14 it'll be GREEN-RED. Link to comment
JR10 Posted September 5, 2011 Share Posted September 5, 2011 addEventHandler ( "onClientRender" , localPlayer , function ( ) local pX , pY , pZ = getElementPosition ( localPlayer ) local pname = getPlayerName ( localPlayer ) if pname:find ( "#%x%x%x%x%x%x" ) then local hexColor = pname:match ( "#%x%x%x%x%x%x" ) pname = pname:gsub ( "#%x%x%x%x%x%x" , "" ) local r , g , b = getColorFromString ( hexColor ) local x , y = getScreenFromWorldPosition ( x , y , z + 1.2 , 0.06 ) dxDrawText ( pname , x , y , x , y , tocolor ( r , g , b , 255 ) ) else local r , g , b = getPlayerNametagColor ( localPlayer ) local x , y = getScreenFromWorldPosition ( x , y , z + 1.2 , 0.06 ) dxDrawText ( pname , x , y , x , y , tocolor ( r , g , b , 255 ) ) end end) function getColorFromString(hex) hex = hex:gsub("#","") return tonumber("0x"..hex:sub(1,2)), tonumber("0x"..hex:sub(3,4)), tonumber("0x"..hex:sub(5,6)) end This is not tested. Link to comment
Admigo Posted September 5, 2011 Author Share Posted September 5, 2011 Where i need to put this? I am so noob with mta scripting. I only can script sa-mp:P but i want to learn mta;) Link to comment
JR10 Posted September 5, 2011 Share Posted September 5, 2011 In a client side script. Link to comment
Admigo Posted September 5, 2011 Author Share Posted September 5, 2011 Dont work:S Spectate name is just white:S Link to comment
JR10 Posted September 5, 2011 Share Posted September 5, 2011 Use /debugscript 3. EDIT: I tested it and figured out the problem. addEventHandler ( "onClientRender" , root , function ( ) local pX , pY , pZ = getPedBonePosition ( localPlayer , 8 ) local pname = getPlayerName ( localPlayer ) if pname:find ( "#%x%x%x%x%x%x" ) then local hexColor = pname:match ( "#%x%x%x%x%x%x" ) pname = pname:gsub ( "#%x%x%x%x%x%x" , "" ) local r , g , b = getColorFromString ( hexColor ) local x , y = getScreenFromWorldPosition ( pX , pY , pZ + 0.5 ) dxDrawText ( pname , x , y , x , y , tocolor ( r , g , b , 255 ) , 2 , "default" , "center" , "center" ) else local r , g , b = getPlayerNametagColor ( localPlayer ) local x , y = getScreenFromWorldPosition ( pX , pY , pZ + 0.5 ) dxDrawText ( pname , x , y , x , y , tocolor ( r , g , b , 255 ) , 2 , "default" , "center" , "center" ) end end) function getColorFromString(hex) hex = hex:gsub("#","") return tonumber("0x"..hex:sub(1,2)), tonumber("0x"..hex:sub(3,4)), tonumber("0x"..hex:sub(5,6)) end Link to comment
Admigo Posted September 6, 2011 Author Share Posted September 6, 2011 Dont work:S Now my derby maps cant starts anymore. I use just the race gamemode for derby. There somehwere is spectate. Pls help me. Link to comment
JR10 Posted September 6, 2011 Share Posted September 6, 2011 It works, I tested it. You probably did something wrong, post the meta. Link to comment
#Paper Posted September 6, 2011 Share Posted September 6, 2011 Ohh wait, JR10 maybe i understand what he wants, when u die/ press b, under the screen (in the race mode) there is the label: "Currently spectating:" and @ left and @ right there are the arrows for select the player to spectate, maybe u want the specated player name colored? Link to comment
Admigo Posted September 6, 2011 Author Share Posted September 6, 2011 No when u spectate,u see playername above car. I want when a player use a colour in his name you see that colour above his car. So if i have a yellow name:#FFFF00Admigo and when i die and players spectate me you see Admigo in yellow. But now the spectate is only white. Link to comment
JR10 Posted September 6, 2011 Share Posted September 6, 2011 When you spectate, you don't see any names, unless there is a script for it. And why when you die, unless you are talking about the race, which is exactly what Actiano said. Link to comment
#Paper Posted September 6, 2011 Share Posted September 6, 2011 I use just the race gamemode for derby. I thought he wanted to put the colored name when i said, anyway, sorry for my bad Link to comment
Admigo Posted September 8, 2011 Author Share Posted September 8, 2011 Here is a better explain: http://www.google.nl/imgres?q=mta+spect ... 29,r:7,s:0 You see white names. I want if a player has a hexcolour in name you see that color name. Pls help me. Link to comment
qaisjp Posted September 8, 2011 Share Posted September 8, 2011 nametags file in race. see it. he means the vehicle nametags. Link to comment
Admigo Posted September 8, 2011 Author Share Posted September 8, 2011 Okay what i need to add there? Link to comment
SDK Posted September 8, 2011 Share Posted September 8, 2011 viewtopic.php?p=355929#p355929 Search, search, search Link to comment
Admigo Posted September 9, 2011 Author Share Posted September 9, 2011 P1:How can i change the size of the letters. Its so big:P P2;And how can i change the health bar to green and if you are hit the part from hitted to red. The bar is white with grey or black:S addEventHandler ( "onClientRender", g_Root, function() -- Hideous quick fix -- for i,player in ipairs(g_Players) do if player ~= g_Me then setPlayerNametagShowing ( player, false ) if not nametags[player] then nametag.create ( player ) end end end if bHideNametags then return end local x,y,z = getCameraMatrix() for player in pairs(nametags) do while true do if not isPedInVehicle(player) or isPlayerDead(player) then break end local vehicle = getPedOccupiedVehicle(player) local px,py,pz = getElementPosition ( vehicle ) local pdistance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if pdistance <= NAMETAG_DISTANCE then --Get screenposition local sx,sy = getScreenFromWorldPosition ( px, py, pz+0.95, 0.06 ) if not sx or not sy then break end --Calculate our components local scale = 1/(NAMETAG_SCALE * (pdistance / NAMETAG_DISTANCE)) local alpha = ((pdistance - NAMETAG_ALPHA_DISTANCE) / NAMETAG_ALPHA_DIFF) alpha = (alpha < 0) and NAMETAG_ALPHA or NAMETAG_ALPHA-(alpha*NAMETAG_ALPHA) scale = math.evalCurve(maxScaleCurve,scale) local textscale = math.evalCurve(textScaleCurve,scale) local textalpha = math.evalCurve(textAlphaCurve,alpha) local outlineThickness = NAMETAG_OUTLINE_THICKNESS*(scale) --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 ) dxDrawText ( getPlayerName(player), sx + 1, sy - offset + 1, sx + 1, sy - offset + 1, tocolor(0,0,0,255), textscale*NAMETAG_TEXTSIZE, "bankgothic", "center", "bottom", false, false, false ) dxDrawColorText( getPlayerName(player,true), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, 'bankgothic', 'center', 'bottom' ) --We draw three parts to make the healthbar. First the outline/background local drawX = sx - NAMETAG_WIDTH*scale/2 drawY = sy + offset local width,height = NAMETAG_WIDTH*scale, NAMETAG_HEIGHT*scale dxDrawRectangle ( drawX, drawY, width, height, tocolor(0,0,0,alpha) ) --Next the inner background local health = getElementHealth(vehicle) health = math.max(health - 250, 0)/750 local p = -510*(health^2) --local r,g = math.max(math.min(p + 255*health + 255, 255), 0), math.max(math.min(p + 765*health, 255), 0) dxDrawRectangle ( drawX + outlineThickness, drawY + outlineThickness, width - outlineThickness*2, height - outlineThickness*2, tocolor(178,178,178,0.4*alpha) ) --Finally, the actual health dxDrawRectangle ( drawX + outlineThickness, drawY + outlineThickness, health*(width - outlineThickness*2), height - outlineThickness*2, tocolor(r,g,b,alpha) ) end break end end end ) Link to comment
GTX Posted September 9, 2011 Share Posted September 9, 2011 addEventHandler ( "onClientRender", g_Root, function() -- Hideous quick fix -- for i,player in ipairs(g_Players) do if player ~= g_Me then setPlayerNametagShowing ( player, false ) if not nametags[player] then nametag.create ( player ) end end end if bHideNametags then return end local x,y,z = getCameraMatrix() for player in pairs(nametags) do while true do if not isPedInVehicle(player) or isPlayerDead(player) then break end local vehicle = getPedOccupiedVehicle(player) local px,py,pz = getElementPosition ( vehicle ) local pdistance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if pdistance <= NAMETAG_DISTANCE then --Get screenposition local sx,sy = getScreenFromWorldPosition ( px, py, pz+0.95, 0.06 ) if not sx or not sy then break end --Calculate our components local scale = 1/(NAMETAG_SCALE * (pdistance / NAMETAG_DISTANCE)) local alpha = ((pdistance - NAMETAG_ALPHA_DISTANCE) / NAMETAG_ALPHA_DIFF) alpha = (alpha < 0) and NAMETAG_ALPHA or NAMETAG_ALPHA-(alpha*NAMETAG_ALPHA) scale = math.evalCurve(maxScaleCurve,scale) local textscale = math.evalCurve(textScaleCurve,scale) local textalpha = math.evalCurve(textAlphaCurve,alpha) local outlineThickness = NAMETAG_OUTLINE_THICKNESS*(scale) --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 ) dxDrawText ( getPlayerName(player), sx + 1, sy - offset + 1, sx + 1, sy - offset + 1, tocolor(0,0,0,255), textscale*NAMETAG_TEXTSIZE, "bankgothic", "center", "bottom", false, false, false ) dxDrawColorText( getPlayerName(player,true), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, 'bankgothic', 'center', 'bottom' ) --We draw three parts to make the healthbar. First the outline/background local drawX = sx - NAMETAG_WIDTH*scale/2 drawY = sy + offset local width,height = NAMETAG_WIDTH*scale, NAMETAG_HEIGHT*scale dxDrawRectangle ( drawX, drawY, width, height, tocolor(0,0,0,alpha) ) --Next the inner background local health = getElementHealth(vehicle) health = math.max(health - 250, 0)/750 local p = -510*(health^2) --local r,g = math.max(math.min(p + 255*health + 255, 255), 0), math.max(math.min(p + 765*health, 255), 0) dxDrawRectangle ( drawX + outlineThickness, drawY + outlineThickness, width - outlineThickness*2, height - outlineThickness*2, tocolor(178,178,178,0.4*alpha) ) --Finally, the actual health dxDrawRectangle ( drawX + outlineThickness, drawY + outlineThickness, health*(width - outlineThickness*2), height - outlineThickness*2, tocolor(r,g,b,alpha) ) end break end end end ) function dxDrawColorText(str, ax, ay, bx, by, color, scale, font) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) ax = ax + w color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end last = e + 1 s, e, cap, col = str:find(pat, last) end if last <= #str then cap = str:sub(last) local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) end end Try this, untested Link to comment
Admigo Posted September 9, 2011 Author Share Posted September 9, 2011 Same letter size and health bar not green:s Link to comment
GTX Posted September 10, 2011 Share Posted September 10, 2011 (edited) nametag = {} local nametags = {} local g_screenX,g_screenY = guiGetScreenSize() local bHideNametags = false local NAMETAG_SCALE = 0.3 --Overall adjustment of the nametag, use this to resize but constrain proportions local NAMETAG_ALPHA_DISTANCE = 50 --Distance to start fading out local NAMETAG_DISTANCE = 120 --Distance until we're gone local NAMETAG_ALPHA = 120 --The overall alpha level of the nametag --The following arent actual pixel measurements, they're just proportional constraints local NAMETAG_TEXT_BAR_SPACE = 2 local NAMETAG_WIDTH = 50 local NAMETAG_HEIGHT = 5 local NAMETAG_TEXTSIZE = 0.26 local NAMETAG_OUTLINE_THICKNESS = 1.2 -- local NAMETAG_ALPHA_DIFF = NAMETAG_DISTANCE - NAMETAG_ALPHA_DISTANCE NAMETAG_SCALE = 1/NAMETAG_SCALE * 800 / g_screenY -- -- If 1 then it shows your own nametag, else it will make invisible Testing = 0 -- Ensure the name tag doesn't get too big local maxScaleCurve = { {0, 0}, {3, 3}, {13, 5} } -- Ensure the text doesn't get too small/unreadable local textScaleCurve = { {0, 0.8}, {0.8, 1.2}, {99, 99} } -- Make the text a bit brighter and fade more gradually local textAlphaCurve = { {0, 0}, {25, 100}, {120, 190}, {255, 190} } function nametag.create ( player ) nametags[player] = true end function nametag.destroy ( player ) nametags[player] = nil end addEventHandler ( "onClientRender", g_Root, function() -- Hideous quick fix -- for i,player in ipairs(g_Players) do if player ~= g_Me or Testing == 1 then setPlayerNametagShowing ( player, false ) if not nametags[player] then nametag.create ( player ) end end end if bHideNametags then return end local x,y,z = getCameraMatrix() for player in pairs(nametags) do while true do if not isPedInVehicle(player) or isPlayerDead(player) then break end local vehicle = getPedOccupiedVehicle(player) local px,py,pz = getElementPosition ( vehicle ) local pdistance = getDistanceBetweenPoints3D ( x,y,z,px,py,pz ) if pdistance <= NAMETAG_DISTANCE then --Get screenposition local sx,sy = getScreenFromWorldPosition ( px, py, pz+0.95, 0.06 ) if not sx or not sy then break end --Calculate our components local scale = 1/(NAMETAG_SCALE * (pdistance / NAMETAG_DISTANCE)) local alpha = ((pdistance - NAMETAG_ALPHA_DISTANCE) / NAMETAG_ALPHA_DIFF) alpha = (alpha < 0) and NAMETAG_ALPHA or NAMETAG_ALPHA-(alpha*NAMETAG_ALPHA) scale = math.evalCurve(maxScaleCurve,scale) local textscale = math.evalCurve(textScaleCurve,scale) local textalpha = math.evalCurve(textAlphaCurve,alpha) local outlineThickness = NAMETAG_OUTLINE_THICKNESS*(scale) --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 -- There will be the font name font = "bankgothic" -- As you can see, i'm using bankgothic font dxDrawColorText ( string.gsub(getPlayerNametagText(player),'#%x%x%x%x%x%x',''), sx + 1, sy - offset + 1, sx + 1, sy - offset + 1, tocolor(0,0,0,textalpha), textscale*NAMETAG_TEXTSIZE, font, "center", "bottom", false, false, false ) dxDrawColorText ( getPlayerNametagText(player), sx, sy - offset, sx, sy - offset, tocolor(r,g,b,textalpha), textscale*NAMETAG_TEXTSIZE, font, "center", "bottom", false, false, false ) --We draw three parts to make the healthbar. First the outline/background local drawX = sx - NAMETAG_WIDTH*scale/2 drawY = sy + offset local width,height = NAMETAG_WIDTH*scale, NAMETAG_HEIGHT*scale dxDrawRectangle ( drawX, drawY, width, height, tocolor(0,0,0,alpha) ) --Next the inner background local health = getElementHealth(vehicle) health = math.max(health - 250, 0)/750 local p = -510*(health^2) local r,g = math.max(math.min(p + 255*health + 255, 255), 0), math.max(math.min(p + 765*health, 255), 0) dxDrawRectangle ( drawX + outlineThickness, drawY + outlineThickness, width - outlineThickness*2, height - outlineThickness*2, tocolor(r,g,0,0.4*alpha) ) --Finally, the actual health dxDrawRectangle ( drawX + outlineThickness, drawY + outlineThickness, health*(width - outlineThickness*2), height - outlineThickness*2, tocolor(r,g,0,alpha) ) end break end end end ) ---------------THE FOLLOWING IS THE MANAGEMENT OF NAMETAGS----------------- addEventHandler('onClientResourceStart', g_ResRoot, function() for i,player in ipairs(getElementsByType"player") do if player ~= g_Me or Testing == 1 then nametag.create ( player ) end end end ) addEventHandler ( "onClientPlayerJoin", g_Root, function() if source == g_Me then return end setPlayerNametagShowing ( source, false ) nametag.create ( source ) end ) addEventHandler ( "onClientPlayerQuit", g_Root, function() nametag.destroy ( source ) end ) addEvent ( "onClientScreenFadedOut", true ) addEventHandler ( "onClientScreenFadedOut", g_Root, function() bHideNametags = true end ) addEvent ( "onClientScreenFadedIn", true ) addEventHandler ( "onClientScreenFadedIn", g_Root, function() bHideNametags = false end ) function dxDrawColorText(str, ax, ay, bx, by, color, scale, font, alignX, alignY) if alignX then if alignX == "center" then local w = dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) ax = ax + (bx-ax)/2 - w/2 elseif alignX == "right" then local w = dxGetTextWidth(str:gsub("#%x%x%x%x%x%x",""), scale, font) ax = bx - w end end if alignY then if alignY == "center" then local h = dxGetFontHeight(scale, font) ay = ay + (by-ay)/2 - h/2 elseif alignY == "bottom" then local h = dxGetFontHeight(scale, font) ay = by - h end end local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find(pat, 1) local last = 1 while s do if cap == "" and col then color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) ax = ax + w color = tocolor(tonumber("0x"..col:sub(1, 2)), tonumber("0x"..col:sub(3, 4)), tonumber("0x"..col:sub(5, 6)), 255) end last = e + 1 s, e, cap, col = str:find(pat, last) end if last <= #str then cap = str:sub(last) local w = dxGetTextWidth(cap, scale, font) dxDrawText(cap, ax, ay, ax + w, by, color, scale, font) end end This should work EDIT: It works! Tested. You can see here: http://www.shrani.si/f/1t/wc/qQndfPq/mt ... 1011-3.png Edited September 10, 2011 by Guest Link to comment
Admigo Posted September 10, 2011 Author Share Posted September 10, 2011 Omg ,Thanks dude,Fixed. 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