Jump to content

HUD issues


Gabi_Killah

Recommended Posts

3 hours ago, HireAmine said:

can you send us the code
to check where is the problem

        local Dinheiro = getPlayerMoney(localPlayer) 
        local Dinheiro_Banco = getElementData ( localPlayer, "Bank:Royal" ) or 0
        
        local Emprego = getElementData(localPlayer, "Emprego") or "DESEMPREGADO"

        dxDrawText ((Dinheiro), (screenWidth-72)-95-posX, posY+9, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, MONEYFONT)
        dxDrawText ((Banco), (screenWidth+26)-95-posX, posY+9, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, MONEYFONT)
        
        --dxDrawText ((Emprego), (screenWidth-90)-95-posX, posY-70, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, EMPREGOFONT, "center", "top", false, false, false, false, false)
end

 

Esa es la linea del banco y no se que esta mal y no me funciona

 

Link to comment
8 hours ago, Gabi_Killah said:

        local Dinheiro = getPlayerMoney(localPlayer) 
        local Dinheiro_Banco = getElementData ( localPlayer, "Bank:Royal" ) or 0
        
        local Emprego = getElementData(localPlayer, "Emprego") or "DESEMPREGADO"

        dxDrawText ((Dinheiro), (screenWidth-72)-95-posX, posY+9, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, MONEYFONT)
        dxDrawText ((Banco), (screenWidth+26)-95-posX, posY+9, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, MONEYFONT)
        
        --dxDrawText ((Emprego), (screenWidth-90)-95-posX, posY-70, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 1, EMPREGOFONT, "center", "top", false, false, false, false, false)
end

 

Esa es la linea del banco y no se que esta mal y no me funciona

 

Your variable name is "Dinheiro_Banco" but you have "Banco" in the DrawText. If it won't work like this you may check the elementData's name is correct

Link to comment

I found the sulotion, the error is that you are drawing number, not text, and to turn number to string use: tostring( your varuable )

like in get player money it will return number not string, and with your bank money too and any string

because if you want to draw anything or outputChatBox it needs string, it cannot show number.

I hope you understand!

tell me if it works

 

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