#َxLysandeR

Members
  • Content count

    1,739
  • Joined

  • Last visited

  • Days Won

    8

#َxLysandeR last won the day on May 28

#َxLysandeR had the most liked content!

Community Reputation

274 Superstar

About #َxLysandeR

  • Rank
    Loc
  • Birthday 05/11/1999

Details

  • Gang
    N/A
  • Location
    N/A
  • Occupation
    N/A
  • Interests
    N/A

Recent Profile Visitors

2,407 profile views
  1. مطلوب مود ملابس سي جي

    مود حفظ ملابس سي جي : https://community.mtasa.com/index.php?p=resources&s=details&id=1868 مود محل الملابس : https://community.mtasa.com/index.php?p=resources&s=details&id=9689
  2. dxGridList

    كيف يعني هو ذي حق الجي يو اي تدوس بعجلت الماوس اظن ( ذا الي فهمتو من الأكواد )..ي
  3. dxGridList

    قصدك تبي تحط السكرول بار مع الجريد ليست يكون رسم يعني : تفضل addEventHandler ( "onClientRender", root, function ( ) -- Is there any GridList to render? if #dxGrid.items > 0 then -- Loop through all grid lists for index, data in ipairs ( dxGrid.items ) do -- Is the GridList visible? if data.vis then -- Draw the 'GridList' itself dxDrawRectangle ( data.x, data.y, data.w, data.h, tocolor ( 0, 0, 0, 200 ), data.pg ); -- Draw the column bar dxDrawRectangle ( data.x, data.y, data.w, 30 % data.h, tocolor ( 0, 0, 0, 220 ), data.pg ); --Create the Scrollbar if data.r > data.mi+1 then local x, y, w, h, totalRows, maxItems, scroll = data.x, data.y, data.w, data.h, data.r, data.mi+1, data.s-1 dxDrawRectangle(x+w-10, y, 10, h, tocolor(0, 0, 0, 200), true); dxDrawRectangle(x+w-10, (y+h/totalRows*(scroll)), 10, (h/totalRows*maxItems), tocolor(255, 255, 255, 200), true ); end -- Set cursorOn variable to the current GridList, if it's selected cursorOn = nil if __isMouseInPosition ( data.x, data.y, data.w, data.h ) then cursorOn = index; end -- Check if there's any selected item local seeFrom = data.s; local seeTo = ( data.s + data.mi ) - 1; if data.se and data.se <= data.r and data.se >= seeFrom and data.se <= seeTo then local index = data.se - ( data.s - 1 ); local y2 = data.y + ( ( index - 1 ) * 25 ); -- Draw a rectangle to make it looks like selected dxDrawRectangle ( data.x, ( 30 % data.h ) + y2, data.w, 20, tocolor ( 0, 0, 0, 100 ), data.pg ); end -- Is there any column? if #data.i > 0 then local cWidth = 0 -- Loop through all columns for cIndex, cData in ipairs ( data.i ) do -- we'll go beyond the GridList width with this column ? if ( ( cWidth + cData.info.width ) <= data.w ) then local x = data.x + cWidth; -- Draw the column title dxDrawText ( cData.info.title, x, data.y, cData.info.width + x, ( 30 % data.h ) + data.y, tocolor ( 255, 255, 255 ), FIT_MODE and ( 1 * SCALE ) or 1, "default-bold", "center", "center", true, true, data.pg, true, true ); -- Reset the selected item cData.info.selected = -1; -- Is there any item ? if #cData > 0 then local seeFrom = data.s; local seeTo = ( data.s + data.mi ) - 1; -- Loop the items for iIndex = seeFrom, seeTo do -- There's a row with this index in the current column? if cData[iIndex] then local index = iIndex - ( data.s - 1 ); local y = data.y + ( index * 25 ); local y2 = data.y + ( ( index - 1 ) * 25 ); -- Check if cursor is on item position if __isMouseInPosition ( data.x, ( 30 % data.h ) + y2, data.w, 20 ) then -- Define the mouse-on variable data.mo = iIndex; end -- Draw the item text dxDrawText ( cData[iIndex]["text"], x, y, cData.info.width + x, ( 30 % data.h ) + y, tocolor ( unpack ( cData[iIndex]["color"] ) ), FIT_MODE and ( 1 * SCALE ) or 1, "default-bold", "center", "center", true, true, data.pg, true, true ); end end end -- Increase cWidth variable (to draw the columns correctly) cWidth = cWidth + cData.info.width; end end end end end end end , true, "low-5")
  4. dxGridList

    :- الا فيه سكرول راجع الاكواد بتلاقي ان السكرول بار موجود
  5. dxGridList

    Scroll Level ????? مو هيك معناها ان فيه سكرول بار اصلا ؟
  6. dxGridList

    وش هي data.se data.s data.mi ?
  7. dxGridList

    هههه طيب اطرح لي كود الريندر بتاع الجريد لبست
  8. dxGridList

    درس الرياضيات عندك كويس او لا؟ هه السكرول بار ما بتقدر تسويه غير اذا تعرف رياضيات كويس
  9. dxGridList

    ما يحتاج تجيب مود كامل تقدر تسويه بنفسك مثال : local testTable = { [1] = "me", [2] = "me again", [3] = "wow", [4] = "wooooow" } addEventHandler("onClientRender", root, function() for index = 1, #testTable do local x, y, w, h = 311, 173+(19*index), 227, 19 if isMouseInPosition(x, y, w, h) then dxDrawRectangle(x, y, w, h, tocolor(100, 100, 100, 255), false) dxDrawText(testTable[index], x, y, w+x, h+y, tocolor(150, 150, 150, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) else dxDrawRectangle(x, y, w, h, tocolor(20, 20, 20, 255), false) dxDrawText(testTable[index], x, y, w+x, h+y, tocolor(255, 255, 255, 255), 1.00, "default-bold", "center", "center", false, false, false, false, false) end end end ) و عشان تحدد شي منو تقدر تسوي نفس الشي هيك : addEventHandler("onClientClick", root, function(b, s) if b == "left" and s == "down" then for index = 1, #testTable do local x, y, w, h = 311, 173+(19*index), 227, 19 if isMouseInPosition(x, y, w, h) then outputChatBox("you clicked on "..testTable[index]) break end end end end ) + طبعا بتحتاج وظيفه inMouseInPosition
  10. مشكلة لفل سيستم اكس دي

    يب + اسمو اكس بي مو اكس دي اختصار كلمه experience
  11. مشكلة لفل سيستم اكس دي

    --#من هنا تحطو في كلنت سايد ملف كلنت | c.lua addEventHandler("onClientRender", root, function() local level = getElementData(localPlayer, "level") or 1 local xp = getElementData(localPlayer, "xp") or 0 if level and xp false dxDrawLine(23 - 1, 618 - 1, 23 - 1, 644, tocolor(0, 0, 0, 200), 1, false) dxDrawLine(298, 618 - 1, 23 - 1, 618 - 1, tocolor(0, 0, 0, 200), 1, false) dxDrawLine(23 - 1, 644, 298, 644, tocolor(0, 0, 0, 200), 1, false) dxDrawLine(298, 644, 298, 618 - 1, tocolor(0, 0, 0, 200), 1, false) local precentage = ((xp/level)*100)*100 if precentage >= 100 then precentage = 0 end local bar = precentage*2.75 dxDrawRectangle(23, 618, bar, 26, tocolor(243, 228, 0, 200), false) dxDrawText(" Level: "..level.." - XP : "..xp.." / "..(level*100), 29, 622, 288, 640, tocolor(0, 0, 0, 200), 1.00, "default", "left", "top", false, false, false, false, false) end end ) --#و هنا تحطو في ملف settings.lua addEventHandler("onResourceStart", resourceRoot, function() for _,player in ipairs(getElementsByType("player")) do local account = getPlayerAccount(player) if account and not isGuestAccount(account) the local level, xp = (tonumber(getAccountData(account, "level"))) or 1, (tonumber(getAccountData(account, "xp"))) or 0 setElementData(player, "level", level) setElementData(player, "xp", xp) end end end ) addEventHandler("onPlayerLogin", root, function(_,account) local level, xp = (tonumber(getAccountData(account, "level"))) or 1, (tonumber(getAccountData(account, "xp"))) or 0 setElementData(source, "level", level) setElementData(source, "xp", xp) end ) addEventHandler("onPlayerWasted", root, function(_,killer) if killer and getElementType(killer) == "player" and killer ~= source false setElementData(killer, "xp", (getElementData(killer, "xp") or 0) + 10) checkNextLevel(killer) end end ) function checkNextLevel(player) local currentLevel = getElementData(player, "level") or 1 local neededXP = currentLevel*100 local currentXP = getElementData(player, "xp") or 0 if currentXP >= neededXP false setElementData(player, "level", currentLevel+1) setElementData(player, "xp", currentXP-neededXP) outputChatBox("you've promoted to level "..currentLevel+1, player, 255, 255, 0, true) end end addEventHandler("onPlayerQuit", root, function() local account = getPlayerAccount(source) if not isGuestAccount(account) false local level, xp = getElementData(source, "level"), getElementData(source, "xp") setAccountData(account, "xp", xp) setAccountData(account, "level", level) end end )
  12. مشكلة لفل سيستم اكس دي

    addEventHandler("onClientRender", root, function() local level = getElementData(localPlayer, "level") or 1 local xp = getElementData(localPlayer, "xp") or 0 if level and xp false dxDrawLine(23 - 1, 618 - 1, 23 - 1, 644, tocolor(0, 0, 0, 200), 1, false) dxDrawLine(298, 618 - 1, 23 - 1, 618 - 1, tocolor(0, 0, 0, 200), 1, false) dxDrawLine(23 - 1, 644, 298, 644, tocolor(0, 0, 0, 200), 1, false) dxDrawLine(298, 644, 298, 618 - 1, tocolor(0, 0, 0, 200), 1, false) local precentage = (xp/level*100)*100 if precentage >= 100 then precentage = 0 end local bar = precentage*2.75 dxDrawRectangle(23, 618, bar, 26, tocolor(243, 228, 0, 200), false) dxDrawText(" Level: "..level.." - XP : "..xp.." / "..(level*100), 29, 622, 288, 640, tocolor(0, 0, 0, 200), 1.00, "default", "left", "top", false, false, false, false, false) end end ) --#Server side addEventHandler("onResourceStart", resourceRoot, function() for _,player in ipairs(getElementsByType("player")) do local account = getPlayerAccount(player) if account and not isGuestAccount(account) the local level, xp = (tonumber(getAccountData(account, "level"))) or 1, (tonumber(getAccountData(account, "xp"))) or 0 setElementData(player, "level", level) setElementData(player, "xp", xp) end end end ) addEventHandler("onPlayerLogin", root, function(_,account) local level, xp = (tonumber(getAccountData(account, "level"))) or 1, (tonumber(getAccountData(account, "xp"))) or 0 setElementData(source, "level", level) setElementData(source, "xp", xp) end ) addEventHandler("onPlayerWasted", root, function(_,killer) if killer and getElementType(killer) == "player" and killer ~= source false setElementData(killer, "xp", (getElementData(killer, "xp") or 0) + 10) checkNextLevel(killer) end end ) function checkNextLevel(player) local currentLevel = getElementData(player, "level") or 1 local neededXP = currentLevel*100 local currentXP = getElementData(player, "xp") or 0 if currentXP >= neededXP false setElementData(player, "level", currentLevel+1) setElementData(player, "xp", currentXP-neededXP) outputChatBox("you've promoted to level "..currentLevel+1, player, 255, 255, 0, true) end end addEventHandler("onPlayerQuit", root, function() local account = getPlayerAccount(source) if not isGuestAccount(account) false local level, xp = getElementData(source, "level"), getElementData(source, "xp") setAccountData(account, "xp", xp) setAccountData(account, "level", level) end end ) صراحه لو ما تعرف وش الفرق بين كلنت سايد و سيرفر سايد اسف بتركك هيك هنا انت هيك ما وصلت لنسبه 0.001% حتي اذا ما تعرف الفرق بين الملفين
  13. حاطت كود الريندر بالكلنت سايد ؟
  14. عشان تجيب الأكس بي استخدم getElementData(player, "xp")
  15. dxprogressbar

    شوف انا اليوم بطريقه ما فاضي شويه فسويت لك البروجرس بار ذا بس ما جربته صراحه و مكسل اجربو ف جربو انت و قولي اذا به اخطاء local progressbar = {} function dxCreatePrograssBar(id, x, y, w, h, progress) table.insert(progressbar, {id, x, y, w, h, 0, false}) end function dxProgressBarSetVisible(id, bool) if id then for index,value in ipairs(progressbar) do if value[1] == id then progressbar[index][7] = bool end end end end function dxProgressBarGetVisible(id) if id then for _,value in ipairs(progressbar) do if value[1] == id then return value[7] end end end end function dxProgressBarSetProgress(id, progress) if id and progress then for index,value in ipairs(progressbar) do if value[1] == id then progressbar[index][6] = progress end end end end function dxProgressBarGetProgress(id) if id then for _,value in ipairs(progressbar) do if value[1] == id then return value[6] end end end end function dxRemoveProgressBar(id) if id then for index,value in ipairs(progressbar) do if value[1] == id then progressbar[index] = nil end end end end addEventHandler("onClientRender", root, function() if #progressbar > 0 then for _,value in ipairs(progressbar) do if value[1] and value[2] and value[3] and value[4] and value[5] and value[6] then if value[7] then local x, y, w, h = value[2], value[3], value[4], value[5] dxDrawRectangle(x, y, w, h, tocolor(0, 0, 0, 150), false) -- background dxDrawRectangle(x, y, value[6]*(w/100), h, tocolor(0, 0, 0, 150), false) -- progress end end end end end )