Hi All
i am trying to make a top10 script for my server
it is show the top10 by His EXP
but i dont know how to start
i make the gui
this is the client code
top_window = guiCreateWindow(248,95,417,409,"TOP 10 ",false)
top_grid = guiCreateGridList(9,25,399,333,false,top_window)
guiGridListSetSelectionMode(top_grid,2)
guiGridListAddColumn(top_grid,"Player Name",0.2)
guiGridListAddColumn(top_grid,"EXP",0.2)
guiGridListAddColumn(top_grid,"Lvl",0.2)
guiGridListAddColumn(top_grid,"RANK",0.2)
close_ = guiCreateButton(106,363,224,31,"CLOSE",false,top_window)
function ShowTheGui()
if (guiGetVisible(top_window) == true) then
guiSetVisible(top_window, false)
showCursor(false)
else
guiSetVisible(top_window, true)
showCursor(true)
end
end
bindKey("F2","down",ShowTheGui)
function CloseTheGui (button, state, absoluteX, absoluteY)
if (source == close_) then
guiSetVisible (top_window, false)
showCursor(false)
end
end
addEventHandler ("onClientGUIClick", getRootElement(), CloseTheGui)
and this is the AccountData
local ExpData = getAccountData (account, "exp")
local LevelData = getAccountData (account, "level")
local RankData = getAccountData (account, "rank")
EDIT :
And this with ElementData
theExp = getElementData(source, "EXP")
theRank = getElementData(source, "Rank")
theNext = getElementData(source, "NEXT")
i dont know how to make it