Jump to content

HUD issues


Gabi_Killah

Recommended Posts

Posted
Hi, I needed to know if someone could help me with a problem I have with a HUD that I put inside my server, the problem is that it doesn't mark the money I have in the bank and I tried to edit the line but it's still the same. Could someone help me?
Posted
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

 

Posted
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

Posted
On 01/09/2022 at 14:51, HireAmine said:

in line 7 you should put Dinheiro_Banco instead of Banco

I already did it, the money appears but it does not mark the money you have in the bank, what do I do there?

 

Posted

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

 

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