Jump to content

مشكلة


Recommended Posts

Posted

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

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

شوفو الكود

addEventHandler("onClientGUIDoubleClick", root,
	function()
	local pl = guiGridListGetItemText (	GUIEditor.gridlist[1] , guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1)
		if pl == "الأماكن الرئيسية - 1 " then
			guiSetVisible(GUIEditor.gridlist[1], false)
			guiSetVisible( Places, true)
		end
	end
)

addEventHandler("onClientGUIDoubleClick", root,
	function()
	local pl = guiGridListGetItemText (	Places , guiGridListGetSelectedItem ( Places ), 1)
		if pl == " ... " then
			guiSetVisible(GUIEditor.gridlist[1], true)
			guiSetVisible( Places, false)
		end
	end
)

طبعا المشكلة انه لما اضغط اماكن رئيسية يسوي فولس لذي وترو لذي

ولما اضغط ...

يعكسها

لكن لما ارجع اضغط اماكن رئيسية ما يرجعني لنفس النافذه

وش الحل؟؟؟

Posted

هذا لأنك مو معرف وش العنصر المختار

وفوق ذا مكرر حدثين ماهم معرفين العناصر فيهم

انت حاط بالحدث root

بذلك راح يتنفذ ذا اشي على اي لوحه تسوي لها دبل كلك او ازرار .. الخ

يفضل دام ان الحدث متعلق بالمود نفسه تستعمل

resourceRoot

 

يعني راح يكون كودك بذا الشكل

addEventHandler ("onClientGUIDoubleClick", resourceRoot,
    function ()
        if (source == GUIEditor.gridlist[1]) then
            local pl = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 1)
            if pl == "الأماكن الرئيسية - 1 " then
                guiSetVisible (GUIEditor.gridlist[1], false)
                guiSetVisible (Places, true)
            end
        end
        if (source == Places) then
            local pl = guiGridListGetItemText (Places, guiGridListGetSelectedItem (Places), 1)
            if pl == " ... " then
                guiSetVisible (GUIEditor.gridlist[1], true)
                guiSetVisible (Places, false)
            end
        end
    end
)

 

Posted
30 minutes ago, The Killer said:

هذا لأنك مو معرف وش العنصر المختار

وفوق ذا مكرر حدثين ماهم معرفين العناصر فيهم

انت حاط بالحدث root

بذلك راح يتنفذ ذا اشي على اي لوحه تسوي لها دبل كلك او ازرار .. الخ

يفضل دام ان الحدث متعلق بالمود نفسه تستعمل

resourceRoot

 

يعني راح يكون كودك بذا الشكل


addEventHandler ("onClientGUIDoubleClick", resourceRoot,
    function ()
        if (source == GUIEditor.gridlist[1]) then
            local pl = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 1)
            if pl == "الأماكن الرئيسية - 1 " then
                guiSetVisible (GUIEditor.gridlist[1], false)
                guiSetVisible (Places, true)
            end
        end
        if (source == Places) then
            local pl = guiGridListGetItemText (Places, guiGridListGetSelectedItem (Places), 1)
            if pl == " ... " then
                guiSetVisible (GUIEditor.gridlist[1], true)
                guiSetVisible (Places, false)
            end
        end
    end
)

 

ترا يزبط أحط روت *_*

Posted
11 hours ago, The Killer said:

هذا لأنك مو معرف وش العنصر المختار

وفوق ذا مكرر حدثين ماهم معرفين العناصر فيهم

انت حاط بالحدث root

بذلك راح يتنفذ ذا اشي على اي لوحه تسوي لها دبل كلك او ازرار .. الخ

يفضل دام ان الحدث متعلق بالمود نفسه تستعمل

resourceRoot

 

يعني راح يكون كودك بذا الشكل


addEventHandler ("onClientGUIDoubleClick", resourceRoot,
    function ()
        if (source == GUIEditor.gridlist[1]) then
            local pl = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 1)
            if pl == "الأماكن الرئيسية - 1 " then
                guiSetVisible (GUIEditor.gridlist[1], false)
                guiSetVisible (Places, true)
            end
        end
        if (source == Places) then
            local pl = guiGridListGetItemText (Places, guiGridListGetSelectedItem (Places), 1)
            if pl == " ... " then
                guiSetVisible (GUIEditor.gridlist[1], true)
                guiSetVisible (Places, false)
            end
        end
    end
)

 

ما ظبط

 

20 hours ago, iKSApro said:

الحين انت وش تبي تسوي بالضبط؟

لما اللاعب يضغط اماكن رئيسية يدخله جريد لست

... وبعدها يضغط

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

لكن لما اضغط اماكن رئيسية مره اخرى ما يضغط 

Posted
3 hours ago, iMr.WiFi..! said:

اطرح كودات انشاء الروات والاسامي في الجريدليست

شف هذا كود

addEventHandler("onClientGUIDoubleClick", root,
	function(player)
		 if (source == GUIEditor.gridlist[1]) then
	local pl = guiGridListGetItemText (	GUIEditor.gridlist[1] , guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ), 1)
		if pl == " الأماكن الرئيسيــة +  " then
			guiSetVisible( places1, true)
			guiSetVisible(GUIEditor.gridlist[1], false)
		end
	end
end
)


addEventHandler("onClientGUIDoubleClick", root,
	function(player)
	local pll = guiGridListGetItemText (	places1 , guiGridListGetSelectedItem ( places1 ), 1)
		if pll == "رجــوع >>  " then
			guiSetVisible( places1, false)
			guiSetVisible(GUIEditor.gridlist[1], true)
		end
	end
)

 

 

????????????

Posted

ي الأخ ..

طلبت منك كود انشاء الروات ووضع التكست عليها مو ذا الكود , عشان اقدر احدد وين المشكلة بضبط

Posted (edited)
On ٤‏/٩‏/١٤٣٨ هـ at 13:01, #_iMr.[E]coo said:

ترا يزبط أحط روت *_*

ماقلت ما يظبط انا

قلت الافضل تحط resourceRoot

دام انه في نفس المود الازرار او غيره

 

20 hours ago, A7MEDENO said:

ما ظبط

 

لما اللاعب يضغط اماكن رئيسية يدخله جريد لست

... وبعدها يضغط

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

لكن لما اضغط اماكن رئيسية مره اخرى ما يضغط 

انت حاط مسافات بين الكتابات

ورنا مكان الكتابات الي حاطها انت بالقائمه وكيف حاطها

Edited by The Killer
Posted
Just now, The Killer said:

ماقلت ما يظبط انا

قلت الافضل تحط resourceRoot

ما اختلف لا ريسورس روت ولا روت

ومدري صراحة لي ريسورس روت !

بالاخير انت مسوي تحقق من الي ضغط عليه مرتين

Posted

root = جميع الازرار او اللوحات وغيره بجميع السيرفر

resourceRoot = يتحقق فقط من الازرار الي داخل المود

وهو الافضل دام الاستعمال داخل المود

Posted
Just now, The Killer said:

root = جميع الازرار او اللوحات وغيره بجميع السيرفر

resourceRoot = يتحقق فقط من الازرار الي داخل المود

وهو الافضل دام الاستعمال داخل المود

طيب انت متحقق من النه ضغط ع القريد ليست مرتين ، عالعموم كل واحد ورأيه

Posted
20 hours ago, iMr.WiFi..! said:

ي الأخ ..

طلبت منك كود انشاء الروات ووضع التكست عليها مو ذا الكود , عشان اقدر احدد وين المشكلة بضبط

وش يعني روات

 

Posted
2 hours ago, iMr.WiFi..! said:

الصفوف الي انشئتها ..

ذي

guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "  #####  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 0, 1, 254, 245, 0, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, " الأماكن الرئيسيــة +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 1, 1, 19, 24, 234, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "الوظــائــف +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 2, 1, 33, 234, 18, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "المحــلات +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 3, 1, 219, 30, 221, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "الشــوارع +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 4, 1, 41, 209, 183, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "المهــمــات +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 5, 1, 190, 58, 83, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "أخــرى +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 6, 1, 249, 0, 0, 255)

 

Posted
Just now, A7MEDENO said:

ذي


guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "  #####  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 0, 1, 254, 245, 0, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, " الأماكن الرئيسيــة +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 1, 1, 19, 24, 234, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "الوظــائــف +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 2, 1, 33, 234, 18, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "المحــلات +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 3, 1, 219, 30, 221, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "الشــوارع +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 4, 1, 41, 209, 183, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "المهــمــات +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 5, 1, 190, 58, 83, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "أخــرى +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 6, 1, 249, 0, 0, 255)

 

هذي اسمها رو ولا روات

Posted
Just now, #_iMr.[E]coo said:

روات جمع رو بس واي فاي ما يعرف يسولف عربي , عشان هيك

 

ما عرفتو لمشكلتي؟؟

Posted

جرب ذا

local aTable = { 
	{ "  #####  " , 254, 245, 0, 255 } ,
	{ " الأماكن الرئيسيــة +  " , 19, 24, 234, 255 } ,
	{ "الوظــائــف +  " , 33, 234, 18, 255 } ,
	{ "المحــلات +  " , 219, 30, 221, 255 } ,
	{ "الشــوارع +  " , 254, 245, 0, 255 } ,
	{ "المهــمــات +  " , 41, 209, 183, 255 } ,
	{ "أخــرى +  " , 249, 0, 0, 255 } ,
	}
for _ ,v in ipairs ( aTable ) do 

	local sRow = guiGridListAddRow ( GUIEditor.gridlist[1] )

	guiGridListSetItemText ( GUIEditor.gridlist[1] , sRow , 1 , v [ 1 ] , false , false )

	guiGridListSetItemColor ( GUIEditor.gridlist[1] , sRow , 1 , v [ 2 ] , v [ 3 ] , v [ 4 ] , v [ 5 ] )

end

addEventHandler ("onClientGUIDoubleClick", resourceRoot,
    function (	)

	if (source == GUIEditor.gridlist[1]) then

	local pl = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 1)

	if ( pl == aTable [ 2 ] [ 1 ] ) then
	
	guiSetVisible (GUIEditor.gridlist[1], false)
	
	guiSetVisible (Places, true)
	
	end

	elseif (source == Places) then
	
	local pl = guiGridListGetItemText (Places, guiGridListGetSelectedItem (Places), 1)
	
	if ( pl == " ... " ) then
	
	guiSetVisible (GUIEditor.gridlist[1], true)
	
	guiSetVisible (Places, false)
            end
        end
    end
	)

 

Posted
19 minutes ago, Abdul KariM said:

جرب ذا


local aTable = { 
	{ "  #####  " , 254, 245, 0, 255 } ,
	{ " الأماكن الرئيسيــة +  " , 19, 24, 234, 255 } ,
	{ "الوظــائــف +  " , 33, 234, 18, 255 } ,
	{ "المحــلات +  " , 219, 30, 221, 255 } ,
	{ "الشــوارع +  " , 254, 245, 0, 255 } ,
	{ "المهــمــات +  " , 41, 209, 183, 255 } ,
	{ "أخــرى +  " , 249, 0, 0, 255 } ,
	}
for _ ,v in ipairs ( aTable ) do 

	local sRow = guiGridListAddRow ( GUIEditor.gridlist[1] )

	guiGridListSetItemText ( GUIEditor.gridlist[1] , sRow , 1 , v [ 1 ] , false , false )

	guiGridListSetItemColor ( GUIEditor.gridlist[1] , sRow , 1 , v [ 2 ] , v [ 3 ] , v [ 4 ] , v [ 5 ] )

end

addEventHandler ("onClientGUIDoubleClick", resourceRoot,
    function (	)

	if (source == GUIEditor.gridlist[1]) then

	local pl = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 1)

	if ( pl == aTable [ 2 ] [ 1 ] ) then
	
	guiSetVisible (GUIEditor.gridlist[1], false)
	
	guiSetVisible (Places, true)
	
	end

	elseif (source == Places) then
	
	local pl = guiGridListGetItemText (Places, guiGridListGetSelectedItem (Places), 1)
	
	if ( pl == " ... " ) then
	
	guiSetVisible (GUIEditor.gridlist[1], true)
	
	guiSetVisible (Places, false)
            end
        end
    end
	)

 

هذي الاكواد صحيحه ؟؟؟

 



GUIEditor = {
    gridlist = {},
    window = {},
	label = {}
}

		soon = guiCreateWindow(253, 226, 311, 128, "MO7trFeN Al6ArH", false)
        guiWindowSetSizable(soon, false)
        guiSetAlpha(soon, 1.00)
		guiSetVisible( soon, false ) 
        soonclose = guiCreateButton(92, 90, 131, 28, "OK", false, soon)
        guiSetProperty(soonclose, "NormalTextColour", "FFFF0000")
        GUIEditor.label[1] = guiCreateLabel(114, 40, 90, 21, "قـريــبــاً │ SOON", false, soon)
        guiLabelSetColor(GUIEditor.label[1], 0, 254, 233)
		
        GUIEditor.window[1] = guiCreateWindow(207, 112, 387, 387, "الإنتــقــالات", false)
        guiWindowSetSizable(GUIEditor.window[1], false)
        guiSetAlpha(GUIEditor.window[1], 1.00)
		guiSetVisible(GUIEditor.window[1],false)
        GUIEditor.gridlist[1] = guiCreateGridList(9, 27, 368, 350, false, GUIEditor.window[1])
        guiGridListAddColumn(GUIEditor.gridlist[1], "  الأماكن    #  ", 0.9)
        for i = 1, 7 do
            guiGridListAddRow(GUIEditor.gridlist[1])
        end
        guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "  #####  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 0, 1, 254, 245, 0, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 1, 1, " الأماكن الرئيسيــة +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 1, 1, 19, 24, 234, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 2, 1, "الوظــائــف +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 2, 1, 33, 234, 18, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 3, 1, "المحــلات +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 3, 1, 219, 30, 221, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 4, 1, "الشــوارع +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 4, 1, 41, 209, 183, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 5, 1, "المهــمــات +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 5, 1, 190, 58, 83, 255)
        guiGridListSetItemText(GUIEditor.gridlist[1], 6, 1, "أخــرى +  ", false, false)
        guiGridListSetItemColor(GUIEditor.gridlist[1], 6, 1, 249, 0, 0, 255)

		places1 = guiCreateGridList(9, 27, 368, 350, false, GUIEditor.window[1])
        guiGridListAddColumn(places1, "  الأماكن    #  ", 0.9)
        for i = 1, 10 do
            guiGridListAddRow(places1)
        end
		guiSetVisible(places1, false)
        guiGridListSetItemText(places1, 0, 1, "رجــوع >>  ", false, false)
        guiGridListSetItemColor(places1, 0, 1, 247, 245, 0, 255)
        guiGridListSetItemText(places1, 1, 1, "البــدايــة │ X   ", false, false)
        guiGridListSetItemColor(places1, 1, 1, 246, 0, 0, 255)
        guiGridListSetItemText(places1, 2, 1, "البــنـــك │ X   ", false, false)
        guiGridListSetItemColor(places1, 2, 1, 0, 244, 236, 255)
        guiGridListSetItemText(places1, 3, 1, "مركـــز الشــرطــة │ X   ", false, false)
        guiGridListSetItemColor(places1, 3, 1, 0, 5, 243, 255)
        guiGridListSetItemText(places1, 4, 1, "إســتــلام الرواتـــب │ X   ", false, false)
        guiGridListSetItemColor(places1, 4, 1, 11, 242, 0, 255)
        guiGridListSetItemText(places1, 5, 1, "الفــنــدق │ X   ", false, false)
        guiGridListSetItemColor(places1, 5, 1, 238, 241, 0, 255)
        guiGridListSetItemText(places1, 6, 1, "أفــخـم 3 بــيــوت │ X   ", false, false)
        guiGridListSetItemColor(places1, 6, 1, 238, 2, 235, 255)
        guiGridListSetItemText(places1, 7, 1, "الإســتــراحـــة │ X   ", false, false)
        guiGridListSetItemColor(places1, 7, 1, 125, 58, 181, 255)
        guiGridListSetItemText(places1, 8, 1, "القــفــزة الخـنفــشاريــة │ X   ", false, false)
        guiGridListSetItemColor(places1, 8, 1, 182, 115, 56, 255)
        guiGridListSetItemText(places1, 9, 1, "بــيــــوت المــطــانــــيـــخ │ X   ", false, false)
        guiGridListSetItemColor(places1, 9, 1, 193, 44, 44, 255)
		
bindKey ("f6", "down",
	function()
		if guiGetVisible (GUIEditor.window[1]) then
			guiSetVisible(GUIEditor.window[1],false)
			showCursor(false)
		else
			guiSetVisible(GUIEditor.window[1],true)
			showCursor(true)
		end
	end
)








local aTable = { 
	{ "  #####  " , 254, 245, 0, 255 } ,
	{ " الأماكن الرئيسيــة +  " , 19, 24, 234, 255 } ,
	{ "الوظــائــف +  " , 33, 234, 18, 255 } ,
	{ "المحــلات +  " , 219, 30, 221, 255 } ,
	{ "الشــوارع +  " , 254, 245, 0, 255 } ,
	{ "المهــمــات +  " , 41, 209, 183, 255 } ,
	{ "أخــرى +  " , 249, 0, 0, 255 } ,
	}
for _ ,v in ipairs ( aTable ) do 

	local sRow = guiGridListAddRow ( GUIEditor.gridlist[1] )

	guiGridListSetItemText ( GUIEditor.gridlist[1] , sRow , 1 , v [ 1 ] , false , false )

	guiGridListSetItemColor ( GUIEditor.gridlist[1] , sRow , 1 , v [ 2 ] , v [ 3 ] , v [ 4 ] , v [ 5 ] )

end

addEventHandler ("onClientGUIDoubleClick", resourceRoot,
    function (	)

	if (source == GUIEditor.gridlist[1]) then

	local pl = guiGridListGetItemText (GUIEditor.gridlist[1], guiGridListGetSelectedItem (GUIEditor.gridlist[1]), 1)

	if ( pl == aTable [ 2 ] [ 1 ] ) then
	
	guiSetVisible (GUIEditor.gridlist[1], false)
	
	guiSetVisible (Places1, true)
	
	end

	elseif (source == Places1) then
	
	local pl = guiGridListGetItemText (Places1, guiGridListGetSelectedItem (Places1), 1)
	
	if ( pl == "رجــوع >>  " ) then
	
	guiSetVisible (GUIEditor.gridlist[1], true)
	
	guiSetVisible (Places1, false)
            end
        end
    end
	)

 

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