Jump to content

[HELP] comboBox - gridList - AccountData - ElementData


Recommended Posts

I created a combo box and sent the selected data from the drop-down box to the server to learn the score of the player's money and then send and write the processor.

im not speak english im sorry :/ Google Translate

 


        sekmeler = guiCreateTabPanel(0, 30, 680, 490, false, pencere)

        sekme1 = guiCreateTab("İstatistik", sekmeler)
        playerStats = guiCreateComboBox(10, 10, 165, 175, "", false, sekme1)
		for id, player in ipairs(getElementsByType("player")) do
			guiComboBoxAddItem(playerStats, getPlayerName(player):gsub('#%x%x%x%x%x%x', ''))
		end
		puan = guiCreateLabel(225, 15, 150, 30, "1. Sıra: nil", false, sekme1)
		guiSetFont(sira1, "sans")
		para = guiCreateLabel(225, 45, 150, 30, "2. Sıra: nil", false, sekme1)
		guiSetFont(sira2, "sans")

addEventHandler("onClientGUIClick", getRootElement(),
function()
	if source == playerStats and guiComboBoxGetItemText(playerStats,guiComboBoxGetSelected(playerStats)) ~= "" then
		secilenOyuncu = guiComboBoxGetItemText(playerStats,guiComboBoxGetSelected(playerStats))
		triggerServerEvent("tıklandı", getLocalPlayer(), secilenOyuncu)
	end
end)

function oyuncuListesiTiklandi(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9)
	guiSetText(puan, arg1)
	guiSetText(para, arg2)
	guiSetText(kazanma, arg3)
	guiSetText(olme, arg4)
	guiSetText(plyZar, arg6)
	guiSetText(winZar, arg7)
	guiSetText(plyBet, arg8)
	guiSetText(winBet, arg9)
end
addEvent("dataçek", true)
addEventHandler("dataçek", root, oyuncuListesiTiklandi)
addEvent("tıklandı",true)
addEventHandler("tıklandı",root,
function(secilenOyuncu)
	current_account = getPlayerAccount(secilenOyuncu)
	account = getAccountName(current_account)
	puan = tonumber(getElementData(current_account, "Points") or 0)
	cash = tonumber(getElementData(current_account, "Para") or 0)
	win = tonumber(getAccountData(account, "kazanma") or 0)
	die = tonumber(getAccountData(account, "kaybetme") or 0)
	killed = tonumber(getAccountData(account, "oldurme") or 0)
	tZar = tonumber(getAccountData(account, "totalZar") or 0)
	wZar = tonumber(getAccountData(account, "winZar") or 0)
	tBet = tonumber(getAccountData(account, "totalBet") or 0)
	wBet = tonumber(getAccountData(account, "winBet") or 0)
	triggerClientEvent(source,"dataçek",source,puan,cash,win,die,killed,tZar,wZar,tBet,wBet)
end)

 

Link to comment
addEventHandler("onClientResourceStart", root,
  function()
    pencere = guiCreateWindow(450, 450, 750, 550, "panel", false)
    
    sekmeler = guiCreateTabPanel(0, 30, 680, 490, false, pencere)
    
    sekme1 = guiCreateTab("İstatistik", sekmeler)
    playerStats = guiCreateComboBox(0, 10, 150, 120, "", false, sekme1)
    
    sira1 = guiCreateLabel(225, 15, 150, 30, "1. Sıra: nil", false, sekme1)
	guiSetFont(sira1, "sans")
	sira2 = guiCreateLabel(225, 45, 150, 30, "2. Sıra: nil", false, sekme1)
	guiSetFont(sira2, "sans")
	sira3 = guiCreateLabel(225, 75, 150, 30, "3. Sıra: nil", false, sekme1)
	guiSetFont(sira3, "sans")
    
    sekme3 = guiCreateTab("Top list", sekmeler)
    dataList = guiCreateComboBox(10, 10, 400, 175, "Bir Veri Seçiniz...", false, sekme3)
    playerList = guiCreateComboBox(415, 10, 260, 175, "Oyuncu Türü Seçiniz...", false, sekme3)
	pzisyon = guiCreateLabel(15, 40, 50, 25, "Pozisyon", false, sekme3)
	isim = guiCreateLabel(195, 40, 50, 25, "İsim", false, sekme3)
	data = guiCreateLabel(390, 40, 50, 25, "Veri", false, sekme3)
  end
)

The active players will appear. (playerStats)

Writing after selected.

Both active players, the highest players. (playerList)

Writing after selected.

The money in the vote will be selected in points. (dataList)

Writing after selected.

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