Jump to content

مساعده بالجريد ليست


Recommended Posts

سلام عليكم

 

عندي مشكله بالجريد ليست

 

انا مسوي row

والرو هذا ابي اسوي فيه الوان

يعني لو كلمة Open

تجي بالاخضر

Close تجي بالاحمر

 

بس المشكله ان الرو كله يتلون ببلون محدد واحد بس

Link to comment
2 minutes ago, +Source|> said:

سلام عليكم

 

عندي مشكله بالجريد ليست

 

انا مسوي row

والرو هذا ابي اسوي فيه الوان

يعني لو كلمة Open

تجي بالاخضر

Close تجي بالاحمر

 

بس المشكله ان الرو كله يتلون ببلون محدد واحد بس

إطرح أكوادك ,

Link to comment
Just now, DABL said:

إطرح أكوادك ,

addEventHandler( "onClientGUIClick", root,
	function()
	local ss = guiGridListGetSelectedItem( wrpGrid )
	local tt = guiGridListGetItemText( wrpGrid, ss, 2 )
	local nn = guiGridListGetItemText( wrpGrid, guiGridListGetSelectedItem( wrpGrid ), 2 )
	States = "Close"	
		if source == wrpLock then
			if ( ss ~= -1 ) then
				triggerServerEvent( "UpdateInGridPL_Lock", localPlayer, nn, States )
				guiGridListSetItemColor( wrpGrid, "Close", 3, 255, 0, 0 )
			else
				outputChatBox( "Please Choose A Place To Lock It !", 255, 0, 0, true )
			end
		end
	end
)



addEventHandler( "onClientGUIClick", root,
	function()
	local ss = guiGridListGetSelectedItem( wrpGrid )
	local tt = guiGridListGetItemText( wrpGrid, ss, 2 )
	local nn = guiGridListGetItemText( wrpGrid, guiGridListGetSelectedItem( wrpGrid ), 2 )
	States = "Open"	
		if source == wrpUnLock then
			if ( ss ~= -1 ) then
				triggerServerEvent( "UpdateInGridPL_UnLock", localPlayer, nn, States )
				guiGridListSetItemColor( wrpGrid, "Open", 3, 0, 255, 0 )
			else
				outputChatBox( "Please Choose A Place To UnLock It !", 255, 0, 0, true )
			end
		end
	end
)

 

Link to comment
Just now, +Source|> said:

guiGridListSetItemColor( wrpGrid, "Close", 3, 255, 0, 0 )

اذا تبغى تغير الألوان فـ هاذي 255,0,0

هذا اللون اضن انه احمر

سوي تحت الكود ذا

نفسها

guiGridListSetItemColor( wrpGrid, "Open", 3, 0, 0, 255 )

وجرب في الأكواد حق الألوان ,

Link to comment
1 minute ago, DABL said:

اذا تبغى تغير الألوان فـ هاذي 255,0,0

هذا اللون اضن انه احمر

 سوي تحت الكود ذا

نفسها


guiGridListSetItemColor( wrpGrid, "Open", 3, 0, 0, 255 )

وجرب في الأكواد حق الألوان ,

احمر = 255,0,0

اخضر = 0,255,0

Link to comment
2 minutes ago, DABL said:

اذا تبغى تغير الألوان فـ هاذي 255,0,0

هذا اللون اضن انه احمر

سوي تحت الكود ذا

نفسها


guiGridListSetItemColor( wrpGrid, "Open", 3, 0, 0, 255 )

وجرب في الأكواد حق الألوان ,

ما ظبط

UP

Link to comment

عندك اكثر من طريقة شوف الطريقة هاذي وانت طبقها

local colors = { ['Close'] = {255,0,0} , ['Open'] = {0,255,0} } ; 
guiGridListSetItemColor ( element , row , column , unpack ( colors [text] ) )

 

Link to comment
2 minutes ago, Hakan said:

عندك اكثر من طريقة شوف الطريقة هاذي وانت طبقها


local colors = { ['Close'] = {255,0,0} , ['Open'] = {0,255,0} } ; 
guiGridListSetItemColor ( element , row , column , unpack ( colors [text] ) )

 

text = وش مكانها

Link to comment
3 minutes ago, Hakan said:

"Close" or "Open

كذا قصدك

local Colors = { [ 'Close' ] = { 255, 0, 0 } , [ 'Open' ] = { 0, 255, 0 } };

addEventHandler( "onClientGUIClick", root,
	function()
	local ss = guiGridListGetSelectedItem( wrpGrid )
	local tt = guiGridListGetItemText( wrpGrid, ss, 2 )
	local nn = guiGridListGetItemText( wrpGrid, guiGridListGetSelectedItem( wrpGrid ), 2 )
	States = "Close"	
		if source == wrpLock then
			if ( ss ~= -1 ) then
				triggerServerEvent( "UpdateInGridPL_Lock", localPlayer, nn, States )
				guiGridListSetItemColor ( wrpGrid , RowPlacesSourceQ , 3 , unpack ( Colors [ "Close" ] ) )
			else
				outputChatBox( "Please Choose A Place To Lock It !", 255, 0, 0, true )
			end
		end
	end
)

 

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