Jump to content

bar exp


manawydan

Recommended Posts

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

Link to comment

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) 

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