Jump to content

ElementData in GUI?


bamby12

Recommended Posts

If you mean with concatenation than try this..

function experience() 
  
GUIEditor_Window = {} 
GUIEditor_Label = {} 
-- 
local experience = getElementData(getLocalPlayer(),"experience") -- replace the name of key with yours 
GUIEditor_Window[1] = guiCreateWindow(481,178,579,367,"Experience Panel",false) 
GUIEditor_Label[1] = guiCreateLabel(27,45,125,25,"Experience:" ..experience,false,GUIEditor_Window[1]) -- here' s the concatenation  
guiLabelSetColor(GUIEditor_Label[1],255,255,255) 
guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") 
guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) 
end 
addEventHandler("onClientResourceStart", getRootElement(), experience) 

Not sure if this works and I dont know if you mean this. :roll:

Link to comment

hmm i made this but it dosnt work.

  
if XP == 25 then 
                    setElementData ( attacker, "Level:", 2) 
                    outputChatBox ( attacker, "You Are Now Level 2!", 0,255,0) 
                    end 
                    if XP == 75 then 
                    setElementData ( attacker, "Level:", 3) 
                    outputChatBox ( attacker, "You Are Now Level 3!", 0,255,0) 
                    end 
                    if XP == 150 then 
                    setElementData ( attacker, "Level:", 4) 
                    outputChatBox ( attacker, "You Are Now Level 4!", 0,255,0) 
                    end 
                    if XP == 300 then 
                    setElementData ( attacker, "Level:", 5) 
                    outputChatBox ( attacker, "You Are Now Level 5!", 0,255,0) 
                    end 
                    if XP == 425 then 
                    setElementData ( attacker, "Level:", 6) 
                    outputChatBox ( attacker, "You Are Now Level 6!", 0,255,0) 
                    end 
                    if XP == 650 then 
                    setElementData ( attacker, "Level:", 7) 
                    outputChatBox ( attacker, "You Are Now Level 7!", 0,255,0) 
                    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...