SaedAmer Posted May 27, 2016 Share Posted May 27, 2016 function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end MKAN = { {"البداية",3490.43726,-1940.38354,12.18125}, {"الحلبه",2817.75806,-1743.10510,9.97133}, {"البنك",1478.26538,-1705.67419,14.04688}, {"مركز الشرطة",function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end MKAN = { {"البداية",3490.43726,-1940.38354,12.18125}, {"الحلبه",2817.75806,-1743.10510,9.97133}, {"البنك",1478.26538,-1705.67419,14.04688}, {"مركز الشرطة",1521.77258,-1677.03223,13.54688}, {"المجمع السكني",3393.76758,-1732.79016,10.90000}, {"حارة سي جي",2491.12109375, -1667.4482421875, 13.34375}, {"السد الكبير",-887.02734375, 2000.9217529297, 60.654315948486}, {"الدائري",1678.33533, 1447.70569, 10.77515}, {"شارع النخيل",2068.1389160156, 1008.2157592773, 10.671875}, {"شارع الفروسيه",2878.1115722656, -1110.029296875, 10.882762908936}, {"شارع الغروب",662.55310058594, 1936.7479248047, 5.5052728652954}, {"ساحه التفجير",-2051.4926757813, -173.29304504395, 35.3203125}, {"الجسر المعلق", -1160.81372,1078.04163,40.23039}, {"معرض السيارات 1", -1988.24353,287.47321,34.30679}, {"معرض السيارات 2", 2128.78906,-1126.25452,25.53082}, {"معرض السيارات 3", 544.69055,-1273.57458,17.24824}, {"معرض السيارات 4", 1917.88013,2070.78638,10.82031}, {"السينما",-2012.24548,441.59763,35.17188}, } ------------ bindKey("f6","down", function () guiSetVisible(wnd,not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end ) for i,mk in ipairs(MKAN) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,mk[1],false,false) guiGridListSetItemData(grid,row,1,{mk[2],mk[3],mk[4]}) guiGridListSetItemColor(grid,row,1,math.random(0,255),math.random(0,255),math.random(0,255)) end addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) if source == move then if sel ~= -1 then local x,y,z = unpack(guiGridListGetItemData(grid,sel,1)) setElementPosition(localPlayer,x,y,z) else outputChatBox("* الرجاء اختيار مكان",255,0,0) end end end ) addEventHandler("onClientGUIClick",root, function () if ( source == move ) then guiSetVisible(wnd,false) showCursor(false) end ) Link to comment
Mhmd.z Posted May 27, 2016 Share Posted May 27, 2016 مو حاط احداثيات عند مركز الشرطه ومو مغلق الجدول, ناقصك اند end function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end MKAN = { {"البداية",3490.43726,-1940.38354,12.18125}, {"الحلبه",2817.75806,-1743.10510,9.97133}, {"البنك",1478.26538,-1705.67419,14.04688}, {"مركز الشرطة",0,0,0} } function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end MKAN = { {"البداية",3490.43726,-1940.38354,12.18125}, {"الحلبه",2817.75806,-1743.10510,9.97133}, {"البنك",1478.26538,-1705.67419,14.04688}, {"مركز الشرطة",1521.77258,-1677.03223,13.54688}, {"المجمع السكني",3393.76758,-1732.79016,10.90000}, {"حارة سي جي",2491.12109375, -1667.4482421875, 13.34375}, {"السد الكبير",-887.02734375, 2000.9217529297, 60.654315948486}, {"الدائري",1678.33533, 1447.70569, 10.77515}, {"شارع النخيل",2068.1389160156, 1008.2157592773, 10.671875}, {"شارع الفروسيه",2878.1115722656, -1110.029296875, 10.882762908936}, {"شارع الغروب",662.55310058594, 1936.7479248047, 5.5052728652954}, {"ساحه التفجير",-2051.4926757813, -173.29304504395, 35.3203125}, {"الجسر المعلق", -1160.81372,1078.04163,40.23039}, {"معرض السيارات 1", -1988.24353,287.47321,34.30679}, {"معرض السيارات 2", 2128.78906,-1126.25452,25.53082}, {"معرض السيارات 3", 544.69055,-1273.57458,17.24824}, {"معرض السيارات 4", 1917.88013,2070.78638,10.82031}, {"السينما",-2012.24548,441.59763,35.17188}, } ------------ bindKey("f6","down", function () guiSetVisible(wnd,not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end ) for i,mk in ipairs(MKAN) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,mk[1],false,false) guiGridListSetItemData(grid,row,1,{mk[2],mk[3],mk[4]}) guiGridListSetItemColor(grid,row,1,math.random(0,255),math.random(0,255),math.random(0,255)) end addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) if source == move then if sel ~= -1 then local x,y,z = unpack(guiGridListGetItemData(grid,sel,1)) setElementPosition(localPlayer,x,y,z) else outputChatBox("* الرجاء اختيار مكان",255,0,0) end end end ) addEventHandler("onClientGUIClick",root, function () if ( source == move ) then guiSetVisible(wnd,false) showCursor(false) end end ) Link to comment
[iMr]-W[i]Fi,.! Posted May 27, 2016 Share Posted May 27, 2016 function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end MKAN = { {"البداية",3490.43726,-1940.38354,12.18125}, {"الحلبه",2817.75806,-1743.10510,9.97133}, {"البنك",1478.26538,-1705.67419,14.04688}, {"مركز الشرطة",function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end MKAN = { {"البداية",3490.43726,-1940.38354,12.18125}, {"الحلبه",2817.75806,-1743.10510,9.97133}, {"البنك",1478.26538,-1705.67419,14.04688}, {"مركز الشرطة",1521.77258,-1677.03223,13.54688}, {"المجمع السكني",3393.76758,-1732.79016,10.90000}, {"حارة سي جي",2491.12109375, -1667.4482421875, 13.34375}, {"السد الكبير",-887.02734375, 2000.9217529297, 60.654315948486}, {"الدائري",1678.33533, 1447.70569, 10.77515}, {"شارع النخيل",2068.1389160156, 1008.2157592773, 10.671875}, {"شارع الفروسيه",2878.1115722656, -1110.029296875, 10.882762908936}, {"شارع الغروب",662.55310058594, 1936.7479248047, 5.5052728652954}, {"ساحه التفجير",-2051.4926757813, -173.29304504395, 35.3203125}, {"الجسر المعلق", -1160.81372,1078.04163,40.23039}, {"معرض السيارات 1", -1988.24353,287.47321,34.30679}, {"معرض السيارات 2", 2128.78906,-1126.25452,25.53082}, {"معرض السيارات 3", 544.69055,-1273.57458,17.24824}, {"معرض السيارات 4", 1917.88013,2070.78638,10.82031}, {"السينما",-2012.24548,441.59763,35.17188}, } ------------ bindKey("f6","down", function () guiSetVisible(wnd,not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end ) for i,mk in ipairs(MKAN) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,mk[1],false,false) guiGridListSetItemData(grid,row,1,{mk[2],mk[3],mk[4]}) guiGridListSetItemColor(grid,row,1,math.random(0,255),math.random(0,255),math.random(0,255)) end addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) if source == move then if sel ~= -1 then local x,y,z = unpack(guiGridListGetItemData(grid,sel,1)) setElementPosition(localPlayer,x,y,z) else outputChatBox("* الرجاء اختيار مكان",255,0,0) end end end ) addEventHandler("onClientGUIClick",root, function () if ( source == move ) then guiSetVisible(wnd,false) showCursor(false) end ) function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end MKAN = { {"البداية",3490.43726,-1940.38354,12.18125}, {"الحلبه",2817.75806,-1743.10510,9.97133}, {"البنك",1478.26538,-1705.67419,14.04688}, {"مركز الشرطة",1521.77258,-1677.03223,13.54688}, {"المجمع السكني",3393.76758,-1732.79016,10.90000}, {"حارة سي جي",2491.12109375, -1667.4482421875, 13.34375}, {"السد الكبير",-887.02734375, 2000.9217529297, 60.654315948486}, {"الدائري",1678.33533, 1447.70569, 10.77515}, {"شارع النخيل",2068.1389160156, 1008.2157592773, 10.671875}, {"شارع الفروسيه",2878.1115722656, -1110.029296875, 10.882762908936}, {"شارع الغروب",662.55310058594, 1936.7479248047, 5.5052728652954}, {"ساحه التفجير",-2051.4926757813, -173.29304504395, 35.3203125}, {"الجسر المعلق", -1160.81372,1078.04163,40.23039}, {"معرض السيارات 1", -1988.24353,287.47321,34.30679}, {"معرض السيارات 2", 2128.78906,-1126.25452,25.53082}, {"معرض السيارات 3", 544.69055,-1273.57458,17.24824}, {"معرض السيارات 4", 1917.88013,2070.78638,10.82031}, {"السينما",-2012.24548,441.59763,35.17188}, } ------------ bindKey("f6","down", function () guiSetVisible(wnd,not guiGetVisible(wnd)) showCursor(guiGetVisible(wnd)) end ) for i,mk in ipairs(MKAN) do local row = guiGridListAddRow(grid) guiGridListSetItemText(grid,row,1,mk[1],false,false) guiGridListSetItemData(grid,row,1,{mk[2],mk[3],mk[4]}) guiGridListSetItemColor(grid,row,1,math.random(0,255),math.random(0,255),math.random(0,255)) end addEventHandler("onClientGUIClick",root, function () local sel = guiGridListGetSelectedItem(grid) if source == move then if sel ~= -1 then local x,y,z = unpack(guiGridListGetItemData(grid,sel,1)) setElementPosition(localPlayer,x,y,z) else outputChatBox("* الرجاء اختيار مكان",255,0,0) end end end ) addEventHandler("onClientGUIClick",root, function () if ( source == move ) then guiSetVisible(wnd,false) showCursor(false) end ) Link to comment
a7zan Posted May 28, 2016 Share Posted May 28, 2016 وين باقي الاكواد ؟ الخطاء مب موجود بالاكوواد الي انت حاطها Link to comment
Me[Z]oO Posted May 28, 2016 Share Posted May 28, 2016 وين باقي الاكواد ؟ الخطاء مب موجود بالاكوواد الي انت حاطها ليش معصب ض ؟ اسويلك شاي امزح امزح , منور احزان Link to comment
a7zan Posted May 28, 2016 Share Posted May 28, 2016 وين باقي الاكواد ؟ الخطاء مب موجود بالاكوواد الي انت حاطها ليش معصب ض ؟ اسويلك شاي امزح امزح , منور احزان موب معصب ض1 لكن مو حاط الاكواد الي بها الخطاء بنورك .. Link to comment
#Soking Posted May 28, 2016 Share Posted May 28, 2016 --@-- By Soking function centerWindow(center_window) local screenW,screenH=guiGetScreenSize() local windowW,windowH=guiGetSize(center_window,false) local x,y = (screenW-windowW)/2,(screenH-windowH)/2 guiSetPosition(center_window,x,y,false) end function SetWindowVisible ( Panel , StatsP , StatsC ) guiSetVisible( Panel , StatsP) showCursor( StatsC ) centerWindow( Panel ) end function SetPlayerPosition( Element ,xPos ,yPos ,zPos ) if ( Element ) and isElement( Element ) and ( getElementType( Element ) == 'player' ) then if ( getElementHealth( Element ) > 0 ) then fadeCamera( false ) setTimer(function( ) fadeCamera( true ) setElementPosition(Element, xPos, yPos ,zPos) end , 4000 , 1 ) end end end wnd = guiCreateWindow(212, 145, 378, 289, "Test", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd,false) grid = guiCreateGridList(9, 24, 361, 218, false, wnd) guiGridListAddColumn(grid, "Name ", 0.9) guiSetFont(grid,"default-bold-small") move = guiCreateButton(9, 250, 361, 27, "Warp", false, wnd) guiSetFont(move,"default-bold-small") Table = { {"البداية",3490.43726,-1940.38354,12.18125}, {"الحلبه",2817.75806,-1743.10510,9.97133}, {"البنك",1478.26538,-1705.67419,14.04688}, {"البداية",3490.43726,-1940.38354,12.18125}, {"الحلبه",2817.75806,-1743.10510,9.97133}, {"البنك",1478.26538,-1705.67419,14.04688}, {"مركز الشرطة",1521.77258,-1677.03223,13.54688}, {"المجمع السكني",3393.76758,-1732.79016,10.90000}, {"حارة سي جي",2491.12109375, -1667.4482421875, 13.34375}, {"السد الكبير",-887.02734375, 2000.9217529297, 60.654315948486}, {"الدائري",1678.33533, 1447.70569, 10.77515}, {"شارع النخيل",2068.1389160156, 1008.2157592773, 10.671875}, {"شارع الفروسيه",2878.1115722656, -1110.029296875, 10.882762908936}, {"شارع الغروب",662.55310058594, 1936.7479248047, 5.5052728652954}, {"ساحه التفجير",-2051.4926757813, -173.29304504395, 35.3203125}, {"الجسر المعلق", -1160.81372,1078.04163,40.23039}, {"معرض السيارات 1", -1988.24353,287.47321,34.30679}, {"معرض السيارات 2", 2128.78906,-1126.25452,25.53082}, {"معرض السيارات 3", 544.69055,-1273.57458,17.24824}, {"معرض السيارات 4", 1917.88013,2070.78638,10.82031}, {"السينما",-2012.24548,441.59763,35.17188} } bindKey("F6","down",function ( ) local Get = guiGetVisible(wnd) SetWindowVisible ( wnd, not Get , not Get ) end ) for _,Valc in ipairs( Table ) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid,Row,1,Valc[1],false,false) guiGridListSetItemData(grid,Row,1,{Valc[2],Valc[3],Valc[4]} ) guiGridListSetItemColor(grid,Row,1,math.random(0,255),math.random(0,255),math.random(0,255)) end addEventHandler("onClientGUIClick",move, function () local Selected = guiGridListGetSelectedItem(grid) if ( Selected ~= -1 ) then local xPosition, yPosition, zPosition = unpack(guiGridListGetItemData(grid,Selected,1)) SetPlayerPosition( localPlayer ,xPosition, yPosition, zPosition ) SetWindowVisible ( wnd , false, false ) outputChatBox("*Welcome :"..getPlayerName(localPlayer),255,255,255) else outputChatBox("* الرجاء اختيار مكان",255,0,0) end end , false ) 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