Jump to content

Cambio de tamaño de letra


lpdc99

Recommended Posts

Posted

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 
  

Posted
Yo quiero cambiarle el tamaño de letra y color y no se como :( me pueden ayudar

thump_2069477sin-ttulo.png

que tamaño de letra? mas grande o mas pequeño y que color deberias ser especifico

Posted

Listo logre hacerlos mas chiquito ahora quiero ponerlo mas abajito a cada uno asi no tapen el radar :D como lo hago ?

Posted

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 :D

Posted
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.

Posted

Pero ustedes no me entendieron parece lo que yo quiero es cuando se compre un mapa se ponga el siguiente mapa ahi abajo entienden ?

Posted
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...