Matevsz Posted October 20, 2014 Share Posted October 20, 2014 Hi, I want to change the look of money for example. $ 000.000.00 how to do it? I've tried something but I can not Link to comment
Matevsz Posted October 20, 2014 Author Share Posted October 20, 2014 I do not mean to give a player money just by changing the appearance, for example. shaders or any dxDraw but unfortunately can not do that and please help Link to comment
joaosilva099 Posted October 20, 2014 Share Posted October 20, 2014 No @blinker You should use convertNumber function. Find it on the wiki page Link to comment
Blinker. Posted October 20, 2014 Share Posted October 20, 2014 Ah , sorry , thought u wanted to change the amount of money. Link to comment
.:HyPeX:. Posted October 20, 2014 Share Posted October 20, 2014 No @blinkerYou should use convertNumber function. Find it on the wiki page You're still going wrong. convertNumber is related to other stuff. You should yeah use a dxDraw, what is that it stops you from not doing so? Link to comment
joaosilva099 Posted October 21, 2014 Share Posted October 21, 2014 Yes it is @Hypex! He wanna format the number with dots in million and thousan numbers. That function should do.that! Then he has to draw with dx but to formAt is convertNumber Link to comment
Moderators IIYAMA Posted October 21, 2014 Moderators Share Posted October 21, 2014 @Matevsz If you don't understand shaders, make it with dx as the other guys say. Now please post your code. (after your wrote it...) [url=https://wiki.multitheftauto.com/wiki/DxDrawText]https://wiki.multitheftauto.com/wiki/DxDrawText[/url] [url=https://wiki.multitheftauto.com/wiki/OnClientRender]https://wiki.multitheftauto.com/wiki/OnClientRender[/url] [url=https://wiki.multitheftauto.com/wiki/DxSetAspectRatioAdjustmentEnabled]https://wiki.multitheftauto.com/wiki/Dx ... entEnabled[/url] [url=https://wiki.multitheftauto.com/wiki/ShowPlayerHudComponent]https://wiki.multitheftauto.com/wiki/Sh ... dComponent[/url] [url=https://wiki.multitheftauto.com/wiki/GetPlayerMoney]https://wiki.multitheftauto.com/wiki/GetPlayerMoney[/url] [url=https://wiki.multitheftauto.com/wiki/GuiGetScreenSize]https://wiki.multitheftauto.com/wiki/GuiGetScreenSize[/url] I gave you everything you need, try the code yourself. Don't start crying that you can't try it, because you will end up in my foes group and you won't get help from me any more. Link to comment
#RooTs Posted October 21, 2014 Share Posted October 21, 2014 try this function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end local money = getPlayerMoney(getLocalPlayer()) dxDrawText("R$: "..convertNumber(money), x*0.827, y*0.150, x*800, y*030, tocolor(255, 255, 255,255), 0.7, "bankgothic", "left", "top", false, false, true, false, false) Look hud Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now