3ssol Posted June 18, 2013 Share Posted June 18, 2013 (edited) السلام عليكم شباب انا سويت لوحة انتقالات قريد ليست طبعا ماعرفله كثير ولاكن فيه خطا واتمني تساعدوني كلنت # warptaple = { { "البداية " }, { "الشارع الطويل" }, { "المقر" }, } for i, v in ipairs ( warptaple ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1], 1, row, v[1], false ) end addEventHandler("onClientGUIClick",root, function() if (source == GUIEditor.button[1]) then local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) local get = guiGridListGetItemText(GUIEditor.gridlist[1], row, 1 ) if ( row and col and row ~= -1 and col ~= -1 ) then if ( source == "البداية " ) then triggerServerEvent("a", localPlayer) end end end end ) addEventHandler("onClientGUIClick",root, function() if (source == GUIEditor.button[1]) then local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) local get = guiGridListGetItemText(GUIEditor.gridlist[1], row, 1 ) if ( row and col and row ~= -1 and col ~= -1 ) then if ( source == "الشارع الطويل" ) then triggerServerEvent("b", localPlayer) end end end end ) addEventHandler("onClientGUIClick",root, function() if (source == GUIEditor.button[1]) then local row, col = guiGridListGetSelectedItem ( GUIEditor.gridlist[1] ) local get = guiGridListGetItemText(GUIEditor.gridlist[1], row, 1 ) if ( row and col and row ~= -1 and col ~= -1 ) then if ( source == "المقر" ) then triggerServerEvent("c", localPlayer) end end end end ) سيرفر addEvent("a",true) addEventHandler("a",root, function() spawnPlayer ( source,-1518.7962646484,-2355.3571777344,14.712463378906) end ) addEvent("b",true) addEventHandler("b",root, function() spawnPlayer ( source,-3798.7612304688,-3002.7980957031,50.607810974121) end ) addEvent("c",true) addEventHandler("c",root, function() spawnPlayer ( source,1529.0759277344,2830.3481445313,17.315364837646) end ) الوحه تفتح بس البدايه و المقر وهذول مايطلعون ليه يقول الخطا في سطر 9 و 8 في الكلنت Edited June 18, 2013 by Guest Link to comment
Tete omar Posted June 18, 2013 Share Posted June 18, 2013 الاخطاء هي: سطر 9 guiGridListSetItemText ( element gridList, int rowIndex, int columnIndex, string text, bool section, bool number ) guiGridListSetItemText ( GUIEditor.gridlist[1], 1, row, v[1], false, true ) عن آخر ارقيومنت true انت مسويها ارقام فقط .. شيل في السيرفر مو الكلنت get ثانياً وظيفة Link to comment
3ssol Posted June 18, 2013 Author Share Posted June 18, 2013 اخوي شوف اكواد الكلنت عدلتها سويت كذا وماضبط يقولي الخطا 8 9 Link to comment
3ssol Posted June 18, 2013 Author Share Posted June 18, 2013 لـ هدرجه الكود صعب عليكم ! Link to comment
PaiN^ Posted June 18, 2013 Share Posted June 18, 2013 Client : warptaple = { { "البداية " }, { "الشارع الطويل" }, { "المقر" }, } for i,v in ipairs( warptaple ) do local row = guiGridListAddRow( GUIEditor.gridlist[1] ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, v[1], false, false ) end addEventHandler( "onClientGUIClick", root, function( ) if source == GUIEditor.button[1] then local row, col = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) if row and col and row ~= -1 and col ~= -1 then local get = guiGridListGetItemText( GUIEditor.gridlist[1], row, col ) if get == "البداية " then triggerServerEvent( "a", localPlayer ) elseif get == "الشارع الطويل" then triggerServerEvent( "b", localPlayer ) elseif get == "المقر" then triggerServerEvent( "c", localPlayer ) end end end end ) Server : addEvent( "a", true ) addEventHandler( "a", root, function( ) spawnPlayer( source, -1518.7962646484, -2355.3571777344, 14.712463378906 ) end ) addEvent( "b", true ) addEventHandler( "b", root, function( ) spawnPlayer( source, -3798.7612304688, -3002.7980957031, 50.607810974121 ) end ) addEvent( "c", true ) addEventHandler( "c", root, function( ) spawnPlayer( source, 1529.0759277344, 2830.3481445313, 17.315364837646 ) end ) Link to comment
3ssol Posted June 18, 2013 Author Share Posted June 18, 2013 البدايه وهذول ماطلعو بل قريد ليست Link to comment
iPrestege Posted June 18, 2013 Share Posted June 18, 2013 كلنت وبس لية كل هالحوسة يمدي تختصر اكثر+ Link to comment
3ssol Posted June 18, 2013 Author Share Posted June 18, 2013 كلنت وبس لية كل هالحوسة يمدي تختصر اكثر+ طيب سو شي ورنا Link to comment
3ssol Posted June 18, 2013 Author Share Posted June 18, 2013 ي شباااب محد يعرفله ؟ + ي بين يقولي الخطا سطر 8 و 9 Link to comment
3ssol Posted June 18, 2013 Author Share Posted June 18, 2013 الكود الي طرحت انت فووق كلنت سطر 8 وسطر 9 هذول فيهم الخطا Link to comment
PaiN^ Posted June 18, 2013 Share Posted June 18, 2013 وش هو الخطأ جيب النص حقه Bad Argument @ ... زي كذا قصدي Link to comment
3ssol Posted June 18, 2013 Author Share Posted June 18, 2013 سطر 8 يقول Bad argument @ ;guiGridListAddRow ' [ Expected gui - element argument 1, got nil ] سطر 9 يقول guiGridListSetltem Text' [Expected gui - element at argument 1, got nil ] Link to comment
3ssol Posted June 18, 2013 Author Share Posted June 18, 2013 كل شي شغال بس الخلل من كودك السطرين هذول 8 , 9 لو تصلحهم كل شي 100 % 100 Link to comment
PaiN^ Posted June 18, 2013 Share Posted June 18, 2013 ماهو موجود ( GUIEditor.gridlist[1] ) الخلل يقول ان الجريد لست إذا خايف على كودك ارسله خاص Link to comment
3ssol Posted June 18, 2013 Author Share Posted June 18, 2013 لا مو خايف عليه خخ اصلن مود عادي GUIEditor = { gridlist = {}, window = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(503, 170, 365, 400, "انتقالات", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible ( GUIEditor.window[1], false ) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.gridlist[1] = guiCreateGridList(9, 22, 347, 306, false, GUIEditor.window[1]) guiGridListAddColumn(GUIEditor.gridlist[1], "Warp", 0.9) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "-", false, false) GUIEditor.button[1] = guiCreateButton(64, 337, 236, 30, "Go ", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(78, 372, 205, 19, "close", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") end ) warptaple = { { "البداية " }, { "الشارع الطويل" }, { "المقر" }, } for i,v in ipairs( warptaple ) do local row = guiGridListAddRow( GUIEditor.gridlist[1] ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, v[1], false, false ) end addEventHandler( "onClientGUIClick", root, function( ) if source == GUIEditor.button[1] then local row, col = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) if row and col and row ~= -1 and col ~= -1 then local get = guiGridListGetItemText( GUIEditor.gridlist[1], row, col ) if get == "البداية " then triggerServerEvent( "a", localPlayer ) elseif get == "الشارع الطويل" then triggerServerEvent( "b", localPlayer ) elseif get == "المقر" then triggerServerEvent( "c", localPlayer ) end end end end ) Link to comment
iPrestege Posted June 18, 2013 Share Posted June 18, 2013 ضيف الكلام يوم يصير ستارت مع الانشاء .. Link to comment
PaiN^ Posted June 18, 2013 Share Posted June 18, 2013 جرب : GUIEditor = { gridlist = {}, window = {}, button = {} } warptaple = { { "البداية " }, { "الشارع الطويل" }, { "المقر" }, } addEventHandler("onClientResourceStart", resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(503, 170, 365, 400, "انتقالات", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetVisible ( GUIEditor.window[1], false ) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.gridlist[1] = guiCreateGridList( 9, 22, 347, 306, false, GUIEditor.window[1] ) guiGridListAddColumn( GUIEditor.gridlist[1], "Warp", 0.9 ) guiGridListSetItemText( GUIEditor.gridlist[1], 0, 1, "-", false, false ) for i,v in ipairs( warptaple ) do local row = guiGridListAddRow( GUIEditor.gridlist[1] ) guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, v[1], false, false ) end GUIEditor.button[1] = guiCreateButton(64, 337, 236, 30, "Go ", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") GUIEditor.button[2] = guiCreateButton(78, 372, 205, 19, "close", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FFAAAAAA") end ) addEventHandler( "onClientGUIClick", root, function( ) if source == GUIEditor.button[1] then local row, col = guiGridListGetSelectedItem( GUIEditor.gridlist[1] ) if row and col and row ~= -1 and col ~= -1 then local get = guiGridListGetItemText( GUIEditor.gridlist[1], row, col ) if get == "البداية " then triggerServerEvent( "a", localPlayer ) elseif get == "الشارع الطويل" then triggerServerEvent( "b", localPlayer ) elseif get == "المقر" then triggerServerEvent( "c", localPlayer ) end end end end ) Link to comment
3ssol Posted June 18, 2013 Author Share Posted June 18, 2013 يعطيك العاافيه اخوي بن بس وش الاخطاء الي كانت وهاذ وش فايدته guiGridListSetItemText( GUIEditor.gridlist[1], 0, 1, "-", false, false ) Link to comment
#Al-Ha[J]aRii Posted June 18, 2013 Share Posted June 18, 2013 يعطيك العاافيه اخوي بنبس وش الاخطاء الي كانت وهاذ وش فايدته guiGridListSetItemText( GUIEditor.gridlist[1], 0, 1, "-", false, false ) يخلي نص في الرو Link to comment
PaiN^ Posted June 19, 2013 Share Posted June 19, 2013 الله يعافيك + الخطأ كان إنك كنت تحاول تضيف الأغراض للجريد من وظيفة ما استدعيت + زي ما قال الحجري يحط نص الرو 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