Joker_Mta Posted August 8, 2012 Share Posted August 8, 2012 بسم الله الرحمن الرحيم السلام عليكم ورحمة الله وبركاته عندي خطأ في السته مو عارف اسويه او اصلحه المطلوب او المختصر انا سويت لسته فيها سيارات اريد لما تضغط على السياره تجي في الفراغ مثال car = { "car1", "car2", "car3" } function List(atList) List = guiCreateGridList(51,209,282,167,false,GUIEditor_Window[2]) guiGridListSetSelectionMode(List,1) foodlist = guiGridListAddColumn( List, "cars", 0.60 ) end addEventHandler( "onClientGUIClick", GridList, aClickGuiFood ) end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),List) setTimer(List,2000,1) function onClickPlayerName () local name = guiGridListGetItemText(playerList, guiGridListGetSelectedItem(playerList), 1) guiSetText(car, cars) end car = guiCreateEdit(200, 343, 201, 20, "", false, GUIEditor_Window[2]) عارف انه فيه اأخطآ لاكن لو عندكم افضل من هادا اطرحو ياريت واضح ومشكورين مقدما Link to comment
Bssol Posted August 8, 2012 Share Posted August 8, 2012 كودك ذا ملخبط وفيه اشياء ما ندري وش قيمتها عدل اللخبطة واطرح الكود كامل Link to comment
Joker_Mta Posted August 8, 2012 Author Share Posted August 8, 2012 تفضل gridlist = guiCreateGridList(0.0644,0.1111,0.8678,0.6705,true,Window) guiGridListSetSelectionMode(gridlist,2) Btn_connect = guiCreateButton(0.0644,0.8276,0.861,0.1303,"Connect",true,Window) guiWindowSetSizable(Window,false) guiSetVisible (Window, false) name = guiGridListAddColumn(gridlist,"buy car",0.9) local o1o = guiGridListAddRow ( gridlist ) local o2o = guiGridListAddRow ( gridlist ) local o3o = guiGridListAddRow ( gridlist ) car1 = guiGridListSetItemText ( gridlist, o1o, name, "car1", false, false ) car2 = guiGridListSetItemText ( gridlist, o2o, name, "car2", false, false ) car3 = guiGridListSetItemText ( gridlist, o3o, name, "car3", false, false ) function onClickPlayerName () local name = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist), 1) guiSetText(name, car1, car2, car3) end name = guiCreateEdit(200, 343, 201, 20, "", false, Window) المطلوب عند اختيار مثلا car1 guiCreateEdit يجي في الـ car1 واذا اخترت car2 يتكنسل الأول ويجي الثاني في guiCreateEdit يجي car2 ياريت فهمتو Link to comment
Al3grab Posted August 8, 2012 Share Posted August 8, 2012 name = guiCreateEdit(200, 343, 201, 20, "", false, Window) addEventHandler("onClientGUIChanged",root,function() if source == gridlist then local text = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist), 1) if not text or text == "" then return end guiSetText(name,text) end end ) Link to comment
Joker_Mta Posted August 9, 2012 Author Share Posted August 9, 2012 (edited) مشكور وماقصرت لذي الدرجه ماحد حل المشكله لاكن للحين مايشتغل gridlist = guiCreateGridList(0.344,0.1011,0.7078,0.5005,true,GUIEditor_Window[2]) guiGridListSetSelectionMode(gridlist,2) name = guiGridListAddColumn(gridlist,"buy car",0.9) local o1o = guiGridListAddRow ( gridlist ) local o2o = guiGridListAddRow ( gridlist ) local o3o = guiGridListAddRow ( gridlist ) local o4o = guiGridListAddRow ( gridlist ) car1 = guiGridListSetItemText ( gridlist, o1o, name, "car1", false, false ) car2 = guiGridListSetItemText ( gridlist, o2o, name, "car2", false, false ) car3 = guiGridListSetItemText ( gridlist, o3o, name, "car3", false, false ) car4 = guiGridListSetItemText ( gridlist, o4o, name, "car4", false, false ) ------ name = guiCreateEdit(200, 313, 201, 20, "", false, GUIEditor_Window[2]) ------ addEventHandler("onClientGUIChanged",root,function() if source == gridlist then local text = guiGridListGetItemText(gridlist, guiGridListGetSelectedItem(gridlist), 1) if not text or text == "" then return end guiSetText(name,text) end end ) Edited August 9, 2012 by Guest Link to comment
Joker_Mta Posted August 9, 2012 Author Share Posted August 9, 2012 ماشاء الله لذي الدرجه الطلب يعقد !!!!!!!! Link to comment
TAPL Posted August 9, 2012 Share Posted August 9, 2012 غير الأفنت addEventHandler("onClientGUIChanged",root,function() إلى addEventHandler("onClientGUIClick",root,function() أضافة إلى أن عندك متغيرين بنفس الأسم أحتمال يصير تعارض name = guiGridListAddColumn(gridlist,"buy car",0.9) name = guiCreateEdit(200, 313, 201, 20, "", false, GUIEditor_Window[2]) الأفضل تغير الأسم Link to comment
3NAD Posted August 9, 2012 Share Posted August 9, 2012 ججرب ذا gridlist = guiCreateGridList(0.344,0.1011,0.7078,0.5005,true,GUIEditor_Window[2]) guiGridListSetSelectionMode(gridlist,2) guiSetVisible(GUIEditor_Window[2],false) name = guiGridListAddColumn(gridlist,"buy car",0.9) local o1o = guiGridListAddRow ( gridlist ) local o2o = guiGridListAddRow ( gridlist ) local o3o = guiGridListAddRow ( gridlist ) local o4o = guiGridListAddRow ( gridlist ) car1 = guiGridListSetItemText ( gridlist, o1o, name, "car1", false, false ) car2 = guiGridListSetItemText ( gridlist, o2o, name, "car2", false, false ) car3 = guiGridListSetItemText ( gridlist, o3o, name, "car3", false, false ) car4 = guiGridListSetItemText ( gridlist, o4o, name, "car4", false, false ) ------ name = guiCreateEdit(200, 313, 201, 20, "", false, GUIEditor_Window[2]) ------ function ClickIt (button) if (source == gridlist ) then CurrentVehicle = guiGridListGetItemText ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 ) if ( name ) then if guiSetText ( name, ""..CurrentVehicle.."" ) == false then guiSetText ( name, "Unknown" ) end end end end addEventHandler("onClientGUIClick",root,ClickIt) 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