Mr.R Posted September 15, 2014 Share Posted September 15, 2014 السلام عليكم اليوم سويت نافذه+قريد ليست+زرين+صوره كل شيء تمام وهذا الكود --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- WarpTaple = { -- تيبل للانتقالات { "الدائــــــــــري" }, { "النــــخــــيــــل" }, { "الــــــغــــــروب" }, } GUIEditor = { label = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false)-- تصميم النافذه guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for i = 1, 3 do guiGridListAddRow(GridList) end guiGridListSetItemText(GridList, 0, 1, "الدائــــــــــري -1", false, false) guiGridListSetItemText(GridList, 1, 1, "النــــخــــيــــل -3", false, false) guiGridListSetItemText(GridList, 2, 1, "الــــــغــــــروب -3", false, false) Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( )-- وظيفة قفل+فتح النافذه guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) for i,v in ipairs( WarpTable ) do -- اسم تيبل الانتقالات local row = guiGridListAddRow( GridList ) guiGridListSetItemText( GridList, row, 1, v[1], false, false ) end local row, col = guiGridListGetSelectedItem( GridList ) if row and col and row ~= -1 and col ~= -1 then local get = guiGridListGetItemText( GridList, row, col ) if get == "الدائــــــــــري" then -- نتحقق من رو الدائري triggerServerEvent( "d", localPlayer )-- نرسل ترايقر elseif get == "النــــخــــيــــل" then -- نتحقق من رو النخيل triggerServerEvent( "n", localPlayer )-- نرسل ترايقر elseif get == "الــــــغــــــروب" then -- نتحقق من رو الغروب triggerServerEvent( "g", localPlayer ) -- نرسل ترايقر end end end end ) addEventHandler( "onClientGUIClick", resourceRoot, function( ) -- وظيفة الضغط على الزر + الحدث if ( source == Button1 ) then -- التحقق من زر1 if ( isTimer ( Timer ) ) then return end -- وقت بين كل ضغطه وضغطه Timer = setTimer ( function ( ) end, 4000, 1 ) -- وقت بين كل ضغطه وضغطه if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then -- نتحقق انه اختار شيء من اللسته end -- اند فنكشن end -- اند تحقق الزر end -- اند تحقق انه اختار شيء من اللسته else outputChatBox ( "* Please Select Place", 255, 255, 255, true ) -- يخرج نص في الشات اذا ماختار شيء واضغط زر انتقال end -- اند الـ else elseif ( source == Button2 ) then -- تحقق من زر2 اغلاق النافذه guiSetVisible ( wnd, false ) -- اخفاء النافذه او اظهارها باستخدام true-or-false showCursor ( guiGetVisible ( wnd ) ) -- اظهار مؤشر الماوس elseif ( source == GridList ) then -- تحقق من القريد ليست if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then -- نتحقق انه اختار شيء من اللسته local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 )-- if ( fName ~= '' ) then guiStaticImageLoadImage ( MTA, ""..fName..".png" ) -- عند الضغط على الرو تتغير الصوره end else guiStaticImageLoadImage ( MTA, "MTA.png" ) -- نرجع الصوره الاصليه اذا ماضغط على الرو end end end ) اتوقع كل شيء تمام + شرحت الكود من فهمي عشان محد يقول وش جاب ذا وذا بس فيه خطأ ماتطلع النافذه + الديبوق يقول ERROR: Loading script failed: x1Warp \Client.lua:69: '' expected near 'end' مافهمت عليه , الي فهمته ان فيه خطأ في ملف كلينت سطر 69 رحت حاولت فيه كل شيء ماظبط خخخ واذا فيه اخطائ ثانيه صححوها ماحد معصوم من الخطأ وكلن بدأ من الصفر إلى الاحتراف ^^ انتظركم <3 Link to comment
nxFairlywell Posted September 15, 2014 Share Posted September 15, 2014 لا لا وخرت الكود ذذ والله ي انت مكثر اخطاء ,$ تبيني اسويه لك كامل بشرط تتعلم من الاخطاء Link to comment
xX|KeMo|Xx Posted September 15, 2014 Share Posted September 15, 2014 ليه هذا في الهوآ local row, col = guiGridListGetSelectedItem( GridList ) if row and col and row ~= -1 and col ~= -1 then local get = guiGridListGetItemText( GridList, row, col ) if get == "الدائــــــــــري" then -- نتحقق من رو الدائري triggerServerEvent( "d", localPlayer )-- نرسل ترايقر elseif get == "النــــخــــيــــل" then -- نتحقق من رو النخيل triggerServerEvent( "n", localPlayer )-- نرسل ترايقر elseif get == "الــــــغــــــروب" then -- نتحقق من رو الغروب triggerServerEvent( "g", localPlayer ) -- نرسل ترايقر end end Link to comment
Mr.R Posted September 16, 2014 Author Share Posted September 16, 2014 لا لا وخرت الكود ذذوالله ي انت مكثر اخطاء ,$ تبيني اسويه لك كامل بشرط تتعلم من الاخطاء اكيد اتعلم , واذا ماتعلمت من الاخطاء ماراح استفيد شيء وانا ماعمري خليت احد يسوي لي كود , الا وانا متعلم من الاخطاء وعاجز عن شكره انتظرك <3 Link to comment
nxFairlywell Posted September 16, 2014 Share Posted September 16, 2014 --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- WarpTaple = { -- تيبل للانتقالات { "الدائــــــــــري", x,y,z }, { "النــــخــــيــــل", x,y,z }, { "الــــــغــــــروب", x,y,z }, } GUIEditor = { label = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false)-- تصميم النافذه guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) col = guiGridListAddColumn(GridList, "Places ...", 0.9) Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end for k,v in ipairs (WarpTaple) do local row = guiGridListAddRow(GridList) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData( GridList, row, 1, v[2] ) end ) bindKey ( "F3", "down", function ( )-- وظيفة قفل+فتح النافذه guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", root, function( ) if( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then local row, col = guiGridListGetSelectedItem ( GridList ) if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1,true ) local MKAN = tostring ( guiGridListGetItemText(GridList,row,1 )) if ( row and col and row ~= -1 and col ~= -1 ) then setElementPosition(source , guiGridListGetItemData( GridList, row, 1, v[2] ) end end end end end ) addEventHandler('onClientGUIClick',root,function( ) if ( source == Button2 ) then -- تحقق من زر2 اغلاق النافذه guiSetVisible ( wnd, false ) -- اخفاء النافذه او اظهارها باستخدام true-or-false showCursor ( guiGetVisible ( wnd ) ) -- اظهار مؤشر الماوس elseif ( source == GridList ) then -- تحقق من القريد ليست if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then -- نتحقق انه اختار شيء من اللسته local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 )-- if ( fName ~= '' ) then guiStaticImageLoadImage ( MTA, ""..fName..".png" ) -- عند الضغط على الرو تتغير الصوره else guiStaticImageLoadImage ( MTA, "MTA.png" ) -- نرجع الصوره الاصليه اذا ماضغط على الرو end end end end ) جرب كذا , إذآ مَ ضــبط حط رد هنا وان شاء الله اضبطه توني راجع من المدرسه ودايخ شوي طبعا تستبدل x,y,z بإحداثيات المكان مثلا الدائري جنبه x,y,z تستبدلها بإحداثيات الدائري وهيك Link to comment
AboShanab Posted September 16, 2014 Share Posted September 16, 2014 guiGridListSetItemData( GridList, row, 1, v[2] ) !!! guiGridListGetItemData( GridList, row, 1, v[2] ) !!! Link to comment
nxFairlywell Posted September 16, 2014 Share Posted September 16, 2014 guiGridListSetItemData( GridList, row, 1, v[2] ) !!!guiGridListGetItemData( GridList, row, 1, v[2] ) !!! وش الخطأ طيب ؟ Link to comment
AboShanab Posted September 16, 2014 Share Posted September 16, 2014 بالنسبة لـ guiGridListSetItemData( GridList, row, 1, v[2] ) انت سويت SetItemData لـ x فقط يعني y,z مسحوب عليهم منك guiGridListGetItemData( GridList, row, 1, v[2] ) امسح v[2] وناقصك قوس اغلاق في سطر 64 Link to comment
nxFairlywell Posted September 16, 2014 Share Posted September 16, 2014 بالنسبة لـ guiGridListSetItemData( GridList, row, 1, v[2] )انت سويت SetItemData لـ x فقط يعني y,z مسحوب عليهم منك guiGridListGetItemData( GridList, row, 1, v[2] ) امسح v[2] وناقصك قوس اغلاق في سطر 64 تم التعديل شكراً على التنبيه Link to comment
Mr.R Posted September 16, 2014 Author Share Posted September 16, 2014 --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- WarpTaple = { -- تيبل للانتقالات { "الدائــــــــــري", x,y,z }, { "النــــخــــيــــل", x,y,z }, { "الــــــغــــــروب", x,y,z }, } GUIEditor = { label = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false)-- تصميم النافذه guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) col = guiGridListAddColumn(GridList, "Places ...", 0.9) Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end for k,v in ipairs (WarpTaple) do local row = guiGridListAddRow(GridList) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData( GridList, row, 1, v[2] ) end ) bindKey ( "F3", "down", function ( )-- وظيفة قفل+فتح النافذه guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", root, function( ) if( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then local row, col = guiGridListGetSelectedItem ( GridList ) if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1,true ) local MKAN = tostring ( guiGridListGetItemText(GridList,row,1 )) if ( row and col and row ~= -1 and col ~= -1 ) then setElementPosition(source , guiGridListGetItemData( GridList, row, 1, v[2] ) end end end end end ) addEventHandler('onClientGUIClick',root,function( ) if ( source == Button2 ) then -- تحقق من زر2 اغلاق النافذه guiSetVisible ( wnd, false ) -- اخفاء النافذه او اظهارها باستخدام true-or-false showCursor ( guiGetVisible ( wnd ) ) -- اظهار مؤشر الماوس elseif ( source == GridList ) then -- تحقق من القريد ليست if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then -- نتحقق انه اختار شيء من اللسته local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 )-- if ( fName ~= '' ) then guiStaticImageLoadImage ( MTA, ""..fName..".png" ) -- عند الضغط على الرو تتغير الصوره else guiStaticImageLoadImage ( MTA, "MTA.png" ) -- نرجع الصوره الاصليه اذا ماضغط على الرو end end end end ) جرب كذا , إذآ مَ ضــبط حط رد هنا وان شاء الله اضبطه توني راجع من المدرسه ودايخ شوي طبعا تستبدل x,y,z بإحداثيات المكان مثلا الدائري جنبه x,y,z تستبدلها بإحداثيات الدائري وهيك ياشيخ لبى قلبك تعلمت من اخطائي , كنت متوقع اني بختصر كل شيء في كلينت بس تفلسفت زياده وحيطت سيرفر اختصار x,y,z في التيبل العموم النافذه ماتطلع والديبوق يقول ERROR:Loading script failled: x1Warp\Client.lua:41:')' expected (to cllose '(' at line 18) near 'for' Link to comment
Mr.R Posted September 16, 2014 Author Share Posted September 16, 2014 بالنسبة لـ guiGridListSetItemData( GridList, row, 1, v[2] )انت سويت SetItemData لـ x فقط يعني y,z مسحوب عليهم منك guiGridListGetItemData( GridList, row, 1, v[2] ) امسح v[2] وناقصك قوس اغلاق في سطر 64 مشكور على تعليقك , افدتني <3 Link to comment
AboShanab Posted September 16, 2014 Share Posted September 16, 2014 --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { { "الدائــــــــــري", x, y, z }, { "النــــخــــيــــل", x, y, z }, { "الــــــغــــــروب", x, y, z }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[2], v[3], v[4] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) end end end ) Link to comment
KING-_-HOHO Posted September 16, 2014 Share Posted September 16, 2014 --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { { "الدائــــــــــري", x, y, z }, { "النــــخــــيــــل", x, y, z }, { "الــــــغــــــروب", x, y, z }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[2], v[3], v[4] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) end end end ) إذ كآن آلتيبل صعب عليك آو مآتفهم له كثير إستخدم كودي لآنه مرهـ سهل --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local rowD = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, rowD, 1, "الدائــــــــــري", false, false ) local rowN = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, rowN, 1, "النــــخــــيــــل", false, false ) local rowQ = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, rowQ, 1, "الــــــغــــــروب", false, false ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == Button1 ) then local HoHo = guiGridListGetItemText (GridList, guiGridListGetSelectedItem (GridList), 1) if HoHo == "" then return outputChatBox ( "آختر مكآن للإنتقآل إليه", 255, 255, 0, true ) elseif HoHo == "الدائــــــــــري" then setElementPosition ( localPlayer, , yd, zd) outputChatBox ( "تم نقلك إلى آلدآئري", 255, 255, 0, true ) elseif HoHo == "النــــخــــيــــل" then setElementPosition ( localPlayer, xn, yn, zn) outputChatBox ( "تم نقلك إلى آلنخيل", 255, 255, 0, true ) elseif HoHo == "الــــــغــــــروب" then setElementPosition ( localPlayer, xq, yq, zq) outputChatBox ( "تم نقلك إلى آلغروب", 255, 255, 0, true ) end end end ) Link to comment
Mr.R Posted September 16, 2014 Author Share Posted September 16, 2014 --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { { "الدائــــــــــري", x, y, z }, { "النــــخــــيــــل", x, y, z }, { "الــــــغــــــروب", x, y, z }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[2], v[3], v[4] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) end end end ) كودك ضبط مشكور يالحب Button2 بس انا اضفت عليه اغلاق وباقي شيء واحد ويضبط كل شيء هو : لما اضغط على رو الدائري مثلا تجي صورة الدائري والغروب والنخيل مثل , واذا شلت التحديد من الدائري ترجع الصوره الاصليه الي انا حاطها رجل MTA وبعطيك اكوادي عشان تشوف وش الخطأ يعني باقي مكشلة الصور , والديبوق يقول مشكلتها في سطر 70 انتظرك ^^ Client ... --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { -- تيبل للانتقالات { "الدائــــــــــري", 1815.40515, 870.14069, 10.53743 }, { "النــــخــــيــــل", 2077.17993, 868.93744, 6.86413 }, { "الــــــغــــــروب", 674.92969, 1931.07874, 5.53906 }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[2], v[3], v[4] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( )-- وظيفة قفل+فتح النافذه guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) end end end ) addEventHandler("onClientGUIClick",root,function( ) if ( source == Button2 ) then -- تحقق من زر2 اغلاق النافذه guiSetVisible ( wnd, false ) -- اخفاء النافذه او اظهارها باستخدام true-or-false showCursor ( guiGetVisible ( wnd ) ) -- اظهار مؤشر الماوس elseif ( source == GridList ) then -- تحقق من القريد ليست if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then -- نتحقق انه اختار شيء من اللسته local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 )-- if ( fName ~= '' ) then guiStaticImageLoadImage ( MTA, ""..fName..".png" ) -- عند الضغط على الرو تتغير الصوره else guiStaticImageLoadImage ( MTA, "MTA.png" ) -- نرجع الصوره الاصليه اذا ماضغط على الرو end end end end ) -- meta.xml "Mr.R" version="1.0" type="script" name="PanelWarp"/> Link to comment
Mr.R Posted September 16, 2014 Author Share Posted September 16, 2014 --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { { "الدائــــــــــري", x, y, z }, { "النــــخــــيــــل", x, y, z }, { "الــــــغــــــروب", x, y, z }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[2], v[3], v[4] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) end end end ) إذ كآن آلتيبل صعب عليك آو مآتفهم له كثير إستخدم كودي لآنه مرهـ سهل --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local rowD = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, rowD, 1, "الدائــــــــــري", false, false ) local rowN = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, rowN, 1, "النــــخــــيــــل", false, false ) local rowQ = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, rowQ, 1, "الــــــغــــــروب", false, false ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( ) guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == Button1 ) then local HoHo = guiGridListGetItemText (GridList, guiGridListGetSelectedItem (GridList), 1) if HoHo == "" then return outputChatBox ( "آختر مكآن للإنتقآل إليه", 255, 255, 0, true ) elseif HoHo == "الدائــــــــــري" then setElementPosition ( localPlayer, , yd, zd) outputChatBox ( "تم نقلك إلى آلدآئري", 255, 255, 0, true ) elseif HoHo == "النــــخــــيــــل" then setElementPosition ( localPlayer, xn, yn, zn) outputChatBox ( "تم نقلك إلى آلنخيل", 255, 255, 0, true ) elseif HoHo == "الــــــغــــــروب" then setElementPosition ( localPlayer, xq, yq, zq) outputChatBox ( "تم نقلك إلى آلغروب", 255, 255, 0, true ) end end end ) مشكور حبيبي ماقصرت على كودك نستفيد منه يوم من الايام , التيبل بالنسبه لي افضل واختصار , بدل محط ملف سيرفر وشكرا ^^ Link to comment
KING-_-HOHO Posted September 16, 2014 Share Posted September 16, 2014 عدل على كود تحويل آلصورهـ وخله كذآ addEventHandler("onClientGUIClick", root, function( ) if ( source == Button2 ) then guiSetVisible ( wnd, false ) showCursor ( guiGetVisible ( wnd ) ) elseif ( source == GridList ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) if fName == ''الدائــــــــــري" then guiStaticImageLoadImage ( GUIEditor.staticimage[1], "d.png" ) elseif fName == "النــــخــــيــــل" then guiStaticImageLoadImage ( GUIEditor.staticimage[1], "n.png" ) elseif fName == "الــــــغــــــروب" then guiStaticImageLoadImage ( GUIEditor.staticimage[1], "g.png" ) elseif fName == "" then guiStaticImageLoadImage ( GUIEditor.staticimage[1], "MTA.png" ) end end end end ) Link to comment
Mr.R Posted September 16, 2014 Author Share Posted September 16, 2014 عدل على كود تحويل آلصورهـ وخله كذآ addEventHandler("onClientGUIClick", root, function( ) if ( source == Button2 ) then guiSetVisible ( wnd, false ) showCursor ( guiGetVisible ( wnd ) ) elseif ( source == GridList ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) if fName == ''الدائــــــــــري" then guiStaticImageLoadImage ( GUIEditor.staticimage[1], "d.png" ) elseif fName == "النــــخــــيــــل" then guiStaticImageLoadImage ( GUIEditor.staticimage[1], "n.png" ) elseif fName == "الــــــغــــــروب" then guiStaticImageLoadImage ( GUIEditor.staticimage[1], "g.png" ) elseif fName == "" then guiStaticImageLoadImage ( GUIEditor.staticimage[1], "MTA.png" ) end end end end ) ياعيوني مشكور على الفزعه لبى قلبك بس عندك خطأ الحمد الله اني قفطته هو : if fName =='' الدائــــــــــري" then -- المفروض يكون كذا بس صلحته الحمد الله خخ if fName == "الدائــــــــــري" then -- مشكور انت والشباب على المساعده <3 -- واستفدت وتعلمت من اخطائي بالتوفيق -- اعتذر بس فيه خطأ ثاني اسفين هههاي , اول مااشغل المود تطلع النافذه بوجهي Link to comment
KING-_-HOHO Posted September 16, 2014 Share Posted September 16, 2014 ياعيوني مشكور على الفزعه لبى قلبك بس عندك خطأ الحمد الله اني قفطته هو : if fName =='' الدائــــــــــري" then -- المفروض يكون كذا بس صلحته الحمد الله خخ if fName == "الدائــــــــــري" then -- مشكور انت والشباب على المساعده <3 -- واستفدت وتعلمت من اخطائي بالتوفيق -- اعتذر بس فيه خطأ ثاني اسفين هههاي , اول مااشغل المود تطلع النافذه بوجهي آلشكر لله آولاً وآخراً ضيف ذآ guiSetVisible (wnd, false ) بعد آلنآفذه على طول يسير كذآ wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetVisible (wnd, false ) Link to comment
AboShanab Posted September 16, 2014 Share Posted September 16, 2014 (edited) --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { -- تيبل للانتقالات { "الدائــــــــــري", "d.png", 1815.40515, 870.14069, 10.53743 }, { "النــــخــــيــــل", "n.png", 2077.17993, 868.93744, 6.86413 }, { "الــــــغــــــروب", "g.png", 674.92969, 1931.07874, 5.53906 }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[3], v[4], v[5] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( )-- وظيفة قفل+فتح النافذه guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == GridList ) then if ( guiGridListGetSelectedItem ( source ) ~= -1 ) then local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) for _,v in ipairs ( WarpTaple ) do if ( v[1] == fName ) then if ( v[2] ~= "" or v[2] ~= " " ) then guiStaticImageLoadImage ( GUIEditor.staticimage[1], tostring ( v[2] ) ) end end end else guiStaticImageLoadImage ( GUIEditor.staticimage[1], "MTA.png" ) end elseif ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) else outputChatBox ( "* Please Select Place !", 255, 0, 0, true ) end elseif ( source == Button2 ) then guiSetVisible ( wnd, false ) showCursor ( false ) end end ) Edited September 17, 2014 by Guest Link to comment
KING-_-HOHO Posted September 16, 2014 Share Posted September 16, 2014 --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { -- تيبل للانتقالات { "الدائــــــــــري", "d.png", 1815.40515, 870.14069, 10.53743 }, { "النــــخــــيــــل", "n.png", 2077.17993, 868.93744, 6.86413 }, { "الــــــغــــــروب", "g.png", 674.92969, 1931.07874, 5.53906 }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[3], v[4], v[6] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( )-- وظيفة قفل+فتح النافذه guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == GridList ) then if ( guiGridListGetSelectedItem ( source ) ~= -1 ) then local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) for _,v in ipairs ( WarpTaple ) do if ( v[1] == fName ) then if ( v[2] ~= "" or v[2] ~= " " ) then guiStaticImageLoadImage ( GUIEditor.staticimage[1], tostring ( v[2] ) ) end end end else guiStaticImageLoadImage ( GUIEditor.staticimage[1], "MTA.png" ) end elseif ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) end elseif ( source == Button2 ) then guiSetVisible ( wnd, false ) showCursor ( false ) end end ) ؟؟ عطيته آلكود وآشتغل Link to comment
#DRAGON!FIRE Posted September 16, 2014 Share Posted September 16, 2014 كود ابو شنب مرتب اكثر وافضل له لو يبي يضيف شي يضيفه بكل سهولة للتيبل وانتهينا .. ليه انت مصعب الامور يسوي التيبل وخلاص . Link to comment
KING-_-HOHO Posted September 16, 2014 Share Posted September 16, 2014 كود ابو شنب مرتب اكثر وافضل لهلو يبي يضيف شي يضيفه بكل سهولة للتيبل وانتهينا .. ليه انت مصعب الامور يسوي التيبل وخلاص . من عيوني Link to comment
Mr.R Posted September 16, 2014 Author Share Posted September 16, 2014 مشكورين على اكوادكم استفدت منها كلها هذا الكود عاجبني مثل طبلاتي بالضبط , بس فيه مشكله يابو شنب اذا ضغط زر ماينقلني ناقص شيء واحد وهو الانتقال اذا ضغطت الزر ماينقل , لو نحلها خلاص بكون مبسوط لان كل شيء بغيته موجود وعرفت له اذا ضغطت زر ونتقال يطلع لي في الشات تم الانتقال بس ماينقلني وهذا الكود --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { -- تيبل للانتقالات { "الدائــــــــــري", "d.png", 1815.40515, 870.14069, 10.53743 }, { "النــــخــــيــــل", "n.png", 2077.17993, 868.93744, 6.86413 }, { "الــــــغــــــروب", "g.png", 674.92969, 1931.07874, 5.53906 }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetVisible (wnd, false ) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[3], v[4], v[6] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( )-- وظيفة قفل+فتح النافذه guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == GridList ) then if ( guiGridListGetSelectedItem ( source ) ~= -1 ) then local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) for _,v in ipairs ( WarpTaple ) do if ( v[1] == fName ) then if ( v[2] ~= "" or v[2] ~= " " ) then guiStaticImageLoadImage ( GUIEditor.staticimage[1], tostring ( v[2] ) ) end end end else guiStaticImageLoadImage ( GUIEditor.staticimage[1], "MTA.png" ) end elseif ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) end elseif ( source == Button2 ) then guiSetVisible ( wnd, false ) showCursor ( false ) end end ) الديوبق يقول المشكله في سطر 69 ^^ Link to comment
shwaeki Posted September 16, 2014 Share Posted September 16, 2014 --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { -- تيبل للانتقالات { "الدائــــــــــري", "d.png", 1815.40515, 870.14069, 10.53743 }, { "النــــخــــيــــل", "n.png", 2077.17993, 868.93744, 6.86413 }, { "الــــــغــــــروب", "g.png", 674.92969, 1931.07874, 5.53906 }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetVisible (wnd, false ) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[3], v[4], v[5] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( )-- وظيفة قفل+فتح النافذه guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == GridList ) then if ( guiGridListGetSelectedItem ( source ) ~= -1 ) then local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) for _,v in ipairs ( WarpTaple ) do if ( v[1] == fName ) then if ( v[2] ~= "" or v[2] ~= " " ) then guiStaticImageLoadImage ( GUIEditor.staticimage[1], tostring ( v[2] ) ) end end end else guiStaticImageLoadImage ( GUIEditor.staticimage[1], "MTA.png" ) end elseif ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) end elseif ( source == Button2 ) then guiSetVisible ( wnd, false ) showCursor ( false ) end end ) Link to comment
KING-_-HOHO Posted September 16, 2014 Share Posted September 16, 2014 --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { -- تيبل للانتقالات { "الدائــــــــــري", "d.png", 1815.40515, 870.14069, 10.53743 }, { "النــــخــــيــــل", "n.png", 2077.17993, 868.93744, 6.86413 }, { "الــــــغــــــروب", "g.png", 674.92969, 1931.07874, 5.53906 }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetVisible (wnd, false ) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[3], v[4], v[5] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( )-- وظيفة قفل+فتح النافذه guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == GridList ) then if ( guiGridListGetSelectedItem ( source ) ~= -1 ) then local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) for _,v in ipairs ( WarpTaple ) do if ( v[1] == fName ) then if ( v[2] ~= "" or v[2] ~= " " ) then guiStaticImageLoadImage ( GUIEditor.staticimage[1], tostring ( v[2] ) ) end end end else guiStaticImageLoadImage ( GUIEditor.staticimage[1], "MTA.png" ) end elseif ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) setElementPosition ( localPlayer, unpack ( guiGridListGetItemData ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) end elseif ( source == Button2 ) then guiSetVisible ( wnd, false ) showCursor ( false ) end end ) X جرب --[[------------------------------------------------- Created By Mr.R Skype : Httttt7_Ksa --]]------------------------------------------------- GUIEditor = { label = {}, staticimage = {} } WarpTaple = { -- تيبل للانتقالات { "الدائــــــــــري", "d.png", 1815.40515, 870.14069, 10.53743 }, { "النــــخــــيــــل", "n.png", 2077.17993, 868.93744, 6.86413 }, { "الــــــغــــــروب", "g.png", 674.92969, 1931.07874, 5.53906 }, } addEventHandler("onClientResourceStart", resourceRoot, function ( ) wnd = guiCreateWindow(181, 109, 426, 360, "=[ Panel Places v1.0 By Mr.R ]=", false) guiSetVisible (wnd, false ) guiSetProperty(wnd, "CaptionColour", "FFFA0000") guiWindowSetSizable(wnd, false) GridList = guiCreateGridList(9, 22, 202, 328, false, wnd) guiGridListAddColumn(GridList, "Places ...", 0.9) for _,v in ipairs ( WarpTaple ) do local row = guiGridListAddRow ( GridList ) guiGridListSetItemText ( GridList, row, 1, v[1], false, false ) guiGridListSetItemData ( GridList, row, 1, { v[3], v[4], v[5] } ) end Button1 = guiCreateButton(250, 247, 134, 39, "=[ Warp ]=", false, wnd) guiSetProperty(Button1, "NormalTextColour", "FFAAAAAA") Button2 = guiCreateButton(250, 296, 134, 39, "=[ X ]=", false, wnd) setElementData(Button1, "tooltip-text", "انتقل", false) setElementData(Button2, "tooltip-text", "اغلاق", false) guiSetProperty(Button2, "NormalTextColour", "FFAAAAAA") GUIEditor.staticimage[1] = guiCreateStaticImage(221, 28, 178, 155, "MTA.png", false, wnd) GUIEditor.label[1] = guiCreateLabel(264, 188, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[1], "sa-gothic") guiLabelSetColor(GUIEditor.label[1], 245, 7, 46) GUIEditor.label[2] = guiCreateLabel(343, 209, 24, 28, "*", false, wnd) guiSetFont(GUIEditor.label[2], "sa-gothic") guiLabelSetColor(GUIEditor.label[2], 191, 25, 226) end ) bindKey ( "F3", "down", function ( )-- وظيفة قفل+فتح النافذه guiSetVisible ( wnd, not guiGetVisible ( wnd ) ) showCursor ( guiGetVisible ( wnd ) ) end ) addEventHandler("onClientGUIClick", resourceRoot, function ( ) if ( source == GridList ) then if ( guiGridListGetSelectedItem ( source ) ~= -1 ) then local fName = guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) for _,v in ipairs ( WarpTaple ) do if ( v[1] == fName ) then if ( v[2] ~= "" or v[2] ~= " " ) then guiStaticImageLoadImage ( GUIEditor.staticimage[1], tostring ( v[2] ) ) end end end else guiStaticImageLoadImage ( GUIEditor.staticimage[1], "MTA.png" ) end elseif ( source == Button1 ) then if ( guiGridListGetSelectedItem ( GridList ) ~= -1 ) then if ( isTimer ( Timer ) ) then return end Timer = setTimer ( function ( ) end, 4000, 1 ) for _,v in ipairs ( WarpTaple ) do if ( v[3] ~= "" or v[3] ~= " " and v[4] ~= "" or v[4] ~= " " and v[5] ~= "" or v[5] ~= " " ) then setElementPosition ( localPlayer, tostring ( v[4] ), tostring ( v[4] ), tostring ( v[5] ) ) outputChatBox ( "* تم الإنتقال الى ".. guiGridListGetItemText ( GridList, guiGridListGetSelectedItem ( GridList ), 1 ) .."", 255, 255, 0, true ) end end end elseif ( source == Button2 ) then guiSetVisible ( wnd, false ) showCursor ( false ) end end ) 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