Jump to content

bar exp


manawydan

Recommended Posts

Posted
local x,y = guiGetScreenSize() 
function drawbar(thePlayer) 
local level = exports.exp_system:getPlayerLevel ( thePlayer ) 
local Name, Expreq = exports.exp_system:getLevelData ( level ) 
dxDrawRectangle ( x/4.59, y/100, x/2.2, y/12, tocolor ( 0, 0, 150, 150 ) ) 
dxDrawText ( "Exp: Name, Expreq ", x/4.59, y/95, x, y, tocolor ( 0, 222, 10, 255 ), 1, "bankgothic" ) 
end 
addEventHandler("onClientRender", root, drawbar) 

the exp not appear

560x95_FFFFFF_09FF00_050505_000000.png

"Querer não é poder, mas tentar é avançar"!

Posted
dxDrawText ( "Exp: "..Name..", "..Expreq, x/4.59, y/95, x, y, tocolor ( 0, 222, 10, 255 ), 1, "bankgothic" ) 

Please do not PM me with scripting related question nor support, use the forums instead.

Posted

try this:

local x,y = guiGetScreenSize() 
addEventHandler("onClientRender", root, function()--nothing is returned 
local level = exports.exp_system:getPlayerLevel ( localPlayer)--thePlayer isn't defined, use localplayer 
local Name, Expreq = exports.exp_system:getLevelData ( level ) 
dxDrawRectangle ( x/4.59, y/100, x/2.2, y/12, tocolor ( 0, 0, 150, 150 ) ) 
dxDrawText ( "Exp: "..Name..", "..Expreq, x/4.59, y/95, x, y, tocolor ( 0, 222, 10, 255 ), 1, "bankgothic" ) --Added name and Expreg 
end) 

My in-game name: Jaysds1

Retired CMG Scripter

World Of Tanks GameMode (Open-Source): https://github.com/Jaysds1/mtasa-wot-gamemode

Online GUI-Editor (WIP): https://forum.mtasa.com/topic/47678-online-gui-editor/

 

sE5Qm.png

TiV3C.png

img.php?id=0&text=Lua%20Scripter

Posted

That won't work because my "exp_system" has no client side exported functions.

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.

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