
jafar
Members-
Posts
1,434 -
Joined
-
Last visited
Everything posted by jafar
-
الكول شيب الي تستخدمه ماله ارتفاع محدد فاستخدم createColCuboid
-
guiGridListSetItemData guiGridListGetItemData
-
+ bone_attach https://community.multitheftauto.com/in ... ls&id=2540 النار مو المنت : )
-
filePath = مسار الملف -- ترتيبها يكون كذا i, v و i = عدد القيم v = القيم -- لاحظ إني عامل داخل جدول الصورة 3 جداول أخرى وأحين أمبي أجيب القيمة الأولى من كل من جدول ف راح أستخدم v [ 1 ] وف نفس الحالة إذا بغيت القيمة الثانية ف راح أستخدم v [ 2 ] -- يعني نعمل تحميل جديد للصورة عشان تظهر صورة أخرى -- إطرح أكوادك وأضبطه لك : )
-
اخ جعفر اشرح كودك سطر سطر محتاجه ووين احط صور ووش تقصد باحداثيات صوره اشرح كود كامل لاهنت أنا عامل إحداثيات الصورة من عندي إلى هي 200, 200, 100, 100 لكن طبعاً الإحداثيات الموجودة عنده غير عني -- بالنسبة لشرح الكود: ImgTable = { -- جدول عشان تضيف أسماء الصور + إسمها الموجود في المود { "img1", "img1.png" }; { "img2", "img2.png" }; { "img3", "img3.png" }; -- { "imgName, "filePath" }; }; img = guiCreateStaticImage ( 200, 200, 100, 100, "img1.png", false ); -- إنشاء صورة guiSetVisible ( img, false ); -- نخفي الصورة for i, v in ipairs ( ImgTable ) do -- نجيب جميع القيم الموجودة ف الجدول local row = guiGridListAddRow ( gridlist ); -- نضيف سطر guiGridListSetItemText ( gridlist, row, 1, v [ 1 ], false, false ); -- نخلي أسماء الصور داخل القريد ليست guiGridListSetItemData ( gridlist, row, 1, v [ 2 ] ); -- نحط داتا على إسم الصورة عشان نجيب مسارها end -- إغلاق اللوب addEventHandler ( "onClientGUIClick", root, -- حدث ضغط الزر function ( ) -- وظيفة if source == gridlist then -- إذا ضغطت على القريد ليست if guiGetVisible ( img ) == false then guiSetVisible ( img, true ); end -- إذا كانت الصورة مخفية نجعلها تظهر local filePath = guiGridListGetItemData ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 ); -- نجيب مسار الصورة المحفوظة مسبقاً if filePath and filePath ~= "" then -- نتأكد إن اللاعب محدد إسم الصورة guiStaticImageLoadImage ( img, filePath ); -- نسوي لود للصورة المطلوبة end end end );
-
4 صحفات عشان سطرين !!
-
إستبدل الـ , gridlist بإسم القريد لست حقك. واستبدل احداثيات الصورة بإحداثيات صورتك : ) ImgTable = { { "img1", "img1.png" }; { "img2", "img2.png" }; { "img3", "img3.png" }; -- { "imgName, "filePath" }; }; img = guiCreateStaticImage ( 200, 200, 100, 100, "img1.png", false ); guiSetVisible ( img, false ); for i, v in ipairs ( ImgTable ) do local row = guiGridListAddRow ( gridlist ); guiGridListSetItemText ( gridlist, row, 1, v [ 1 ], false, false ); guiGridListSetItemData ( gridlist, row, 1, v [ 2 ] ); end addEventHandler ( "onClientGUIClick", root, function ( ) if source == gridlist then if guiGetVisible ( img ) == false then guiSetVisible ( img, true ); end local filePath = guiGridListGetItemData ( gridlist, guiGridListGetSelectedItem ( gridlist ), 1 ); if filePath and filePath ~= "" then guiStaticImageLoadImage ( img, filePath ); end end end );
-
النسخة الموجودة حالياً تجريبية وليست رسمية , وفيها اخطاء وهم الان يصلحونها .
-
setElementData getElementData
-
getPlayerAccount setAccountData getAccountData في مكان حذف الرتبة
-
الخبر صار له قرن
-
https://community.multitheftauto.com/in ... ls&id=3054
-
استبدل x, y, z الموجودين في الجدول بإحداثياتك GUIEditor = { staticimage = {}, label = {}, gridlist = {}, combobox = {}, memo = {} } Positions = { { x, y, z }; { x, y, z }; { x, y, z }; { x, y, z }; -- { x, y, z }; }; addEventHandler( "onClientResourceStart", resourceRoot, function( ) wnd = guiCreateWindow(431, 221, 748, 663, "FlyMTA|AirPort", false) guiWindowSetSizable(wnd, false) guiSetAlpha(wnd, 0.83) guiSetProperty(wnd, "CaptionColour", "FF2DB4D1") guiSetVisible( wnd, false ) ls = guiCreateButton(9, 19, 191, 250, "LS", false, wnd) guiSetFont(ls, "default-bold-small") guiSetProperty(ls, "NormalTextColour", "FF89D725") sf = guiCreateButton(9, 281, 191, 327, "SF", false, wnd) guiSetFont(sf, "clear-normal") guiSetProperty(sf, "NormalTextColour", "FF321BDF") lv = guiCreateButton(202, 21, 179, 250, "LV", false, wnd) guiSetFont(lv, "default-small") guiSetProperty(lv, "NormalTextColour", "FF7F9F5C") exit = guiCreateButton(200, 280, 181, 328, "Exit", false, wnd) guiSetFont(exit, "clear-normal") guiSetProperty(exit, "NormalTextColour", "FFF7062E") GUIEditor.gridlist[1] = guiCreateGridList(640, 28, 98, 625, false, wnd) guiGridListAddColumn(GUIEditor.gridlist[1], "AirPort Online", 0.9) guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], 0, 1, "SOON", false, false) GUIEditor.label[1] = guiCreateLabel(431, 32, 195, 26, "FlyMTA V.1.0", false, wnd) guiSetFont(GUIEditor.label[1], "clear-normal") guiLabelSetColor(GUIEditor.label[1], 31, 211, 218) GUIEditor.staticimage[1] = guiCreateStaticImage(449, 173, 118, 181, ":guieditor/images/examples/mtalogo.png", false, wnd) guiSetProperty(GUIEditor.staticimage[1], "ImageColours", "tl:FF787E7C tr:FF787E7C bl:FF787E7C br:FF787E7C") GUIEditor.memo[1] = guiCreateMemo(411, 373, 200, 280, "Welcome To FlyMTA !!\n\n--\n\nمرحبا بك في فلاي ام تي اي \nلاول مره في لعبه ..\n\nMTA Plus !\nAirPort Online !\nRate ! \n\n--\n\nBy Mostafa \n\n", false, wnd) guiMemoSetReadOnly(GUIEditor.memo[1], true) GUIEditor.label[2] = guiCreateLabel(413, 89, 126, 15, "Rate :", false, wnd) guiSetFont(GUIEditor.label[2], "clear-normal") guiLabelSetColor(GUIEditor.label[2], 26, 219, 158) GUIEditor.combobox[1] = guiCreateComboBox(545, 91, 91, 61, "", false, wnd) guiSetFont(GUIEditor.combobox[1], "clear-normal") guiComboBoxAddItem(GUIEditor.combobox[1], "Bad") guiComboBoxAddItem(GUIEditor.combobox[1], "Nice") GUIEditor.label[3] = guiCreateLabel(-8, -18, 99, 18, "", false, GUIEditor.combobox[1]) GUIEditor.staticimage[2] = guiCreateStaticImage(327, 636, 24, 17, ":guieditor/images/dx_elements/slider_end.png", false, wnd) GUIEditor.staticimage[3] = guiCreateStaticImage(581, 238, 38, 38, ":guieditor/images/plus.png", false, wnd) GUIEditor.label[4] = guiCreateLabel(439, 149, 133, 14, "", false, wnd) GUIEditor.staticimage[4] = guiCreateStaticImage(620, 167, 10, 34, ":dxgui/images/checkboxcheck.png", false, wnd) for i, v in ipairs ( Positions ) do createMarker ( v [ 1 ], v [ 2 ], v [ 3 ], "cylinder", 2, 0, 125, 125, 125 ) end end ) function RenderDx ( ) dxDrawImage(1378, 331, 124, 187, ":guieditor/images/examples/mtalogo.png", 0, 0, 0, tocolor(255, 255, 255, 255), true) dxDrawText("FlyMTA", 1380, 542, 1594, 577, tocolor(58, 233, 11, 255), 1.00, "pricedown", "left", "top", false, false, true, true, false) end addEventHandler( "onClientGUIClick", resourceRoot, function( ) if ( source == ls ) then setElementPosition ( localPlayer, posX, posY, posZ ) outputChatBox( "FlyMTA : Welcome To LS City" ) elseif ( source == sf ) then setElementPosition ( localPlayer, posX, posY, posZ ) outputChatBox( "FlyMTA : Welcome To SF City" ) elseif ( source == lv ) then setElementPosition ( localPlayer, posX, posY, posZ ) outputChatBox( "FlyMTA : Welcome To LV City" ) elseif ( source == exit ) then removeEventHandler( "onClientRender", root, RenderDx ) guiSetVisible( wnd, false ) showCursor( guiGetVisible ( wnd ) ) end end ) addEventHandler( "onClientMarkerHit", resourceRoot, function( element ) if ( element == getLocalPlayer( ) ) then addEventHandler( "onClientRender", root, RenderDx ) guiSetVisible( wnd, true ) showCursor( guiGetVisible ( wnd ) ) end end )
-
"onPlayerChat" getPlayerName or text -- from event cancelEvent outputChatBox ملاحظة: اذا تستخدم تاج ضع ضع الأكواد داخل حدث onPlayerChat الموجود ف مود التاج
-
ما يحتاج register يسويه بالاكاونت داتا اذا سجل دخوله
-
عندك خطأ في الوظيفة الأولى, إستخدم التيبل . getAllPlayerInInterior = function ( interior ) t = { }; if interior and tonumber ( interior ) then for _, Players in ipairs ( getElementsByType ( "player" ) ) do if getElementInterior ( Players ) == interior then table.insert ( t, Players ); end end end return t end مثال : for _, Players in ipairs ( getAllPlayerInInterior ( 1 ) ) do setElementInterior ( Players, 0 ); end بالنسبة للوظيفة الثانية . getCountAllPlayerInInterior = function ( interior ) CountPlayers = 0 if interior and tonumber ( interior ) then for _, Players in ipairs ( getElementsByType ( "player" ) ) do if getElementInterior ( Players ) == interior then CountPlayers = CountPlayers + 1 end end end return CountPlayers end
-
-------------------------------------------------------------- -- Code Move Gui Down To Center ------------- -- Create By Booo ----------- -------------------------------------------------------------- TimeGuiSetDownC = { } function guiMoveDownToCenter(gui) if getElementData(gui,"HelhGui") == false then setElementData(gui,"HelhGui",true) local s1,s2=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (s1-w1)/2,(s2-w2)/2 guiSetPosition(gui,x,(w2*4),false) TimeGuiSetDownC[gui] = setTimer(guiMoveDownToCenter,50,0,gui) end local a,b=guiGetScreenSize() local w1,w2=guiGetSize(gui,false) local x,y = (a-w1)/2,(b-w2)/2 local x1,y1 = guiGetPosition ( gui, false) if (y1 <= y) then killTimer(TimeGuiSetDownC[gui]) setElementData(gui,"HelhGui",false) else guiSetPosition(gui,x1,(y1-10),false) end end window = guiCreateWindow ( 100, 100, 100, 100, "", false ); guiMoveDownToCenter ( window );
-
صادتني من قبل , أعد تشغيل اللعبة