Jump to content

Dx Font doesnt work


iFoReX

Recommended Posts

Posted

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) 

elMota/elFoReX De Vuelta En MTA *---------*

Cuenta De Youtube En La Que Subo Tutoriales Acerca De MTA :3

https://www.youtube.com/user/KillersGPs

430x73_FFFFFF_FF9900_000000_000000.png
Posted
local font_0 = dxCreateFont( ":guieditor/fonts/PetitFormalScript.ttf", 10 ) 

That must go outside the onClientRender event.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

Are you sure that the font is valid and it's correctly created?

P.S: Keep it english only on this section.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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

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