Jump to content

GetPlayerMoney on dxtext ?


novo

Recommended Posts

Thanks evil <3

So the full code, must be like this:

addEventHandler("onClientRender",root, 
function () 
local x,y = guiGetScreenSize() 
      dxDrawText("Your money: ".. tostring(getPlayerMoney(localPlayer)),150,130,x,y,tocolor(255,255,255)) 
end) 

Answer plz :D

Thx all <3

PD: Sorry for my bad english :/

Link to comment
addEventHandler("onClientRender",root, 
function () 
local x,y = guiGetScreenSize() 
      dxDrawText("Your money: ".. tostring(getPlayerMoney(localPlayer)),150*x,130*y,150*x,150*y,tocolor(255,255,255)) 
end) 

I think this works, not sure.

it sure does not.

as im not aware what is OP trying to do i cant help too

Link to comment

division is "/" you make a big s**** whit 150*x the x of scrren is 1024*150 i don't think you have 153600 pixels on your screen

you have only (1024 or littel more but 100% sure not 153600)

use x/2 y/2 this will draw the text in the midel of screen use another numbers in place of 2 to draw it where you want

Link to comment

I've test it and it worked. But i want to use the money from race_starter_pack. Hmm, i've opened the "registry.db" and it looks like money are in the MoneyB table, under Money field. When i press TAB under the Money column it shows correct value. How can i make getPlayerMoney(thePlayer) has that money ?

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