Jump to content

How getElementData and show it in a label?


Tony Brand

Recommended Posts

Hi,i want to make a gui stats panel
this is the code made by GUIEditor resource!
 

--[[-------------------------------------------------
Notes:

> This code is using a relative image filepath. This will only work as long as the location it is from always exists, and the resource it is part of is running.
    To ensure it does not break, it is highly encouraged to move images into your local resource and reference them there.
--]]-------------------------------------------------


GUIEditor = {
    tab = {},
    staticimage = {},
    tabpanel = {},
    label = {},
    window = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
    function()
        GUIEditor.window[1] = guiCreateWindow(124, 77, 1135, 638, "", false)
        guiWindowSetSizable(GUIEditor.window[1], false)

        GUIEditor.staticimage[1] = guiCreateStaticImage(9, 9, 1107, 619, "Data/Images/back.png", false, GUIEditor.window[1])

        GUIEditor.tabpanel[1] = guiCreateTabPanel(0, 11, 1107, 608, false, GUIEditor.staticimage[1])

        GUIEditor.tab[1] = guiCreateTab("Stats", GUIEditor.tabpanel[1])

        GUIEditor.label[1] = guiCreateLabel(34, 76, 222, 31, "Name: ..getPlayerName(localPlayer)", false, GUIEditor.tab[1])
        guiLabelSetColor(GUIEditor.label[1], 254, 0, 0)
        GUIEditor.label[2] = guiCreateLabel(34, 135, 222, 35, "Level", false, GUIEditor.tab[1])

    end
)

for Second Label called Level i need to get player level with  getElementData and put it after Level: ,any help plz?

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