Professor Posted December 31, 2012 Share Posted December 31, 2012 السلام عليكم ورحمه الله ششباب انا سويت نافذه فيها قريد واحد للشخصيات والثاني سيارات وعندي مشكله ممكن تحلونها لي ( انا مابغى اطرح الكود كامل ) GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Grid[1] = guiCreateGridList(10,23,220,250,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],1) guiGridListSetSelectionMode(GUIEditor_Grid[2],1) guiGridListAddColumn(GUIEditor_Grid[1],"Skin",0.9) guiGridListAddColumn(GUIEditor_Grid[2],"Cars",0.9) GUIEditor_Button[1] = guiCreateButton(10,288,96,46,"1",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(127,287,96,46,"2",false,GUIEditor_Window[1]) skin1 = { {46}, {45}, } Cars = { {511}, {512}, } addEventHandler("onClientGUIClick",root, function () if ( source == GUIEditor_Button[1] ) then guiGridListClear(GUIEditor_Grid[1]) for i,v in ipairs(skin1) do local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText(GUIEditor_Grid[1],row,1,tostring(v[1]),false,false) end end end ) addEventHandler("onClientGUIClick",root, function () if ( source == GUIEditor_Button[2] ) then guiGridListClear(GUIEditor_Grid[2]) for i,v in ipairs(Cars) do local row = guiGridListAddRow(GUIEditor_Grid[2]) guiGridListSetItemText(GUIEditor_Grid[2],row,1,tostring(v[1]),false,false) end end end ) addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(GUIEditor_Grid[1]) local text = guiGridListGetItemText(GUIEditor_Grid[1],sel,1) if ( source == GUIEditor_Grid[1] ) then setElementModel(localPlayer,tonumber(text)) end end ) القريد الاول حق الشخصيات شغال باقي حق السيارات اظغط على زر 2 مايطلع لي القريد Link to comment
TAPL Posted December 31, 2012 Share Posted December 31, 2012 كودك فيه قريد لست واحد فقط GUIEditor_Grid[1] = guiCreateGridList(10,23,220,250,false,GUIEditor_Window[1]) الثاني غير موجود Link to comment
abu5lf Posted December 31, 2012 Share Posted December 31, 2012 انت تبي اذا ضغطت زر يصير قريد للسيارات واذا ضغطت مرة ثانية يصير للشخصيات؟ Link to comment
Professor Posted December 31, 2012 Author Share Posted December 31, 2012 انت تبي اذا ضغطت زر يصير قريد للسيارات واذا ضغطت مرة ثانية يصير للشخصيات؟ لا , ققلبو فيه ازرار انا ابغى احط زر رقم 1 قريد الشخصيات وزر رقم 2 قريد السيارات ! اتمنى وضحت الفككره Link to comment
abu5lf Posted December 31, 2012 Share Posted December 31, 2012 انت تبي اذا ضغطت زر يصير قريد للسيارات واذا ضغطت مرة ثانية يصير للشخصيات؟ لا , ققلبو فيه ازرار انا ابغى احط زر رقم 1 قريد الشخصيات وزر رقم 2 قريد السيارات ! اتمنى وضحت الفككره طيب وش المشكلة ومثل ماقال تابل مافيه الا قريد واحد Link to comment
Professor Posted December 31, 2012 Author Share Posted December 31, 2012 انت تبي اذا ضغطت زر يصير قريد للسيارات واذا ضغطت مرة ثانية يصير للشخصيات؟ لا , ققلبو فيه ازرار انا ابغى احط زر رقم 1 قريد الشخصيات وزر رقم 2 قريد السيارات ! اتمنى وضحت الفككره طيب وش المشكلة ومثل ماقال تابل مافيه الا قريد واحد سويت قريد ثاني ونفس المشكله ذذ Link to comment
abu5lf Posted December 31, 2012 Share Posted December 31, 2012 طيب حط القريد الي سويته Link to comment
Professor Posted December 31, 2012 Author Share Posted December 31, 2012 طيب حط القريد الي سويته GUIEditor_Label = {} GUIEditor_Grid = {} GUIEditor_Grid[1] = guiCreateGridList(10,23,220,250,false,GUIEditor_Window[1]) GUIEditor_Grid[2] = guiCreateGridList(10,23,220,250,false,GUIEditor_Window[1]) guiGridListSetSelectionMode(GUIEditor_Grid[1],1) guiGridListSetSelectionMode(GUIEditor_Grid[2],1) guiGridListAddColumn(GUIEditor_Grid[1],"Skin",0.9) guiGridListAddColumn(GUIEditor_Grid[2],"Cars",0.9) GUIEditor_Button[1] = guiCreateButton(10,288,96,46,"1",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(127,287,96,46,"2",false,GUIEditor_Window[1]) skin1 = { {46}, {45}, } Cars = { {511}, {512}, } addEventHandler("onClientGUIClick",root, function () if ( source == GUIEditor_Button[1] ) then guiGridListClear(GUIEditor_Grid[1]) for i,v in ipairs(skin1) do local row = guiGridListAddRow(GUIEditor_Grid[1]) guiGridListSetItemText(GUIEditor_Grid[1],row,1,tostring(v[1]),false,false) end end end ) addEventHandler("onClientGUIClick",root, function () if ( source == GUIEditor_Button[2] ) then guiGridListClear(GUIEditor_Grid[2]) for i,v in ipairs(Cars) do local row = guiGridListAddRow(GUIEditor_Grid[2]) guiGridListSetItemText(GUIEditor_Grid[2],row,1,tostring(v[1]),false,false) end end end ) addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(GUIEditor_Grid[1]) local text = guiGridListGetItemText(GUIEditor_Grid[1],sel,1) if ( source == GUIEditor_Grid[1] ) then setElementModel(localPlayer,tonumber(text)) end end ) Link to comment
abu5lf Posted December 31, 2012 Share Posted December 31, 2012 الواضح انك مسوي القريد على بعض guiSetVisible - استخدم الوظيفة هاذي عشان تظهر القريد وتخفيه Link to comment
Professor Posted December 31, 2012 Author Share Posted December 31, 2012 خلاص تم الإفاده .. ششكرا لك ععاشق الششرقق Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now