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