Jump to content

font problems :S


SnoopCat

Recommended Posts

hey guys i was trying to change font to my speedo but when i started script speedo disapeared :S

idk what im doing wrong...

look this is my script:

Client gui.lua

urfont = guiCreateFont( "urfont.ttf", 13 ) 
urfont = dxCreateFont("urfont.ttf",13) 
g_GuiLabel = { } 
local x, y = guiGetScreenSize () 
  
local localPlayer = getLocalPlayer() 
  
function GuiShow() 
    if g_Settings.Visible then 
        g_GuiLabel.Speed:visible(true) 
        g_GuiLabel.Unit:visible(true) 
        -- g_GuiLabel.Spec:visible(true) 
    end 
end 
addEventHandler("onClientScreenFadedIn", root, GuiShow) 
  
  
function GuiHide() 
    g_GuiLabel.Speed:visible(false) 
    g_GuiLabel.Unit:visible(false) 
    -- g_GuiLabel.Spec:visible(false) 
end 
addEventHandler("onClientScreenFadedOut", root, GuiHide) 
  
function GuiInitialize() 
    screenWidth, screenHeight = guiGetScreenSize() 
  
    g_GuiLabel.Speed = dxText:create("0", screenWidth-72, screenHeight - 70, false, urfont, 2, "right") 
    g_GuiLabel.Speed:type("stroke", 3, 0, 0, 0, 255) 
     
    g_GuiLabel.Unit = dxText:create("", screenWidth-64, screenHeight - 70, false, urfont, 1, "left") 
    g_GuiLabel.Unit:type("stroke", 2, 0, 0, 0, 255) 
    g_GuiLabel.Unit:color(255, 190, 0) 
     
    -- g_GuiLabel.Map = dxText:create("                      MAP:", 50, screenHeight - dxGetFontHeight(0.7, 'urfont')/2, false, urfont, 0.7, "right") 
    -- g_GuiLabel.Map:type("stroke", 2, 0, 0, 0, 255) 
     
        -- dxDrawText (s_Spectators, textX, textY, x, y, tocolor(255, 70, 0), 0.4, 'urfont' ,true) 
    -- g_GuiLabel.Spec = dxText:create(""..s_Spectators.."", screenWidth-130, screenHeight - 400, false, urfont, 0.7, "left") 
     
    -- g_GuiLabel.Spec:type("stroke", 2, 0, 0, 0, 255) 
    g_GuiLabel.GO = dxText:create(" ", 70, screenHeight - 350, false, urfont, 6, "left") 
    g_GuiLabel.GO:type("stroke", 5, 0, 0, 0, 255) 
    g_GuiLabel.GO:color(255, 0, 0) 
     
    GuiHide() 
end 
GuiInitialize() 
  
  
addEventHandler("onClientPlayerWasted", getLocalPlayer(), 
function() 
    g_GuiLabel.GO:text(" ") 
    local sound = playSound("fail.mp3", false) 
    setTimer ( resetTexte, 3000, 1) 
end) 
  
function resetTexte() 
g_GuiLabel.GO:text(" ") 
end 

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