DarkByte Posted July 15, 2016 Posted July 15, 2016 (edited) Nothing Edited July 16, 2016 by Guest When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
Et-win Posted July 15, 2016 Posted July 15, 2016 You have to put a string as color (#AARRGGBB) ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
DarkByte Posted July 15, 2016 Author Posted July 15, 2016 How to do that? When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
Et-win Posted July 15, 2016 Posted July 15, 2016 guiSetProperty( player.gui.mapBlip, "ImageColours", hex) ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
DarkByte Posted July 15, 2016 Author Posted July 15, 2016 The blip it's still black... When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
Captain Cody Posted July 15, 2016 Posted July 15, 2016 guiSetProperty( player.gui.mapBlip, "ImageColours", "0x"..hex)
DarkByte Posted July 15, 2016 Author Posted July 15, 2016 It's still black.. When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
DarkByte Posted July 15, 2016 Author Posted July 15, 2016 White. Help When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
Et-win Posted July 15, 2016 Posted July 15, 2016 https://wiki.multitheftauto.com/wiki/Ge ... metagColor Returns red, green and blue values if an existent player was specified, false otherwise. It doesn't return alpha, which means you have to do: guiSetProperty( player.gui.mapBlip, "ImageColours", "FF"..hex) Correct me if I'm wrong, it's a long time ago I scripted ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
Captain Cody Posted July 15, 2016 Posted July 15, 2016 Try this function RGBToHex(red, green, blue,) return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,0) end --Part from the code local rr, gg, bb= getPlayerNametagColor(g_Me) local hex = RGBToHex(rr,gg,bb) -- (255, 255, 0, 0) red color guiSetProperty( player.gui.mapBlip, "ImageColours", "0x"..hex )
DarkByte Posted July 16, 2016 Author Posted July 16, 2016 Cody - Your script doesn't work Et-Wind the image remains black. When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
Et-win Posted July 16, 2016 Posted July 16, 2016 http://cegui.org.uk/wiki/The_Beginners_ ... II#Imagery As far as I understand, it works like this: --tl = Top Left, t = Top, tr = Top Right --l = Left, bg = Middle, r = Right --bl = Bottom Left, b = Bottom, br = Bottom Right, --Usage: HEX Colors without #: AARRGGBB (Alphax2, Redx2, Greenx2, Bluex2) --Example: guiSetProperty(image, "ImageColours", "tl:0000FF00 tr:FF00FF00 bl:FF00FF00 br:0000FF00") So, if you want to use your nametag-colors: function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("%.2X%.2X%.2X", red,green,blue) end end local rr, gg, bb,aa = getPlayerNametagColor(g_Me) local hex = RGBToHex(rr,gg,bb) -- (255, 255, 0, 0) red color guiSetProperty(player.gui.mapBlip, "ImageColours", "tl:FF"..tostring(hex).." tr:FF"..tostring(hex).." bl:FF"..tostring(hex).." br:FF"..tostring(hex)) ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
DarkByte Posted July 16, 2016 Author Posted July 16, 2016 Don't know, it's still black. When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
Et-win Posted July 16, 2016 Posted July 16, 2016 What is your code? ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
فاّرس Posted July 16, 2016 Posted July 16, 2016 Add FF before the hex color, try this : function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("#%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("#%.2X%.2X%.2X", red,green,blue) end end --Part from the code local rr, gg, bb,aa = getPlayerNametagColor(g_Me) local hex = RGBToHex(rr,gg,bb) -- (255, 255, 0, 0) red color guiSetProperty( player.gui.mapBlip, "ImageColours", "tl:FF"..hex.." tr:FF"..hex.." bl:FF"..hex.." br:FF"..hex ) Sha67 سابقاً
DarkByte Posted July 16, 2016 Author Posted July 16, 2016 (edited) ^^ Edited July 16, 2016 by Guest When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
Et-win Posted July 16, 2016 Posted July 16, 2016 --Usage: HEX Colors without # function RGBToHex(red, green, blue, alpha) if((red < 0 or red > 255 or green < 0 or green > 255 or blue < 0 or blue > 255) or (alpha and (alpha < 0 or alpha > 255))) then return nil end if(alpha) then return string.format("%.2X%.2X%.2X%.2X", red,green,blue,alpha) else return string.format("%.2X%.2X%.2X", red,green,blue) end end ~Scripts~ Clan War System V1.2.0 ~Maps~ [DM]Et-win - The Run [FUN]Et-win - Drift Rocket [FUN]Et-win - Drift Rocket // [DD]Et-win - Cross 3xC
DarkByte Posted July 16, 2016 Author Posted July 16, 2016 Works, thanks ^^ When I hear someone saying Mac is better than PC. w0t?w0t? w0t? Great minds discuss ideas, average minds discuss events and small minds discuss people.
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