Jump to content

استفسار صعب شوي


Recommended Posts

السلام عليكم ورحمة الله وبركاته

عندي استفسار

انا مسوي 2 رو

ابي الي معه داتا اسمها data1

يجي تحت الرو الاول

اسامي الي معهم داتا

علما بانه الاسامي تجي تحت الرو الاول وفوق الرو الثاني عشان م يختلطن

وهكذا

,,,,

 

بانتظار ردودكمــ

شكرا مقدماً

Link to comment
function loadPlayers()
	for index, value in ipairs(getElementsByType("player")) do
		local Row = guiGridListAddRow(GridList)
		if getElementData(value, "data1") then
			guiGridListSetItemText(GridList, Row, 1, getPlayerName(value), false, false)
			guiGridListSetItemColor(GridList, Row, 1, 255, 255, 0)
		else
			guiGridListSetItemText(GridList, Row, 2, getPlayerName(value), false, false)
			guiGridListSetItemColor(GridList, Row, 2, 0, 255, 0)
		end
	end
end

 

  • Like 1
Link to comment
?
function loadPlayers()
	for index, value in ipairs(getElementsByType("player")) do
		local Row = guiGridListAddRow(GridList)
		if getElementData(value, "data1") then
			guiGridListSetItemText(GridList, Row, 1, getPlayerName(value), false, false)
			guiGridListSetItemColor(GridList, Row, 1, 255, 255, 0)
		elseif getElementData(value, "data2") then
			guiGridListSetItemText(GridList, Row, 2, getPlayerName(value), false, false)
			guiGridListSetItemColor(GridList, Row, 2, 0, 255, 0)
		end
	end
end

هذي الطريقه افضل لو حبيت تضيف اكثر من داتا 

الكود حق الاخ

@#Skrillex

 

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