-Doc- Posted May 28, 2015 Posted May 28, 2015 How its possible to change freeroam map nametag color? From black to white or other color My scripting skills
-Doc- Posted May 28, 2015 Author Posted May 28, 2015 show examples ? What expamles? My scripting skills
-Doc- Posted May 28, 2015 Author Posted May 28, 2015 U know freeroam map? And i want to change the name to r,g,b= getPlayerNametagColor(player) How its possible? My scripting skills
-Doc- Posted May 28, 2015 Author Posted May 28, 2015 I wanna to get player nametag color at freeroam map local r,g,b=getPlayerNametagColor(player) My scripting skills
Walid Posted May 28, 2015 Posted May 28, 2015 Anyone help? Try this function updatePlayerBlips() if not g_PlayerData then return end local wnd = isWindowOpen(wndSpawnMap) and wndSpawnMap or wndSetPos local mapControl = getControl(wnd, 'map') for elem,player in pairs(g_PlayerData) do if not player.gui.mapBlip then player.gui.mapBlip = guiCreateStaticImage(0, 0, 9, 9, elem == g_Me and 'localplayerblip.png' or 'playerblip.png', false, mapControl) player.gui.mapLabelShadow = guiCreateLabel(0, 0, 100, 14, player.name, false, mapControl) local labelWidth = guiLabelGetTextExtent(player.gui.mapLabelShadow) local r, g, b = getPlayerNametagColor (elem) guiSetSize(player.gui.mapLabelShadow, labelWidth, 14, false) guiSetFont(player.gui.mapLabelShadow, 'default-bold-small') guiLabelSetColor(player.gui.mapLabelShadow, r, g, b) player.gui.mapLabel = guiCreateLabel(0, 0, labelWidth, 14, player.name, false, mapControl) guiSetFont(player.gui.mapLabel, 'default-bold-small') guiLabelSetColor(player.gui.mapLabel, 0, 0, 0) for i,name in ipairs({'mapBlip', 'mapLabelShadow'}) do addEventHandler('onClientGUIDoubleClick', player.gui[name], function() server.warpMe(elem) closeWindow(wnd) end, false ) end end local x, y = getElementPosition(elem) x = math.floor((x + 3000) * g_MapSide / 6000) - 4 y = math.floor((3000 - y) * g_MapSide / 6000) - 4 guiSetPosition(player.gui.mapBlip, x, y, false) guiSetPosition(player.gui.mapLabelShadow, x + 14, y - 4, false) guiSetPosition(player.gui.mapLabel, x + 13, y - 5, false) end end Do not yield your back to your enemy, might feel something strange in your ass. Two things are infinite the universe and human stupidity and i'm not sure about the universe. UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators
SpoC^ Posted May 28, 2015 Posted May 28, 2015 Anyone help? Try this function updatePlayerBlips() if not g_PlayerData then return end local wnd = isWindowOpen(wndSpawnMap) and wndSpawnMap or wndSetPos local mapControl = getControl(wnd, 'map') for elem,player in pairs(g_PlayerData) do if not player.gui.mapBlip then player.gui.mapBlip = guiCreateStaticImage(0, 0, 9, 9, elem == g_Me and 'localplayerblip.png' or 'playerblip.png', false, mapControl) player.gui.mapLabelShadow = guiCreateLabel(0, 0, 100, 14, player.name, false, mapControl) local labelWidth = guiLabelGetTextExtent(player.gui.mapLabelShadow) local r, g, b = getPlayerNametagColor (elem) guiSetSize(player.gui.mapLabelShadow, labelWidth, 14, false) guiSetFont(player.gui.mapLabelShadow, 'default-bold-small') guiLabelSetColor(player.gui.mapLabelShadow, r, g, b) player.gui.mapLabel = guiCreateLabel(0, 0, labelWidth, 14, player.name, false, mapControl) guiSetFont(player.gui.mapLabel, 'default-bold-small') guiLabelSetColor(player.gui.mapLabel, 0, 0, 0) for i,name in ipairs({'mapBlip', 'mapLabelShadow'}) do addEventHandler('onClientGUIDoubleClick', player.gui[name], function() server.warpMe(elem) closeWindow(wnd) end, false ) end end local x, y = getElementPosition(elem) x = math.floor((x + 3000) * g_MapSide / 6000) - 4 y = math.floor((3000 - y) * g_MapSide / 6000) - 4 guiSetPosition(player.gui.mapBlip, x, y, false) guiSetPosition(player.gui.mapLabelShadow, x + 14, y - 4, false) guiSetPosition(player.gui.mapLabel, x + 13, y - 5, false) end end @Walid I was going to say the same lines 15 - guiLabelSetColor(player.gui.mapLabelShadow, r, g, b) 18 - guiLabelSetColor(player.gui.mapLabel, 0, 0, 0)
SpoC^ Posted May 28, 2015 Posted May 28, 2015 this function is on freeroam in fr_client ... you searched for?
SpoC^ Posted May 28, 2015 Posted May 28, 2015 Stir in java color Example 18 - guiLabelSetColor(player.gui.mapLabel, 255, 255, 255)
-Doc- Posted May 28, 2015 Author Posted May 28, 2015 I tested it few hours ago and it worked but anyway thx for help My scripting skills
-Doc- Posted June 30, 2015 Author Posted June 30, 2015 On name i made. At blip i tried and not working. My scripting skills
-Doc- Posted July 1, 2015 Author Posted July 1, 2015 I need help to fix that code anyone? My scripting skills
-Doc- Posted July 2, 2015 Author Posted July 2, 2015 Help i wanna make same at blip but not working. My scripting skills
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