Jump to content

Help Font.


iSpark

Recommended Posts

srfont = dxCreateFont("font.ttf",13) 
g_GuiLabel = { } 
  
function GuiShow() 
    if g_Settings.Visible then 
        g_GuiLabel.Speed:visible(true) 
        g_GuiLabel.Unit:visible(true) 
    end 
end 
addEventHandler("onClientScreenFadedIn", root, GuiShow) 
  
  
function GuiHide() 
    g_GuiLabel.Speed:visible(false) 
    g_GuiLabel.Unit:visible(false) 
end 
addEventHandler("onClientScreenFadedOut", root, GuiHide) 
  
  
function GuiInitialize() 
    local screenWidth, screenHeight = guiGetScreenSize() 
  
    g_GuiLabel.Speed = dxText:create("0", screenWidth-72, screenHeight - 36, false, "srfont", 2, "right") 
    g_GuiLabel.Speed:type("stroke", 3, 0, 0, 0, 255) 
    g_GuiLabel.Speed:color(0,170,255,255) 
     
    g_GuiLabel.Unit = dxText:create("", screenWidth-64, screenHeight - 28, false, "srfont", 1, "left") 
    g_GuiLabel.Unit:type("stroke", 2, 0, 0, 0, 255) 
    g_GuiLabel.Unit:color(255,255,255,255) 
     
    GuiHide() 
end 
GuiInitialize() 

Not Work im trying to Change the font but not work.

Link to comment
srfont = dxCreateFont("font.ttf",13) 
g_GuiLabel = { } 
  
function GuiShow() 
    if g_Settings.Visible then 
        g_GuiLabel.Speed:visible(true) 
        g_GuiLabel.Unit:visible(true) 
    end 
end 
addEventHandler("onClientScreenFadedIn", root, GuiShow) 
  
  
function GuiHide() 
    g_GuiLabel.Speed:visible(false) 
    g_GuiLabel.Unit:visible(false) 
end 
addEventHandler("onClientScreenFadedOut", root, GuiHide) 
  
  
function GuiInitialize() 
    local screenWidth, screenHeight = guiGetScreenSize() 
  
    g_GuiLabel.Speed = dxText:create("0", screenWidth-72, screenHeight - 36, false, srfont, 2, "right") 
    g_GuiLabel.Speed:type("stroke", 3, 0, 0, 0, 255) 
    g_GuiLabel.Speed:color(0,170,255,255) 
    
    g_GuiLabel.Unit = dxText:create("", screenWidth-64, screenHeight - 28, false, srfont, 1, "left") 
    g_GuiLabel.Unit:type("stroke", 2, 0, 0, 0, 255) 
    g_GuiLabel.Unit:color(255,255,255,255) 
    
    GuiHide() 
end 
GuiInitialize() 

Link to comment

the format file to fonts is "ttf" not tff .. fix it in meta

try this

srfont = dxCreateFont("font.ttf",13) 
g_GuiLabel = { } 
  
function GuiShow() 
    if g_Settings.Visible then 
        g_GuiLabel.Speed:visible(true) 
        g_GuiLabel.Unit:visible(true) 
    end 
end 
addEventHandler("onClientScreenFadedIn", root, GuiShow) 
  
  
function GuiHide() 
    g_GuiLabel.Speed:visible(false) 
    g_GuiLabel.Unit:visible(false) 
end 
addEventHandler("onClientScreenFadedOut", root, GuiHide) 
  
  
function GuiInitialize() 
    local screenWidth, screenHeight = guiGetScreenSize() 
  
    g_GuiLabel.Speed = dxText:create("0", screenWidth-72, screenHeight - 36, false, srfont, 2, "right") 
    g_GuiLabel.Speed:type("stroke", 3, 0, 0, 0, 255) 
    g_GuiLabel.Speed:color(0,170,255,255) 
    
    g_GuiLabel.Unit = dxText:create("", screenWidth-64, screenHeight - 28, false, srfont, 1, "left") 
    g_GuiLabel.Unit:type("stroke", 2, 0, 0, 0, 255) 
    g_GuiLabel.Unit:color(255,255,255,255) 
    
    GuiHide() 
end 
GuiInitialize() 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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