Jump to content

Dx Font doesnt work


iFoReX

Recommended Posts

why Dx Font Doesnt work ?, appear default font D:

  
zKills = "-" 
Rank = "-" 
  
function hideIt(Kills,Ranks) 
     zKills = Kills 
     Rank = Ranks 
end 
addEvent("lolEvent",true) 
addEventHandler("lolEvent",root,hideIt) 
  
addEventHandler("onClientRender", root, 
    function() 
    local font_0 = dxCreateFont( ":guieditor/fonts/PetitFormalScript.ttf", 10 ) 
        dxDrawText("#48FF00##2E2E2EZombie Kills : #48FF00#"..tostring(zKills).." \n#48FF00##2E2E2ERango : #48FF00#"..tostring(Rank), 437, 403, 547, 442, tocolor(0, 255, 251, 255), 1, font_0, "left", "center", false, false, true, true, false) 
    end 
) 
  

function onZombieWasted(_,killer) 
    if (killer) then 
        if (getElementType(killer) == "player") and (getElementType(source) == "ped") then 
            if (getElementData(source, "zombie") == true) then 
                local account = getPlayerAccount(killer) 
                if account and not isGuestAccount(account) then 
                    local Kills = getAccountData(account,"Zombie kills") 
                    local Ranks = getAccountData(account,"Rango") 
                    triggerClientEvent("lolEvent",killer,Kills,Ranks) 
                end 
            end 
        end 
    end 
end 
addEventHandler("onPedWasted", root, onZombieWasted) 

Link to comment

Is the guieditor resource running? When you are using relative file paths like that (file paths that start with :resourceName/...) to point to a font, the resource it references needs to be running for the path to work (in this case, guieditor). To avoid that just copy the font to your local resource folder and reference it there instead

If that doesn't work, output the value of font_0 and see what it is

Link to comment
  • 3 weeks later...

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