lpdc99 Posted May 20, 2013 Share Posted May 20, 2013 Yo quiero cambiarle el tamaño de letra y color y no se como me pueden ayudar Link to comment
lpdc99 Posted May 20, 2013 Author Share Posted May 20, 2013 asi es como lo tengo pero quiero hacer mas chiquitas las letras asi se vea bien el radar el hud -----------------Spectators local player = getLocalPlayer() local root = getRootElement () local Spectators = {} setElementData ( player, "Spectator", "" ) local scrX, scrY = guiGetScreenSize() repair=true ------------------ function start () setTimer ( checkTarget, 1000, 0 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(), start ) ------------------ function checkTarget ( ) local target = getCameraTarget () local car = getPedOccupiedVehicle ( player ) if not ( car ) then car = "noCar" end if ( target ) then setElementData ( player, "Spectator", target ) else setElementData ( player, "Spectator", "" ) end Spectators = {} for i,v in ipairs( getElementsByType ( "player" ) ) do if ( v ~= player ) then local vTarget = getElementData ( v, "Spectator" ) if ( vTarget == car ) then table.insert(Spectators,v) end end end end ------------------ g_Root = getRootElement() g_ResRoot = getResourceRootElement(getThisResource()) g_Me = getLocalPlayer() g_ArmedVehicleIDs = table.create({ 425, 447, 520, 430, 464, 432 }, true) g_WaterCraftIDs = table.create({ 539, 460, 417, 447, 472, 473, 493, 595, 484, 430, 453, 452, 446, 454 }, true) g_ModelForPickupType = { nitro = 2221, repair = 2222, vehiclechange = 2223 } g_HunterID = 425 g_NextMap = "Random" g_Checkpoints = {} g_Pickups = {} g_VisiblePickups = {} g_Objects = {} function setNextMap ( mapname ) g_NextMap = mapname end addEvent ( "setNextMap", true ) addEventHandler ( "setNextMap", getRootElement(), setNextMap ) function math.round(number, decimals, method) decimals = decimals or 0 local factor = 10 ^ decimals if (method == "ceil" or method == "floor") then return math[method](number * factor) / factor else return tonumber(("%."..decimals.."f"):format(number)) end end function setNextNil ( dis ) g_NextMap = "Random" end addEvent ( "setNextNil", true ) addEventHandler ( "setNextNil", getRootElement(), setNextNil ) function hudSet () local screenWidth, screenHeight = guiGetScreenSize() dxDrawColorText ('Siguiente: ' .. g_NextMap, 2+1, screenHeight - dxGetFontHeight(1, 'bankgothic')/2+1, 100+1, 100+1, tocolor ( 0, 0, 0, 255 ), 0.6, 'bankgothic', 0.6, 'left') dxDrawColorText ('#FF9900Siguiente: #555555' .. g_NextMap, 2, screenHeight - dxGetFontHeight(1, 'bankgothic')/2, 100, 100, tocolor ( 255, 255, 255, 255 ), 0.6, 'bankgothic', 0.6, 'left') if (g_MapInfo) then dxDrawColorText ('Mapa: ' .. g_MapInfo.name, 2+1, screenHeight - dxGetFontHeight(2, 'bankgothic')/2+1, 100+1, 100+1, tocolor ( 0, 0, 0, 255 ), 0.6, 'bankgothic', 0.6, 'left') dxDrawColorText ('#FF9900Mapa: #555555' .. g_MapInfo.name, 2, screenHeight - dxGetFontHeight(2, 'bankgothic')/2, 100, 100, tocolor ( 255, 255, 255, 255 ), 0.6, 'bankgothic', 0.6, 'left') else dxDrawColorText ('Mapa: N/A', 2+1, screenHeight - dxGetFontHeight(2, 'bankgothic')/2.1, 100, 100, tocolor ( 0, 0, 0, 255 ), 0.6, 'bankgothic', 0.6, 'left') dxDrawColorText ('#FF9900Mapa: #555555Random', 2, screenHeight - dxGetFontHeight(2, 'bankgothic')/2+1, 100+1, 100+1, tocolor ( 255, 255, 255, 255 ), 0.6, 'bankgothic', 0.6, 'left') end dxDrawColorText ('Púlico: ' .. #Spectators, 2+1, screenHeight - dxGetFontHeight(3, 'bankgothic')/2+1, 100+1, 100+1, tocolor ( 0, 0, 0, 255 ), 0.6, 'bankgothic', 0.6, 'left') dxDrawColorText ('#FF9900Público: #555555' .. #Spectators, 2, screenHeight - dxGetFontHeight(3, 'bankgothic')/2, 100, 100, tocolor ( 255, 255, 255, 255 ), 0.6, 'bankgothic', 0.6, 'left') end Link to comment
Zoon Posted May 20, 2013 Share Posted May 20, 2013 Yo quiero cambiarle el tamaño de letra y color y no se como me pueden ayudar que tamaño de letra? mas grande o mas pequeño y que color deberias ser especifico Link to comment
BorderLine Posted May 20, 2013 Share Posted May 20, 2013 despues del argumento del color viene el tamaño. en ese caso en tus argumentos es 0.6.. ponele 0.7 o mas Link to comment
lpdc99 Posted May 21, 2013 Author Share Posted May 21, 2013 Yoo lo quiero hacer mas chiquito Link to comment
lpdc99 Posted May 21, 2013 Author Share Posted May 21, 2013 Si lo quiero poner mas chiquito pongo 0.5 o 0.7 ? Link to comment
lpdc99 Posted May 21, 2013 Author Share Posted May 21, 2013 Listo logre hacerlos mas chiquito ahora quiero ponerlo mas abajito a cada uno asi no tapen el radar como lo hago ? Link to comment
lpdc99 Posted May 21, 2013 Author Share Posted May 21, 2013 Listo lo solucione ahora viene otro problema quiero que cuando compre un mapa o ponga next mapa me aparezca abajo el next no que siga apareciendo random o que no aparezca nada me ayudan por favor Link to comment
BorderLine Posted May 21, 2013 Share Posted May 21, 2013 Evita el CUATRUPLEPOST y usa el boton EDIT. Lo del nextmap, busca en el foro.. hay al menos 1000 posteos sobre ese tema.... Link to comment
Bc# Posted May 21, 2013 Share Posted May 21, 2013 screenHeight - dxGetFontHeight(3, 'bankgothic')/2 Esa es la pocision en el eje Y, podrias cambiarlo a algo mas simple como: screenHeight - 10 el 10 corresponde a la distancia que estara de abajo hacia arriba si quieres que el tecto este un poco mas arriba solo le subes al numero pero tendras como limite el tamaño de la resolucion que estes usando. Link to comment
Bc# Posted May 22, 2013 Share Posted May 22, 2013 Tienes que leer los argumentos que usas en dxDrawColorText Yep aca esta el link por si no sabes como encontrarlo: https://wiki.multitheftauto.com/wiki/DxDrawColorText Link to comment
Castillo Posted May 22, 2013 Share Posted May 22, 2013 dxDrawColorText ya no es necesaria, dxDrawText ahora soporta colores HEX, y es mas eficiente. Link to comment
lpdc99 Posted May 22, 2013 Author Share Posted May 22, 2013 Pero ustedes no me entendieron parece lo que yo quiero es cuando se compre un mapa se ponga el siguiente mapa ahi abajo entienden ? Link to comment
Castillo Posted May 22, 2013 Share Posted May 22, 2013 Vas a tener que editar como sea que cambias el proximo mapa, asi tambien cambias el texto ese. Link to comment
Bc# Posted May 22, 2013 Share Posted May 22, 2013 Pero ustedes no me entendieron parece lo que yo quiero es cuando se compre un mapa se ponga el siguiente mapa ahi abajo entienden ? Eso lo preguntaste en otro post, acá estabas preguntando otra cosa. Link to comment
Recommended Posts