Jump to content

khaledmhammed

Members
  • Posts

    535
  • Joined

  • Last visited

Posts posted by khaledmhammed

  1. السسلام عليككم

    ..

    ككيفكم ي ابططال

    ! باختصأر ركبت لي مود قروبات والمشكله اقدر اقتل خويي بالقروب

    اذكر مان كان في كود يمنع تقتل خويك لكن ماحصلته مرة يوك بحثت

    لذالك اتمنى اللي قد شاف الكود يطرحة لي باختصـأر ساعدوني : )

  2. gang و المنت داتا gang_system الكود الي انت حطيته يستخدم مود

    إذا ما كنت تستخدم ذي الأشياء ما رح يحتل

    يعطيك العافية خلاص زبطط المشكله كان من اسم مود القروبات

  3. وفي مشكله عندي بالحتلال تبع اجنبي لا دخلت المنطقه يقول

    You entered a unoccupied turf.

    ليه؟

    بحثت بالكود و مالقيت ذا الكلام

    اخوي ذاك مشفر .. ولكن ذا مايحتل مادري ليه

  4. GUIEditor = { 
            button = {}, 
            window = {} 
        } 
        addEventHandler("onClientResourceStart", resourceRoot, 
            function() 
                GUIEditor.window[1] = guiCreateWindow(391, 258, 253, 179, "", false) 
                guiWindowSetSizable(GUIEditor.window[1], false) 
          
                GUIEditor.button[1] = guiCreateButton(22, 33, 201, 49, "1", false, GUIEditor.window[1]) 
                GUIEditor.button[2] = guiCreateButton(22, 101, 201, 49, "2", false, GUIEditor.window[1])     
            end 
        ) 
        addEventHandler("onClientGUIClick",root, 
        function () 
        if getPlayerTeam (localPlayer) and getTeamName ( getPlayerTeam ( localPlayer ) ) == "Police" then 
        if source == GUIEditor.button[1] then 
        setTimer ( setElementPosition, 5000,1,localPlayer,  2005.00000,1547.54846,13.58594 ) 
        setElementDimension ( localPlayer, 55 ) 
        end 
         end 
          end 
        ) 
          
        addEventHandler("onClientGUIClick",root, 
        function () 
        if getPlayerTeam (localPlayer) and getTeamName ( getPlayerTeam ( localPlayer ) ) ~= "Police" then 
        if source == GUIEditor.button[2] then 
        setTimer ( setElementPosition, 5000,1,localPlayer,  2005.00000,1547.54846,1354.343 ) 
        setElementDimension ( localPlayer, 55 ) 
        end 
         end 
          end 
        ) 
    

    اخوي الحين ذا اول زر ينقل الشرطة وثاني زر ينقل الكل باستثناء الشرطة؟

  5. اخ عرفيت بجرب الان

    اخ تابل ذي الاكواد كل ابوها

    addEventHandler("onClientResourceStart", resourceRoot, 
        function() 
            setDevelopmentMode(true) 
        end 
    ) 
      
    function music() 
        local sound = playSound("missionDone.mp3") 
    end 
    addEvent("onTakeTurf", true) 
    addEventHandler("onTakeTurf", resourceRoot, music) 
      
    

    ------------------------------------------------------ 
    --            Scripting By Sasu 
    --      Copyright © 2013-2015 - All rights reserved. 
    ------------------------------------------------------ 
      
      
    local turfPos = { 
    { 2133.1950683594, 633.66455078125, 0, 197.5, 92, 90 }, 
    { 2486.5935058594, 678.20172119141, 0,  245, 133, 30 }, 
    { 1856.2864990234, 627.07629394531, 0,  138.25, 152.75, 90 }, 
    { 1576.8956298828, 662.84362792969, 0, 181, 120.5, 90 }, 
    { 1577.6783447266, 943.66607666016, 0,  190, 190, 90 }, 
    { 1383.4364013672, 909.61499023438, 0,  142, 230, 90 }, 
    { 956.94744873047, 1011.635925293, 0,  220, 140, 90 }, 
    { 1017.7476196289, 1203.4068603516, 0,  180, 165, 90 }, 
    { 1017.623046875, 1383.4741210938, 0,  190, 290, 90 }, 
    { 917.99707031253, 1623.6003417969, 0,  80, 220, 90 }, 
    { 1017.7178955078, 1862.6740722656, 0,  140, 180, 90 }, 
    { 912.50573730469, 1958.6761474609, 0,  90, 230, 90 }, 
    { 1017.3455200195, 2063.38671875, 0,  150, 300, 90 }, 
    { 1300.7644042969, 2095.5100097656, 0,  200, 140, 90 }, 
    { 1398.1997070313, 2323.5505371094, 0,  160, 65, 90 }, 
    { 1578.1955566406, 2284.0825195313, 0,  180, 110, 90 }, 
    { 1237.6285400391, 2581.4663085938, 0,  450, 130, 90 }, 
    { 1780.478515625, 2567.2121582031, 0,  130, 130, 90 }, 
    { 1698.2750244141, 2724.494140625, 0,  200, 150, 90 }, 
    { 2237.9494628906, 2723.7814941406, 0,  180, 110, 90 }, 
    { 2498.6853027344, 2704.6188964844, 0,  300, 140, 90 }, 
    { 2798.1267089844, 2303.9643554688, 0,  120, 300, 90 }, 
    { 2557.5688476563, 2243.4963378906, 0,  100, 230, 90 }, 
    { 2532.5830078125, 2063.4118652344, 0,  100, 150, 90 }, 
    { 2558.1779785156, 1624.0816650391, 0,  100, 300, 90 }, 
    { 2437.685546875, 1483.7209472656, 0,  160, 120, 90 }, 
    { 2077.7106933594, 1203.5559082031, 0,  340, 170, 90 }, 
    { 2082.3193359375, 979.23583984375, 0,  270, 210, 90 } 
    } 
      
    local turfElement = {} 
    local turfTimer = {} 
    local checkComplete = false 
      
    local messages = { 
        [1] = "Turf System by Sasuke* was started correctly!", 
        [2] = "This territory already belongs to %s", 
        [3] = "You enter into de %s's turf zone. Wait 2 minutes to capture the turf and win 4k", 
        [4] = "This turf doesn't belong to anyone. Wait 2 minutes to capture the turf and win 4k", 
        [5] = "Congratulations. You capture the turf. +4K!", 
        [6] = "If you don't come back within 20s, you won't capture the turf", 
        [7] = "You couldn't capture the turf because of absence" 
     } 
      
    --  Nadie = None | Just a translation 
      
    addEventHandler("onResourceStart", resourceRoot, 
    function() 
        executeSQLQuery("CREATE TABLE IF NOT EXISTS Turf_System ( Turfs TEXT, GangOwner TEXT, r INT, g INT, b INT)") 
        -- 
        local check = executeSQLQuery("SELECT * FROM Turf_System" ) 
        if #check == 0 then 
            for i=1,#turfPos do 
                executeSQLQuery("INSERT INTO Turf_System(Turfs,GangOwner,r,g,b) VALUES(?,?,?,?,?)", "Turf["..tostring(i).."]", "Nadie", 0, 255, 0) 
            end 
        elseif #check > 1 then 
            for i = #check, #turfPos do 
                executeSQLQuery("INSERT INTO Turf_System(Turfs,GangOwner,r,g,b) VALUES(?,?,?,?,?)", "Turf["..tostring(i).."]", "Nadie", 0, 255, 0) 
            end 
        end 
         
        for i,v in ipairs(turfPos) do 
            local sqlData = executeSQLQuery("SELECT * FROM Turf_System WHERE Turfs=?", "Turf["..tostring(i).."]") 
            local turfCol = createColCuboid(unpack(v)) 
            setElementData(turfCol, "getTurfGang", sqlData[1].GangOwner) 
            local turfArea = createRadarArea(v[1], v[2], v[4], v[5], sqlData[1].r, sqlData[1].g, sqlData[1].b, 175) 
            turfElement[turfCol] = {turfCol, turfArea, i} 
            turfTimer[turfCol] = {} 
        end 
         
        outputDebugString( messages[1] ) 
    end ) 
      
    addEventHandler ( "onColShapeHit", root, 
        function ( player ) 
            if turfElement[source] and source == turfElement[source][1] then 
                local turf,area,id = unpack( turfElement[source] ) 
                local playerGang = getElementData ( player, "gang" ) 
                local turfGang = executeSQLQuery("SELECT GangOwner FROM Turf_System WHERE Turfs=?", "Turf["..tostring(id).."]" ) 
                if ( turfGang[1].GangOwner == playerGang ) then 
                    outputChatBox( messages[2]:format( turfGang[1].GangOwner or "None" ), player, 0, 255, 0, false ) 
                else 
                    local playerGang = getElementData ( player, "gang" ) 
                    setElementData( source, "warTurf", playerGang ) 
                    if ( isTimer ( turfTimer[source][1] ) ) then 
                        if isTimer( turfTimer[source][2] ) then killTimer( turfTimer[source][2] ) end  
                        return  
                    end 
                    if ( playerGang ) then 
                        local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) 
                        -- local r, g, b = 255, 255, 255 
                        setRadarAreaFlashing ( area, true ) 
                        if turfGang[1].GangOwner ~= "Nadie" then 
                            outputChatBox( messages[3]:format( turfGang[1].GangOwner ), player, 0, 255, 0, false ) 
                        else 
                            outputChatBox( messages[4], player, 0, 255, 0, false ) 
                        end 
                         
                        turfTimer[source][1] = setTimer ( 
                            function ( ) 
                                local players = getGangPlayersInTurf ( turf, playerGang ) 
                                setRadarAreaColor ( area, tonumber(r), tonumber(g), tonumber(b), 175 ) 
                                for _, player in ipairs ( players ) do 
                                    outputChatBox( messages[5], player, 0, 255, 0, false ) 
                                    triggerClientEvent(player, "onTakeTurf", player) 
                                    givePlayerMoney ( player, 4000 ) 
                                    executeSQLQuery("UPDATE Turf_System SET GangOwner=?,r=?,g=?,b=? WHERE Turfs=?", playerGang, tonumber(r), tonumber(g), tonumber(b), "Turf["..tostring(id).."]" ) 
                                    -- setElementData ( turf, "getTurfGang", playerGang ) 
                                end 
                                setRadarAreaFlashing ( area, false ) 
                            end 
                        ,120000, 1) 
                    end 
                end 
            end 
        end 
    ) 
      
    addEventHandler ( "onColShapeLeave", root,  
        function( player ) 
            if turfElement[source] and source == turfElement[source][1] then 
                if isTimer( turfTimer[source][1] ) then 
                    local aGang = getElementData( source, "warTurf" ) 
                    local ps = getGangPlayersInTurf( source, aGang ) 
                    if #ps == 0 then 
                        outputChatBox( messages[6], player, 255, 0, 0 ) 
                        turfTimer[source][2] = setTimer( 
                            function(source, aGang) 
                                if isTimer(turfTimer[source][1]) then killTimer(turfTimer[source][1]) end 
                                setRadarAreaFlashing(turfElement[source][2], false) 
                                for _, v in ipairs( getElementsByType("player") ) do 
                                    if getElementData(v, "gang") == aGang then 
                                        outputChatBox(messages[7], v, 255, 0, 0) 
                                    end 
                                end 
                            end 
                        , 20000, 1, source, aGang) 
                    end 
                end 
            end 
        end 
    ) 
      
    function getGangPlayersInTurf( turf, gang ) -- element, string 
        if turf and gang then 
            local players = getElementsWithinColShape ( turf, "player" ) 
            local gPla = {} 
            for _, v in ipairs( players ) do         
                if getElementData(v, "gang") == gang then 
                    table.insert(gPla, v) 
                end 
            end 
            return gPla 
        end 
    end 
      
    

  6. سو اللي قال لك دابل عليه فوق

    اخوي سويت عاد ابي مساعدةة

    GUIEditor = { 
        button = {}, 
        window = {} 
    } 
    addEventHandler("onClientResourceStart", resourceRoot, 
        function() 
            GUIEditor.window[1] = guiCreateWindow(391, 258, 253, 179, "", false) 
            guiWindowSetSizable(GUIEditor.window[1], false) 
      
            GUIEditor.button[1] = guiCreateButton(22, 33, 201, 49, "1", false, GUIEditor.window[1]) 
            GUIEditor.button[2] = guiCreateButton(22, 101, 201, 49, "2", false, GUIEditor.window[1])     
        end 
    ) 
    addEventHandler("onClientGUIClick",root, 
    function () 
    if getPlayerTeam (localPlayer) and getTeamName ( getPlayerTeam ( localPlayer ) ) == "Police" then 
    if source == GUIEditor.button[1] then 
    setTimer ( setElementPosition, 5000,1,localPlayer,  2005.00000,1547.54846,13.58594 ) 
    setElementDimension ( localPlayer, 55 ) 
    end 
     end 
      end 
    ) 
      
    addEventHandler("onClientGUIClick",root, 
    function () 
    if getPlayerTeam (localPlayer) and getTeamName ( getPlayerTeam ( localPlayer ) ) == "جميع اتيمات باستثناء الشرطة لن الزر حقهم فوق" then 
    if source == GUIEditor.button[1] then 
    setTimer ( setElementPosition, 5000,1,localPlayer,  2005.00000,1547.54846,1354.343 ) 
    setElementDimension ( localPlayer, 55 ) 
    end 
     end 
      end 
    ) 
    

    وفي مشكله عندي بالحتلال تبع اجنبي لا دخلت المنطقه يقول

    You entered a unoccupied turf.

    ليه؟

  7. اخوي حاولت بس التيمات مازبطت ينقل حتى لو مني بتيم

    وثاني شي ابي زر ينقل الشرطة باحداث .و زر ينقل الكل بدون استثاء غير الشرطة لاحداث ثاني

    GUIEditor = { 
        button = {}, 
        window = {} 
    } 
    addEventHandler("onClientResourceStart", resourceRoot, 
        function() 
            GUIEditor.window[1] = guiCreateWindow(391, 258, 253, 179, "", false) 
            guiWindowSetSizable(GUIEditor.window[1], false) 
      
            GUIEditor.button[1] = guiCreateButton(22, 33, 201, 49, "1", false, GUIEditor.window[1]) 
            GUIEditor.button[2] = guiCreateButton(22, 101, 201, 49, "2", false, GUIEditor.window[1])     
        end 
    ) 
    addEventHandler("onClientGUIClick",root, 
    function () 
    if source == GUIEditor.button[1] then 
    setTimer ( setElementPosition, 5000,1,localPlayer,  2005.00000,1547.54846,13.58594 ) 
    setElementDimension ( localPlayer, 55 ) 
    if getPlayerTeam (localPlayer) and getTeamName ( getPlayerTeam ( localPlayer ) ) == "Police" then 
    end 
     end 
      end 
    ) 
      
    addEventHandler("onClientGUIClick",root, 
    function () 
    if source == GUIEditor.button[1] then 
    setTimer ( setElementPosition, 5000,1,localPlayer,  2005.00000,1547.54846,13.58594 ) 
    setElementDimension ( localPlayer, 55 ) 
    if getPlayerTeam (localPlayer) and getTeamName ( getPlayerTeam ( localPlayer ) ) == "Police" then 
    end 
     end 
      end 
    ) 
    

  8. تمام لكن لو ابي اسوي

      
    GUIEditor = { 
        button = {}, 
        window = {} 
    } 
    addEventHandler("onClientResourceStart", resourceRoot, 
        function() 
            GUIEditor.window[1] = guiCreateWindow(391, 258, 253, 179, "", false) 
            guiWindowSetSizable(GUIEditor.window[1], false) 
      
            GUIEditor.button[1] = guiCreateButton(22, 33, 201, 49, "1", false, GUIEditor.window[1]) 
            GUIEditor.button[2] = guiCreateButton(22, 101, 201, 49, "2", false, GUIEditor.window[1])     
        end 
    ) 
    addEventHandler("onClientGUIClick",root,  
    function () 
    if source == GUIEditor.button[1] then  
    setTimer ( setElementPosition, 5000,1,localPlayer,  2005.00000,1547.54846,13.58594 ) 
    end 
     end 
    ) 
    

    لكن ابي اسوي لها سباونين لتيمين مختلفين

    مثلا السباون ذا

    setTimer ( setElementPosition, 5000,1,localPlayer, 2005.00000,1547.54846,13.58594 )

    لتيم شرطة ينقلهم للاحداث

    وبسوي سباون ثاني ينقل للكل لكن شرطة لا

    يعني سباون خاص شرطة وسباون للكل وكلها نفس الزر او زرين عادي

  9. "onClientGUIClick" 
    setElementPosition  
    

    طيب اخوي انا اقدر اتصرف بالكود ذا احاول اسويه

    ولا بالمنتدى جاهزة كثير

    لكن كيف اخليه لا بدت المهمه يطلع اللوحه الانتقال للمهمة ولكل لمهمه مكان انتقال مو لوحه وانتقال وبس

  10. ColShape = createColRectangle ( -1137.5582, 1018.7025, 176.75, 95.25, 2) 
      
    addEventHandler("onClientPlayerSpawn", root, 
    function () 
        if isElementWithinColShape(source, ColShape) then 
            setElementHealth(source, 0) 
        end 
    end 
    ) 
    

    8)

    تمام اخوي شغال .. لادخلت الكول شيب و خرحت ودخلت اموت

    يعطيك الف عافية مشكور

    وشكرأ لكل الساعدو بالموضوع

  11. تمام اخوي

    MR.GRAND_#

    نفس الطلب ماقصررت

    ومشكوووووووووووووووووور دابل

    لكن اخواني طلب اخير الحين مثلا مسوي كول شيب وفيه لاعب واقف بالكول شيب

    ابي لو طلع من السيرفر ودخل وهو بالكول شيب يموت : )

  12. setElementCollidableWith 
    

    8)

    سوي لوب في الاعبين و اعكسه و انشاء الله يضبط

    اخوي الكود حق برستيج فوق تمام لكن لزم امر اف 8 ابية بدون امر :(

    يعني تبيه لما يدخل الكول شيب يشتغل؟

    لا لا اخوي بكل مكان ذا عادي مو بالكول بس

  13. ColShape = createColRectangle ( -1137.5582, 1018.7025, 176.75, 95.25, 2) 
    addEventHandler("onClientPlayerDamage", root, 
    function (attacker) 
        if getElementType(attacker) == "player" and getElementType(source) == "player" and isElementWithinColShape(source, ColShape) and isElementWithinColShape(attacker, ColShape) then 
            cancelEvent () 
        end 
    end 
    ) 
    

    فين المتغير :?

    ركبته خذ

    جزاكك الله خير شغال تمام التمام

    لكن سوال عن كود برستيج ان الاعب يكون يقدر يدخل ب الاعب الثاني يكون شفاف

    الاعب يدخل بلاعب اخر عادي مو شي ثاني

  14. نفس الششي اقدر اقتلهم

    حذفت ردي اللي فوق بسرعه خخ لن حسيت انه سوال غبي

    createColRectangle ( -1137.5582, 1018.7025, 176.75, 95.25, 2) 
    addEventHandler("onClientPlayerDamage", root, 
    function (attacker) 
        if getElementType(attacker) == "player" and getElementType(source) == "player" and isElementWithinColShape(source, ColShape) and isElementWithinColShape(attacker, ColShape) then 
            cancelEvent () 
        end 
    end 
    ) 
    

  15. الكود ذا ماششتغل

    createColRectangle ( -1137.5582, 1018.7025, 176.75, 95.25, 2) 
    addEventHandler("onClientPedDamage", root, 
    function () 
        if isElementWithinColShape(localPlayer, ColShape) then 
            cancelEvent () 
        end 
    end 
    ) 
    

    اقدر اقتل اللي بالكول شيب

×
×
  • Create New...