Jump to content

#STARK

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by #STARK

  1. لي الحق اعرض السعر الي عايزه
  2. اقدر اسوي لك المود ب5$ لو عايز
  3. بدل ذا local distance = getDistanceBetweenPoints3D(unpack(Positions["A"]), unpack(Positions["B"])) بـ local distance = getDistanceBetweenPoints3D(getElementPosition(localPlayer), unpack(v))
  4. replace this exports["scoreboard"]:addScoreboardColumn("ID", root, 20, "ID", 1) with this exports["scoreboard"]:addScoreboardColumn("id", root, 20, "id", 1)
  5. هات تصميم اللوحه , شكلك مبتفهمش حاجه في الجداول انا هبرمج لك المود اقترح عليك تقراء شويه عنها هنا https://www.lua.org/pil/11.1.html
  6. addEventHandler("onPlayerJoin", root, function() local newName = "Guest#"..math.random(1000,9999) repeat newName = "Guest#"..math.random(1000,9999) until not getPlayerFromName(newName) setPlayerName(source, newName) end ) addEventHandler("onPlayerLogin", root, function(_,account) local accountName = getAccountName(account) setPlayerName(source, tostring(accountName)) end ) addEventHandler("onPlayerChangeNick", root, function() cancelEvent() end )
  7. صح كلامك ماركزتش و انا بعملو شكرا علي التنبيه
  8. for i,v in pairs(tab) do local Positions = { ["A"] = { getElementPosition(localPlayer) }, ["B"] = { unpack(v) } } local distance = getDistanceBetweenPoints3D(unpack(Positions["A"]), unpack(Positions["B"])) var = var + 1 local row = guiGridListAddRow(source) guiGridListSetItemText(source, row, 1, var, false, false) guiGridListSetItemText(source, row, 2, i, false, false) guiGridListSetItemText(source, row, 3, distance, false, false) guiGridListSetItemData(source, row, 2, v, false, false) end
  9. مش شايف مشاكل في كودي او اخطاء ..
  10. function putPlaces() local var = 0 guiGridListClear(GUIEditor.gridlist[1]) for i,v in pairs(Table) do var = var + 1 local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, var, false, false) guiGridListSetItemText(GUIEditor.gridlist[1], row, 2, i, false, false) guiGridListSetItemData(GUIEditor.gridlist[1], row, 2, v) end end addEventHandler("onClientGUIDoubleClick", guiRoot, function() if source == GUIEditor.gridlist[1] then local row = guiGridListGetSelectedItem(source) if row and row ~= -1 then if guiGridListGetItemData(source, row, 2) then local x, y, z = unpack(guiGridListGetItemData(source, row, 2)) if x and y and z then setElementPosition(localPlayer, x, y, z) end else if guiGridListGetItemText(source, row, 2) == "..." then putPlaces() end end end end end ) addEventHandler("onClientGUIDoubleClick",root, function() if source == GUIEditor.gridlist[1] then local Row = guiGridListGetSelectedItem(source) local tab = guiGridListGetItemData(source, Row, 2) local var = 1 if tab and type(tab) == "table" then guiGridListClear(source) guiGridListSetItemText(source, guiGridListAddRow(source), 1, "1", false, false) guiGridListSetItemText(source, guiGridListAddRow(source), 2, "...", false, false) for i,v in pairs(tab) do var = var + 1 local row = guiGridListAddRow(source) guiGridListSetItemText(source, row, 1, var, false, false) guiGridListSetItemText(source, row, 2, i, false, false) guiGridListSetItemData(source, row, 2, v, false, false) end end end end )
  11. انت خربت الكود خالص الي عملته انك تزود المتغير كل مره تدوس علي اي عنصر ( GUI - Element ) addEventHandler("onClientGUIClick", root, function() if source == GUIEditor.gridlist[1] then local Row, tab, var = guiGridListGetSelectedItem(source), guiGridListGetItemData(source, Row, 2), 0 if tab and type(tab) == "table" then guiGridListClear(source) guiGridListSetItemText(source, guiGridListAddRow(source), 2, "...", false, false) for i,v in pairs(tab) do var = var + 1 local row = guiGridListAddRow(source) guiGridListSetItemText(source, row, 1, var, false, false) guiGridListSetItemText(source, row, 2, i, false, false) guiGridListSetItemData(source, row, 2, v) end else if guiGridListGetItemText(source, Row, 2) == "..." then putPlaces() end end end end )
  12. شغل كويس و حلو بس في ملاحظه صغيره كدا , حاول تظبط تصاميمك عشان بصراحه كدا تحسه تصميم اطفالي
  13. مش قيمه رقميه, ذي قيمه نصيه index بكل بساطه عشان لو تبي تبي تحط الأرقام استعمال المتغيرات local var = 0 var = var + 1 بالنسبه بقا لنقل الاحداثيات الي بالكود الي فوق بدي onClientGUIClick بدل addEventHandler("onClientGUIClick",root, function() if source == GUIEditor.gridlist[1] then local Row = guiGridListGetSelectedItem(source) local tab = guiGridListGetItemData(source, Row, 1) if tab and type(tab) == "table" then guiGridListClear(source) guiGridListSetItemText(source, guiGridListAddRow(source), 1, "...", false, false) for i,v in pairs(tab) do local row = guiGridListAddRow(source) guiGridListSetItemText(source, row, 1, i, false, false) guiGridListSetItemData(source, row, 1, v, false, false) end else if guiGridListGetItemText(source, Row, 1) == "..." then putPlaces() end end end end )
  14. Table = { ["الاماكن الرئسية"] = { ['القفزة الخنفشارية'] = {1550.0161132813, -1366.4044189453, 326.2109375} , ['مركز الشرطة'] = {1543.1385498047,-1677.0050048828,13.555870056152} , ['التل الشاهق'] = {-2393.25415, -2202.31543, 33.28906} , ['مقر الجيش'] = {146.66674804688, 1720, 17.640625} , ['السد الكبير'] = {-887.02734375, 2000.9217529297, 60.654315948486} , ['مننطقة البندقية'] = {723.33862, -1487.2187523047, 1.93434} , ['الجسر المعلق'] = {-2696.1865234375, 1232.7795410156, 55.621524810791} , ['الحفرة الكبيرة'] = {369.61615, 991.90735, 30.41144} , ['المطار الاول'] = {1717.6470947266, -2494.1176757813, 13.39999961853} , ['المطار الثاني'] = {1411.7646484375, 1482.3529052734, 10.89999961853} , ['المطار الثالث'] = {-1223.4300537109, -185.74758911133, 14.39999961853} , ['حارة سي جي'] = {2491.12109375, -1667.4482421875, 13.34375} , ['ساحه التفجير'] = {-2051.4926757813, -173.29304504395, 35.3203125}, ['الطعس'] = {-2600,-2694.1176757813,10.188545227051} }, ["المهمات"] = { ["سرقة البنك"] = {593.50756835938,-1242.6812744141,18.018035888672}, }, ["الأماكن الحصرية"] = { ["مجمع المسابقات"] = {-2663.58301 ,-3501.63037 ,4.96875}, ["السينما"] = {-2273.44873 ,-3255.65088 ,4.96875}, ["الــبــنــك"] = {-3211.35742 ,-3723.10620 ,4.96875}, ["المـخـيم"] = {-2656.83716 ,-4161.00293 ,4.96875}, ["المرقص"] = {216.82785 ,-1861.02026 ,3.04643}, ["المجمع السكني"] = {-2435.36230 ,-3533.46777 ,5.00000}, ["المسبح"] = {2900.79004, -635.14856, 10.83594}, }, } function putPlaces() guiGridListClear(GUIEditor.gridlist[1]) for i,v in pairs(Table) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1], row, 1, i, false, false) guiGridListSetItemData(GUIEditor.gridlist[1], row, 1, v) end end guiSetFont(GUIEditor.gridlist[1], "default-bold-small") addEventHandler("onClientGUIClick",root, function() if source == GUIEditor.gridlist[1] then local Row = guiGridListGetSelectedItem(source) local tab = guiGridListGetItemData(source, Row, 1) if tab and type(tab) == "table" then guiGridListClear(source) guiGridListSetItemText(source, guiGridListAddRow(source), 1, "...", false, false) for i,v in pairs(tab) do local row = guiGridListAddRow(source) guiGridListSetItemText(source, row, 1, i, false, false) end else if guiGridListGetItemText(source, Row, 1) == "..." then putPlaces() end end end end )
  15. انت خارب كود اللوب تماما يراجل في الجريدليست ( index ) شوف , اعمل لوب للجدول بعدين حط مفتاح الجدول ( value ) و حط علي الروو داتا بالقيمه و اعمل لما اللاعب يدوس علي الجريدليست يجيب الداتا الي علي الروو و يمسح الجريد ليست و يعمل لوب و يحط الأحداثيات ( ... )و حط زي الفري روم كدا عئشان لما يدوس عليهم يرجع للقائمه
  16. قصدك تعمل زي الفريروم ؟
  17. #STARK

    مشكلة

    عارف , عشان كدا قلتلو يستخدم resourceRoot علي طول
  18. #STARK

    مشكلة

    مش لازم يستخدم getResourceRootElement يقدر يستخدم زي ما قال الأخ H25 resourceRoot علي طول
  19. سكربت حلو بالتوفيق + شكلك من حبين كايتو كيد ؟
  20. idk but u should take a look in mta's community , if u didn't find then u gotta pay for a scripter to do it for u
  21. https://www.lua.org تلقائي , من + https://wiki.multitheftauto.com/wiki/Main_Page
  22. بدل ipairs بـ pairs في الرو indexو حط الـ عشان لو حطيت القيمه هتكون جدول اصلا function putPlaces() for i,v in pairs(Places) do local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,2,i,false,false) end end
  23. Function Name : sortGridlist Function Type : Client-Side Function Args. : gridlist ( element ) , { filter, from , column } ( table ) filter = الفلتر الي هيرتب بيه ممكن يكون الأنواع التاليه فقط : 1 - both ( للنوعين نص او رقم ) 2 - string ( لو تبي ترتيب ابجدي ) [ English - Only ] 3 - number ( لترتيب الأرقام ) from = من وين هياخد النصوص الي هيرتبها , لها اختيارين بس 1 - text = guiGridListGetItemText ( يعني هياخدها من النص الكتابي ) 2 - data = guiGridListGetItemData ( يعني هياخدها من الداتا ) column = ( العمود الي هياخد منه ( لو ما كتبتوش هيتحط 1 تلقائي Source Code : local Alphabet = {["a"] = 1, ["b"] = 2, ["c"] = 3, ["d"] = 4, ["e"] = 5, ["f"] = 6, ["g"] = 7, ["h"] = 8, ["i"] = 9, ["j"] = 10, ["k"] = 11, ["l"] = 12, ["m"] = 13, ["n"] = 14, ["o"] = 15, ["p"] = 16, ["q"] = 17, ["r"] = 18, ["s"] = 19, ["t"] = 20, ["u"] = 21, ["v"] = 22, ["w"] = 23, ["x"] = 24, ["y"] = 25, ["z"] = 26} function sortGridlist(grid, stype) if grid and isElement(grid) and getElementType(grid) == "gui-gridlist" and type(stype) == "table" then local data = {} if #stype > 0 then local filter, from, column = stype[1] or "both", stype[2] or "text", stype[3] or 1 local func = from == "data" and guiGridListGetItemData or guiGridListGetItemText local startIndex, row, cCount = 0, nil, guiGridListGetColumnCount(grid) for i = 0, guiGridListGetRowCount(grid)-1 do for j = 1, cCount do table.insert(data, {func(grid, i, column), guiGridListGetItemText(grid, i, j), guiGridListGetItemData(grid, i, j), {guiGridListGetItemColor(grid, i, j)}}) end end guiGridListClear(grid) if filter == "number" then table.sort(data, function(a, b) return tonumber(a[1]) > tonumber(b[1]) end ) elseif filter == "string" then table.sort(data, function(a, b) local a, b = a[1]:sub(1, 1):lower(), b[1]:sub(1, 1):lower() return Alphabet[b] > Alphabet[a] end ) elseif filter == "both" then table.sort(data, function(a, b) if tonumber(a[1]) and tonumber(b[1]) then return tonumber(a[1]) > tonumber(b[1]) elseif tonumber(a[1]) and not tonumber(b[1]) then return tonumber(a[1]) > tonumber(Alphabet[b[1]:sub(1, 1):lower()]) elseif not tonumber(a[1]) and tonumber(b[1]) then return tonumber(Alphabet[a[1]:sub(1, 1):lower()]) > tonumber(b[1]) else return Alphabet[b[1]:sub(1, 1):lower()] > Alphabet[a[1]:sub(1, 1):lower()] end end ) end for _,value in ipairs(data) do startIndex = startIndex + 1 if startIndex == 1 then row = guiGridListAddRow(grid) elseif startIndex >= cCount then startIndex = 1 row = guiGridListAddRow(grid) end for i = 1, cCount do guiGridListSetItemText(grid, row, i, value[2], false, false) guiGridListSetItemData(grid, row, i, value[3]) guiGridListSetItemColor(grid, row, i, value[4][1], value[4][2], value[4][3], value[4][4] or 255) end end end end end انا مجربتش الكود عشان مش عندي اللعبه , ماسحها من زمان بس كنت ابرمج بفلوس لبعض السيرفرات اي بق يا ريت تكتبوه هنا و شكراً
  24. (getElementData(getLocalPlayer(), "kill.level") or 0)*(119/100) -- other example local myExperiance, NeededExperiance = 10, 500 local newWidth = ((myExperiance/NeededExperiance)*100)*(119/100) -- 119 is your rectangle width
  25. u have to turn the level into percentage then multiply it with the width of the rectangle / 100
×
×
  • Create New...