Jump to content

hassan.k.s.a

Members
  • Posts

    868
  • Joined

  • Last visited

Posts posted by hassan.k.s.a

  1. بسم الله الرحمن الرحيم ,

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

    اقدم لكم افضل 10 لاعبين قتلو بـ 5 اسلحه ,

    ألأسلحه هي :

    deagle ,

    sniper,

    m4,

    ak-47,

    grenade,

    بعض المعلومات :

    1- البيانات تتحدث تلقائي وماتحتاج وقت .

    2- dx النوافذ والأزرار .

    3- نظآم الحفظ db ( sql )

    ملاحظات :

    يجب اضافة المود لـ قروب أدمن لأنه اول مايشتغل راح يخرج جميع ألأعضاء من الحساب الي عندهم ,

    resource.Top-Weapons

    اذا موجود اي خطأ او خلل لاتتردد في ططرح الخطأ ,

    اذا عجبكم المود لاتنسون التقييم + الكومنت ,

    التنزيل :

    https://community.multitheftauto.com/ind ... ls&id=7925

    بالتوفيق لكم ان شاء الله ,

  2. من وين جبتها

    i

    ووش تعني بل كود

    :)

    setTimer(function() 
        if not i or i == #Text then 
         --// قيمه مثل اي قيمه هنا يتأكد اذا ماهي موجوده او اذا كانت القيمه تسآوي عدد القيم الي بالجدول i 
            i = 1 
            --// راح يخليه 1 
        else 
        --// موجوده وماتساوي عدد القيم الي بالجدول i واذا كانت 
            i = i + 1 
           --//راح يزيد 1 على الي بالقيمه بكل مرا تشتغل الوظيفه 
        end 
        setGameType(Text[i]) 
        --//وطبعا القيم الي بالجدول تترقم تلقائي بمفاتيح- االمفتاح للقيمه ألأوله يبدأ بـ 1 
    end, 60000, 0) 
    

  3. guiGridListAddColumn(Grid,"Rank :   ",0.10) 
    guiGridListAddColumn(Grid,"Name :   ",0.10) 
    guiGridListAddColumn(Grid,"Money:   ",0.10) 
      
    addEvent("returnUp",true) 
    addEventHandler("returnUp", root,function(Value) 
        guiGridListClear(Grid) 
        local Rank = 0 
        for _,v in ipairs (Value) do 
            Rank = Rank + 1 
            local row = guiGridListAddRow(Grid) 
            guiGridListSetItemText(Grid, row, 1,tonumber(Rank), false, false) 
            guiGridListSetItemText(Grid, row, 2,tostring(v.Name_), false, false) 
            guiGridListSetItemText(Grid, row, 3,tonumber(v.Money_), false, false) 
            if ( Rank == 30 ) then 
                break; 
            end 
        end 
    end) 
      
    local ReGet = true 
      
    setTimer(function() 
        if ( ReGet == true ) then 
            if ( guiGetVisible(wndName) == true ) then 
                triggerServerEvent("Up",getLocalPlayer()) 
                ReGet = false 
                setTimer(function() 
                    ReGet = true 
                end,5000,1) 
            end 
        end 
    end,1000,0) 
    

    addEventHandler ("onResourceStart", getResourceRootElement(getThisResource()),function() 
        executeSQLQuery("CREATE TABLE IF NOT EXISTS SQL_xTop_Money (Name,Account,Money)") 
    end) 
      
    addEventHandler("onPlayerQuit",getRootElement(),function() 
        local Name = getPlayerName(source) 
        local Account = getAccountName(getPlayerAccount(source)) 
        local Money = getPlayerMoney(source) 
        if not ( Account ) then return end 
        local RowAccount = executeSQLQuery("SELECT * FROM SQL_xTop_Money WHERE Account = '"..tostring(Account).."'") 
        if ( type(RowAccount) == "table" and #RowAccount == 0 or not RowAccount) then 
            executeSQLQuery("INSERT INTO SQL_xTop_Money(Name,Account,Money) VALUES(?,?,?)",tostring(Name),tostring(Account),tonumber(Money)) 
        else 
            executeSQLQuery("UPDATE SQL_xTop_Money SET Name=?,Money=? WHERE Account=?",tostring(Name),tonumber(Money),tostring(Account)) 
        end 
    end) 
      
    function getAllMoneyUsers() 
        local Row = executeSQLQuery("SELECT * FROM SQL_xTop_Money") 
        if ( type (Row) == "table" and #Row == 0 or not Row ) then 
            return { } 
        else 
            return Row 
        end 
    end 
      
    addEvent("Up",true) 
    addEventHandler("Up",root,function() 
        local TableUsersTop = {} 
        for _,v in ipairs(getAllMoneyUsers()) do 
            table.insert(TableUsersTop,{Name_ = v.Name,Money_ = v.Money,}) 
            table.sort(TableUsersTop,function (a,b) return (tonumber (a.Money_) or 0 ) > ( tonumber (b.Money_) or 0) end) 
        end 
        triggerClientEvent(source,"returnUp",source,TableUsersTop) 
    end) 
    

  4. it's wrong lol :lol: .

    it's not wrong , it's working .

    but the problem with server WASSIm., not the problem of the code .

    but test this :

        addEventHandler ("onResourceStart", getResourceRootElement(getThisResource()),function() 
            executeSQLQuery("CREATE TABLE IF NOT EXISTS Save_Money_Account (Account,Money)") 
            outputDebugString("Sql Save Money loaded .",3) 
        end) 
          
          
    addEventHandler("onPlayerQuit",getRootElement(),function() 
        local Account = getAccountName(getPlayerAccount(source)) 
        local Money = getPlayerMoney(source) 
        local RowAccount = executeSQLQuery("SELECT * FROM Save_Money_Account WHERE Account = '"..tostring(Account).."'") 
        if ( type(RowAccount) == "table" and #RowAccount == 0 or not RowAccount) then 
            executeSQLQuery("INSERT INTO Save_Money_Account(Account,Money) VALUES(?,?)",tostring(Account),tonumber(Money)) 
        else 
            executeSQLQuery("UPDATE Save_Money_Account SET Money=? WHERE Account=?",tonumber(Money),tostring(Account)) 
        end 
    end) 
          
    addEventHandler("onPlayerLogout",getRootElement(),function() 
        local Account = getAccountName(getPlayerAccount(source)) 
        local Money = getPlayerMoney(source) 
        local RowAccount = executeSQLQuery("SELECT * FROM Save_Money_Account WHERE Account = '"..tostring(Account).."'") 
        if ( type(RowAccount) == "table" and #RowAccount == 0 or not RowAccount ) then 
            executeSQLQuery("INSERT INTO Save_Money_Account(Account,Money) VALUES(?,?)",tostring(Account),tonumber(Money)) 
        else 
            executeSQLQuery("UPDATE Save_Money_Account SET Money=? WHERE Account=?",tonumber(Money),tostring(Account)) 
        end 
        setPlayerMoney(source,0) 
    end) 
          
    addEventHandler("onPlayerLogin",getRootElement(),function(_,acc) 
        local Account = getAccountName(acc) 
        local RowAccount = executeSQLQuery("SELECT * FROM Save_Money_Account WHERE Account = '"..tostring(Account).."'") 
        if ( type(RowAccount) == "table" and #RowAccount == 0 or not RowAccount ) then 
            return 
        end 
        setPlayerMoney(source,tonumber(RowAccount[1]["Money"])) 
    end) 
    

  5. setElementData -- resourceRoot 
    getElementData -- resourceRoot 
    

    او سوي جدول - فيه طرق كثيره لاكن ألأسهل بالنسبه لك الالمنت داتا

    لو سوا رستارت للمود بيروح اللكلام

    :evil: هو قال يبيه اذا طلع او دخل الاعب يشوف الكلام ماقال حتى لما يطفي المود :/ !

  6. setElementData -- resourceRoot 
    getElementData -- resourceRoot 
    

    او سوي جدول - فيه طرق كثيره لاكن ألأسهل بالنسبه لك الالمنت داتا

  7. تريقر في اقل من ثانيه يسبب لاق يعني ياترجع القيم صفر من بعد ماتكون 100 او تستخدم حذف الأيفنت او تحذف ألأيفنت بالكآمل وتسوي تآيمر افضل

  8. ماراح يكتب معلومتين تقدر تشيك اذا كانت القيمه موجوده تحط :

    UPDATE -- ترفع قيمه لقيمه موجوده

    واذا ماكانت موجوده تحط :

    INSERT-- قيمه جديده

  9. ^ نآسي do

    marker = createMarker(0, 0, 1, 'cylinder', 2, 255, 0, 0, 150)     
    addCommandHandler("teamadmin",function(player) 
        local count = 0 
        for _,v in ipairs (getElementsByType("player")) do 
            if ( isElementWithinMarker(marker,v) ) then 
                local PlrTeam = getPlayerTeam(v) 
                if ( PlrTeam ) then 
                    if ( getTeamName(PlrTeam) == "Admin" ) then 
                        count = count  + 1 
                    end 
                end 
            end 
        end 
        outputChatBox ( ""..count.." this is team in marker ",player,255,0,0,true) 
    end) 
    

  10. addEventHandler("onPlayerChat",root,function() 
        local acc = getPlayerAccount(source) 
        if ( acc )then 
            if ( isObjectInACLGroup("user."..getAccountName(acc), aclGetGroup("Console")) ) then 
                for _,plrs in ipairs(getElementsByType("player")) do 
                    playSoundFrontEnd(plrs,101) 
                end 
            end 
        end 
    end) 
    

×
×
  • Create New...