Jump to content

مُساعدة


JustP

Recommended Posts

السلام عليكم ورحمة الله وبركاته

        local playerPing = getPlayerPing ( player )
        playerPing = tostring ( playerPing )

معي سكور بورد لو عدد الساعات حقتي زاد يبقى نفس الرقم مثلا انا دخلت السيرفر وعدد ساعاتي 10 وزاد ساعة يبقى 10

لكن البنق يتغير مافي مشكلة بس الساعات الفرق انو مامسويها لسترنق وجربت ونفس الشيء

 

Link to comment
8 hours ago, Abdul KariM said:

عليكم السلام لازم يكون فيه تايمر او رندر عشان يحدث بالسكور بورد فالافضل تعدل على مود الساعات وتحدث الداتا

لا هو شغال لما تزيد ساعاتي اكتب امر يطلع لي الساعات بالمضبوط لكن السكور بورد واقفه ماعرف ليش

Link to comment
5 hours ago, Sub[Z]ero said:

لا هو شغال لما تزيد ساعاتي اكتب امر يطلع لي الساعات بالمضبوط لكن السكور بورد واقفه ماعرف ليش

ممكن نشوف الجُمل الشرطية اللي في الرندر؟

Link to comment
1 hour ago, NX_CI said:
ممكن نشوف الجُمل الشرطية اللي في الرندر؟


local function drawRowBounded ( id, name, hours, ping, colors, font, top )
    -- Precalculate some constants
    local bottom = clamp ( 0, top + dxGetFontHeight ( 1, font ), SCOREBOARD_Y + g_currentHeight )
    local maxWidth = SCOREBOARD_X + g_currentWidth
    
    -- If the row doesn't fit, just avoid any further calculations.
    if bottom < top then return end
    
    -- ID
    local left = rowsBoundingBox[1][1]
    local right = clamp ( 0, rowsBoundingBox[1][2], maxWidth )
    if left < right then
        dxDrawText ( id, left, top, right, bottom,
                     colors[1], 1, font, "right", "top",
                     true, false, SCOREBOARD_POSTGUI )
        
        -- Name
        left = rowsBoundingBox[2][1] + 17 -- Grant some padding to the name column
        right = clamp ( 0, rowsBoundingBox[2][2], maxWidth )
        if left < right then
            dxDrawText ( name, left, top, right, bottom,
                         colors[2], 1, font, "left", "top",
                         true, false, SCOREBOARD_POSTGUI )
            
            -- Hoursplayed
            left = rowsBoundingBox[3][1]
            right = clamp ( 0, rowsBoundingBox[3][2], maxWidth )
            --outputDebugString(left.." vs ".. right)
            if left < right then
                dxDrawText ( hours, left, top, right, bottom,
                             colors[3], 1, font, "left", "top",
                             true, false, SCOREBOARD_POSTGUI )
                -- Ping
                left = rowsBoundingBox[4][1]
                right = clamp ( 0, rowsBoundingBox[4][2], maxWidth )
                --outputDebugString(left.." vs ".. right)
                if left < right then
                    dxDrawText ( ping, left, top, right, bottom,
                                 colors[3], 1, font, "left", "top",
                                 true, false, SCOREBOARD_POSTGUI )
                end
            end
            

        end
    end
end
-- ذا حق رسم السكور بورد 
local playerHours = getElementData( player, 'hoursplayed' ) or 0
		local playerPing = getPlayerPing ( player )
		playerPing = tostring ( playerPing )
		local r, g, b = getPlayerNametagColor ( player )
		local playerColor = tocolor ( r, g, b, 255 )
		
		local colors = { playerColor, playerColor, playerColor, playerColor }
		
		-- هذا مثل الي يستدعي الفنكشن الي فوق
		drawRowBounded ( playerID, playerName, playerHours, playerPing, colors, "default-bold", top )

 

Link to comment
38 minutes ago, NX_CI said:

hoursplayed تأكد من سكربت الساعات هل الداتا اللي تتغير هي نفسها الداتا هذي

أو داتا ثانية ؟

أو اعطيني اسم الداتا اللي في الأمر اللي تكلمت عنه

نفسها هي hoursplayed

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...