Jump to content

SycroX

Members
  • Posts

    2,141
  • Joined

  • Last visited

  • Days Won

    15

Posts posted by SycroX

  1. عندك اكتر من طريقه لتعمله لاكن اسهل طريقه هي

    setTimer
    setElementData
    getElementData
    -- للحفظ
    setAccountData 
    getAccountData

    ذي الطريقه المشهوره, طبعا في طرق اخري مثل قواعد بيانات او جداول لاكنهم اصعب علي المبتدأين من الطريقه الي فوق

    • Like 1
    • Thanks 1
  2. On 29/02/2020 at 15:30, AliAlanzi said:

    جربته على مود ثاني جاهز بس حطيت ملفي و غيرت الاسم واشتغل

    اظن مشكلتك  من الميتا نفسها

    جرب بدل الميتا بذي

    <meta>
        <script src="c_animation_system.Lua" type="client"/>
        <script src="s_animation_system.Lua" type="server"/>
        <config src="animations.xml" type="client" />
        <script src="s_list.Lua" type="server" />
        <script src="c_list.Lua" type="client" />
        <file src="walk_rest.ifp" />
    </meta>

     

    وش فيه 

    .Lua تيجي .Lua

    صغير مو كبير l المهم روح ملف ميتا و تاكد ان حرف 

     

  3. use

    setBlipVisibleDistance
    -- Exmaple
    addEventHandler ( "onClientResourceStart" , getResourceRootElement ( getThisResource ( ) ) , function ( )
        for _ , Blip in ipairs ( getElementsByType ( "blip" ) ) do
          setBlipVisibleDistance ( Blip , 1000 )
        end
    end )

     

  4. Dead topic :( sad

    function FormatSize ( size )
        local Sizes = { { 9 , 'GB' } , { 7 , 'MB' } , { 4 , 'KB' } , { 1 , 'B' } }
        if size and tonumber ( size ) and size:len ( ) > 0 then
            local size = tostring ( size )
            for _ , value in ipairs ( Sizes ) do
                if size:len ( ) >= value [ 1 ] then
                    return ( size:sub ( 1 , size:len ( ) , ( value [ 1 ] >= 9 and - 9 or value [ 1 ] - 1 ) ) .. '.' .. size:sub ( 2 , size:len ( ) - ( ( value [ 1 ] == 9 and - 7 ) or ( value [ 1 ] == 7 and - 4 ) or ( value [ 1 ] == 4 and - 1 ) ) ) .. ' ' .. value [ 2 ] )
                end
            end
        end
        return size
    end

    FormatSize :

    وظيفه تحول لك الحجم الي GB/MB/KB/B

     

     

    • Like 1
  5. On 01/01/2020 at 20:24, Master_MTA said:

    حبيبي الله يسعدك تسلم

    نورك يقلبي

    حبيبي تسلملي ❤️ 

    انا واخذ على محمد فمافي مشاكل ههههه

    تسلم حبيبي

    حبيبي الله يصلحك لك وحشه ❤️❤️ 

    و انت كمان يراجل 

    زمان من سنه حتي المنتدي كان تفاعله حلو و دايما مواضيع و خناقات xD و منافسات

    لاكن دلوقتي صراحه صار ميت

     

    • Like 1
  6. 12 hours ago, xFabel said:

    السلام عليكم ورحمة الله وبركاته معي سؤال الي ب ف صوره كيف اسوي الشكل ذاك؟ يعني الخلفيه الي ورا سهل بس الصوره

    Rectangle Roundedالـ

    كيف اسويه كذاك الي لون زرق

    p_1398zwio41.png

    dxDrawRectangle
    dxDrawCircle -- radius = 90

    بعد كدا شويه حسابات عشان تعاملهم علي انهم شكل واحد

  7. import random
    Students = { }
    class ID_SYSTEM:
        Used_Ids = [ ]
        def generate_new_id ( ):
            id = random.randint ( 1900000 , 1999999 )
            if id in Used_Ids:
                generate_new_id ( )
            else:
                return id
        def remove_id ( id ):
            if id in Used_Ids:
                list.remove ( id )
        def count_id ( ):
            count = 0
            for _ in Used_Ids:
                count += 1
            return count
            
    def Add_New ( to_be_added )
        to_be_added = str ( to_be_added)
        last_index = -1
        for x in Students:
            last_index += 1
        Students[last_index] = [ ID_SYSTEM.generate_new_id ( ) , to_be_added ]
    
    Add_New ( 'RONTGEN' )

    لما استعمل وظيفه  Add_New

    كلمه RONTGEN 

    ما تنضاف لللائحه

    و يقلي خطا في سطر

        Students[last_index] = [ ID_SYSTEM.generate_new_id ( ) , to_be_added ]

    انا مااشوف خطا صراحه فاذا احد يقدر يساعد

  8. طريقتي تسوي لك عداد تكسي واقعي 

    الكود غير مجرب + لي فتره ما برمجت و كنت اتعلم لغه تانيه فممكن اكون اتلخبط او حاجه

    local timer = nil
    local dT = 0
    local isAllowedVehicle = {
        --[ car id ] = true to be active
        [420] = true,
    }
    function getElementSpeed(theElement, unit)
        assert(isElement(theElement), "Bad argument 1 @ getElementSpeed (element expected, got " .. type(theElement) .. ")")
        local elementType = getElementType(theElement)
        assert(elementType == "player" or elementType == "ped" or elementType == "object" or elementType == "vehicle" or elementType == "projectile", "Invalid element type @ getElementSpeed (player/ped/object/vehicle/projectile expected, got " .. elementType .. ")")
        assert((unit == nil or type(unit) == "string" or type(unit) == "number") and (unit == nil or (tonumber(unit) and (tonumber(unit) == 0 or tonumber(unit) == 1 or tonumber(unit) == 2)) or unit == "m/s" or unit == "km/h" or unit == "mph"), "Bad argument 2 @ getElementSpeed (invalid speed unit)")
        unit = unit == nil and 0 or ((not tonumber(unit)) and unit or tonumber(unit))
        local mult = (unit == 0 or unit == "m/s") and 50 or ((unit == 1 or unit == "km/h") and 180 or 111.84681456)
        return (Vector3(getElementVelocity(theElement)) * mult).length
    end
    function Traveled_Distance ( )
        if isPedInVehicle ( localPlayer ) and isAllowedVehicle [ getElementModel ( getPedOccupiedVehicle ( localPlayer ) ) ] then
            dT = dT + getElementSpeed ( getPedOccupiedVehicle ( localPlayer ) , 0 )
            guiSetText ( meterlable , " " .. math.floor(dT) .. " متر" )
        else
            killTimer ( timer )
        end
    end
    addEventHandler ( "onClientVehicleEnter" , root ,
        function ( )
            if isAllowedVehicle [ getElementModel ( source ) ] then
                if not isTimer ( timer ) then
                    timer = setTimer ( Traveled_Distance , 1000 , 0 )
                end
            end
        end
    )

     

  9. 21 hours ago, Ghost-Gamer said:

    صراحه المود مو لاي سيرفر يضبط , هو لسيرفر حياة واقعيه , وانا احتاج الاكواد غير ذي اذا يضبط 

    ذا مو مود لسيرفرات ذا معمول للمبرمجين عشان يساعدهم لو يبون يسو نظام رتب للسيرفر غير الأسل

×
×
  • Create New...