manawydan Posted February 5, 2013 Posted February 5, 2013 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
HunT Posted February 5, 2013 Posted February 5, 2013 dxDrawText ( "Exp:" .. Name.. ", Expreq ", x/4.59, y/95, x, y, tocolor ( 0, 222, 10, 255 ), 1, "bankgothic" )
DNL291 Posted February 5, 2013 Posted February 5, 2013 dxDrawText ( "Exp: "..Name..", "..Expreq, x/4.59, y/95, x, y, tocolor ( 0, 222, 10, 255 ), 1, "bankgothic" )
guix Posted February 6, 2013 Posted February 6, 2013 Hello, Press F8, type "debugscript 3" to see if there are errors such as level, Name or Expreq being nil.
Jaysds1 Posted February 6, 2013 Posted February 6, 2013 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)
Castillo Posted February 6, 2013 Posted February 6, 2013 That won't work because my "exp_system" has no client side exported functions.
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