Jump to content

كود بسيط جدا


momar5600

Recommended Posts

function RefreshGridlist ( aElement , Col )
if ( getElementType ( aElement ) == "gui-gridlist" ) then
guiGridListClear ( aElement )
Col = Col or 1
for i,v in ipairs ( getElementsByType("player") ) do
local aRow = guiGridListAddRow ( aElement )
guiGridListSetItemText ( aElement , aRow , Col , getPlayerName ( v ) , false , false )
end
end
end

تفضل

Link to comment
8 hours ago, mahmod3 said:

function RefreshGridlist ( aElement , Col )
if ( getElementType ( aElement ) == "gui-gridlist" ) then
guiGridListClear ( aElement )
Col = Col or 1
for i,v in ipairs ( getElementsByType("player") ) do
local aRow = guiGridListAddRow ( aElement )
guiGridListSetItemText ( aElement , aRow , Col , getPlayerName ( v ) , false , false )
end
end
end

تفضل

 

متأكد ان اكوادك نفس طلبه ؟

Link to comment
8 hours ago, mahmod3 said:

function RefreshGridlist ( aElement , Col )
if ( getElementType ( aElement ) == "gui-gridlist" ) then
guiGridListClear ( aElement )
Col = Col or 1
for i,v in ipairs ( getElementsByType("player") ) do
local aRow = guiGridListAddRow ( aElement )
guiGridListSetItemText ( aElement , aRow , Col , getPlayerName ( v ) , false , false )
end
end
end

تفضل

-.- هذا يسوي ريفرش للقريد ليست  مو بحث -.-

Link to comment

ماهو ا الخطا هنا

addEventHandler("onClientResourceStart",resourceRoot,
function()
guiGridListSetSelectionMode( getControl( wndWarp, 'playerlist' ),2)
local column = guiGridListAddColumn( getControl( wndWarp, 'playerlist' ), "Player Name", 0.89 )
if ( column ) then
for id, player in ipairs(getElementsByType("player")) do
 local row = guiGridListAddRow ( getControl( wndWarp, 'playerlist' ) )
  guiGridListSetItemText ( getControl( wndWarp, 'playerlist' ), row, column, getPlayerName(player), false, false )
guiGridListSetItemColor ( getControl( wndWarp, 'playerlist' ), row, column, 0, 250, 154, 255 )
  end
  addEventHandler ( "onClientGUIClick", playerlist, click )
 end
end)
function click ()
local playerName = guiGridListGetItemText ( getControl( wndWarp, 'playerlist' ), guiGridListGetSelectedItem ( playerlist ), 1 )
guiSetText ( getControl( wndWarp, '~|بحث عن لاعب|~' ), playerName )
end
function list()
 guiGridListClear( getControl( wndWarp, 'playerlist' ) )
 for id, players in ipairs (getElementsByType("player")) do
  local row = guiGridListAddRow( getControl( wndWarp, 'playerlist' ) )
  guiGridListSetItemText( getControl( wndWarp, 'playerlist' ), row, 1, getPlayerName(players), false, false)
  guiGridListSetItemColor ( getControl( wndWarp, 'playerlist' ), row, 1, 0, 250, 154, 255 )
 end
end
addEventHandler("onClientPlayerJoin", getRootElement(), list)
addEventHandler("onClientPlayerQuit", getRootElement(), list)
addEventHandler("onClientPlayerChangeNick", getRootElement(), list)

wndWarp = {
	'wnd',
	text = 'الانتقال الى الاعبين',
	width = 246,
	controls = {
		{
			'lst',
			id='playerlist',
			width=231,
			x = 5,
			 y= 62,
			height=343,
			columns={
				{id='sharplayercol', text='الاعب', attr='name'}
			},
			onitemdoubleclick=warpTo
		},
		{'br'},
		{'txt', id='sharplayer', text='~|بحث عن لاعب|~', onclick=click , x = 16, y= 23 ,width = 222},
		{'br'},
		{'btn', id='انتقال', onclick=warpTo},
		{'btn', id='اغلاق', closeswindow=true}
	},
	oncreate = warpInit
}

 

مممكن مساعدة 

Link to comment
29 minutes ago, momar5600 said:

اوف انا ماقلت اجبركم علشان ترردون علي ¬¬

وبعدين انتم ليه مسوين المنتدي مو علشان تساعدونا

 

اجل وش تسمي ردودك المتكرره ؟

وصحيح ان المنتدي للمساعده ولكن متي ماحسيت انك مروق تجي تساعد

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