Jump to content

تعديل كود


Recommended Posts

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

كيفكم ششباب انشاء الله بخير

ابيكم تصححون لي ذذ الكود

لان مثلا لو انا وقروبي نحتل يجي اي واحد يدخل المنطقة ياخذ فلوس

ابي بس الي بالقروب ياخذون فلوس

function radar3 ( player ) 
local playerGang = getElementData ( player, "gang" ) 
local turfGang = getElementData ( pCuboid3, "getTurfGang", true ) 
    if (turfGang == playerGang) then 
    outputChatBox("This territory already belongs to"..turfGang, player, 0, 255, 0, false) 
    else 
        if not getPlayerTeam(player) then return end 
    local team = getPlayerTeam ( player ) 
    if (getTeamName( team ) == "Criminal") then 
    local playerGang = getElementData ( player, "gang" ) 
    if ( playerGang ) then 
        if ( isTimer ( beachturfTimer ) ) then 
            return 
        end 
  
        local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) 
        setRadarAreaFlashing ( pArea3, true ) 
        local turfGang = getElementData ( pCuboid3, "getTurfGang", true ) 
        if turfGang then 
        outputChatBox("You came in The Zone Of Turf "..turfGang..". Wait 2 Minutes To Conquer The Turf Power And Earn 4k", player, 0, 255, 0, false) 
        else 
        outputChatBox("This Turf Even belongs Not A Nobody. Wait 2 Minutes To Conquer The Turf Power And Earn 4k", player, 0, 255, 0, false) 
        end 
  
         
        beachturfTimer = setTimer ( 
            function ( ) 
                local beachTurfCplayers = getElementColShape ( pCuboid3 ) 
                local players = getElementsWithinColShape ( pCuboid3, "player" ) 
                setRadarAreaColor ( pArea3, tonumber(r), tonumber(g), tonumber(b), 100 ) 
                for _, player in ipairs ( players ) do 
                    outputChatBox("Congratulations Conquered The Turf", player, 0, 255, 0, false) 
                    triggerClientEvent("onTakeTurf", player) 
                    givePlayerMoney ( player, 4000 ) 
                    setElementData ( pCuboid3, "getTurfGang", playerGang ) 
                end 
                setRadarAreaFlashing ( pArea3, false ) 
            end 
            ,120000, 1 
        ) 
    end 
end 
end 
end 
addEventHandler ( "onColShapeHit", pCuboid3, radar3 ) 

Link to comment
(getTeamName( team ) == "Criminal") then 

   local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) 

هذا شنو واذا تبي يكون في القروب؟؟؟

-_-

اقرا الي فوق زينن

انا قايل اي واحد يخش الارض وقروب يحتل وهو مو بالقروب ياخذ فلوس

++

انا ابي بس الي بالقروب ياخذون فلوس لو يخش 100 واحد مو بالقروب ما ياخذ

ياليت اذا ما عندك خبرة لا ترد

Link to comment
يا كنق مو ملاحض فوق انه حق تيم

+

لزم تعمل تحديد للموقع بكول شيب او مارك

+

تتحقق انه مو بل فريق

=

ياخد فلوس

هو يقول انا ابيه للتيم والقروب .. بطلنا نفهم عليه وش يقصد بالقروب -_-

بعدين ما يحتاج وظايفكـ الي حاطها انت تحت .. يمديه يتحقق لما يرسل الفلوس كآلتالي

for _, player in ipairs ( players ) do 
    if ( getPlayerTeam ( player ) ) then 
        outputChatBox("Congratulations Conquered The Turf", player, 0, 255, 0, false) 
        triggerClientEvent("onTakeTurf", player) 
        givePlayerMoney ( player, 4000 ) 
        setElementData ( pCuboid3, "getTurfGang", playerGang ) 
    end 
end 

طبعاً المتغيرات هاذي هو معرفها بكودهـ .. أنا بس ضفت عليها شرط التحقق إذا كان اللاعب بتيم أو لا !

Link to comment

انا قصدي الحين عندي مود احتلال + مود قروبات حق العقرب طبعا معرف المود على الاحتلال ومظبط كل شي

بس الحين انا يوم احتل واذا واحد خش وياخذ فلوس ~~~ انا ابي بس الي بالقروب الي يحتلون ياخذون فلوس يعني الي يساعدون ما يخذون

Link to comment
function radar3 ( player ) 
local playerGang = getElementData ( player, "gang" ) 
local turfGang = getElementData ( pCuboid3, "getTurfGang", true ) 
    if (turfGang == playerGang) then 
    outputChatBox("This territory already belongs to"..turfGang, player, 0, 255, 0, false) 
    else 
        if not getPlayerTeam(player) then return end 
    local team = getPlayerTeam ( player ) 
    if (getTeamName( team ) == "Criminal") then 
    local playerGang = getElementData ( player, "gang" ) 
    if ( playerGang ) then 
        if ( isTimer ( beachturfTimer ) ) then 
            return 
        end 
  
        local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) 
        setRadarAreaFlashing ( pArea3, true ) 
        local turfGang = getElementData ( pCuboid3, "getTurfGang", true ) 
        if turfGang then 
        outputChatBox("You came in The Zone Of Turf "..turfGang..". Wait 2 Minutes To Conquer The Turf Power And Earn 4k", player, 0, 255, 0, false) 
        else 
        outputChatBox("This Turf Even belongs Not A Nobody. Wait 2 Minutes To Conquer The Turf Power And Earn 4k", player, 0, 255, 0, false) 
        end 
  
        
        beachturfTimer = setTimer ( 
            function ( ) 
                local beachTurfCplayers = getElementColShape ( pCuboid3 ) 
                local players = getElementsWithinColShape ( pCuboid3, "player" ) 
                setRadarAreaColor ( pArea3, tonumber(r), tonumber(g), tonumber(b), 100 ) 
        for _, player in ipairs ( players ) do 
            if ( getElementData ( player, "gang" ) ) then 
                outputChatBox("Congratulations Conquered The Turf", player, 0, 255, 0, false) 
                triggerClientEvent("onTakeTurf", player) 
                givePlayerMoney ( player, 4000 ) 
                setElementData ( pCuboid3, "getTurfGang", playerGang ) 
            end 
        end 
                setRadarAreaFlashing ( pArea3, false ) 
            end 
            ,120000, 1 
        ) 
    end 
end 
end 
end 
addEventHandler ( "onColShapeHit", pCuboid3, radar3 ) 

Link to comment
function radar3 ( player ) 
local playerGang = getElementData ( player, "gang" ) 
local turfGang = getElementData ( pCuboid3, "getTurfGang", true ) 
    if (turfGang == playerGang) then 
    outputChatBox("This territory already belongs to"..turfGang, player, 0, 255, 0, false) 
    else 
        if not getPlayerTeam(player) then return end 
    local team = getPlayerTeam ( player ) 
    if (getTeamName( team ) == "Criminal") then 
    local playerGang = getElementData ( player, "gang" ) 
    if ( playerGang ) then 
        if ( isTimer ( beachturfTimer ) ) then 
            return 
        end 
  
        local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) 
        setRadarAreaFlashing ( pArea3, true ) 
        local turfGang = getElementData ( pCuboid3, "getTurfGang", true ) 
        if turfGang then 
        outputChatBox("You came in The Zone Of Turf "..turfGang..". Wait 2 Minutes To Conquer The Turf Power And Earn 4k", player, 0, 255, 0, false) 
        else 
        outputChatBox("This Turf Even belongs Not A Nobody. Wait 2 Minutes To Conquer The Turf Power And Earn 4k", player, 0, 255, 0, false) 
        end 
  
        
        beachturfTimer = setTimer ( 
            function ( ) 
                local beachTurfCplayers = getElementColShape ( pCuboid3 ) 
                local players = getElementsWithinColShape ( pCuboid3, "player" ) 
                setRadarAreaColor ( pArea3, tonumber(r), tonumber(g), tonumber(b), 100 ) 
        for _, player in ipairs ( players ) do 
            if ( getElementData ( player, "gang" ) ) then 
                outputChatBox("Congratulations Conquered The Turf", player, 0, 255, 0, false) 
                triggerClientEvent("onTakeTurf", player) 
                givePlayerMoney ( player, 4000 ) 
                setElementData ( pCuboid3, "getTurfGang", playerGang ) 
            end 
        end 
                setRadarAreaFlashing ( pArea3, false ) 
            end 
            ,120000, 1 
        ) 
    end 
end 
end 
end 
addEventHandler ( "onColShapeHit", pCuboid3, radar3 ) 

بالله وضح وش ضفت عشان بتاكد ومنها وبتسفيدمنها :)

Link to comment
function radar3 ( player ) 
local playerGang = getElementData ( player, "gang" ) 
local turfGang = getElementData ( pCuboid3, "getTurfGang", true ) 
    if (turfGang == playerGang) then 
    outputChatBox("This territory already belongs to"..turfGang, player, 0, 255, 0, false) 
    else 
        if not getPlayerTeam(player) then return end 
    local team = getPlayerTeam ( player ) 
    if (getTeamName( team ) == "Criminal") then 
    local playerGang = getElementData ( player, "gang" ) 
    if ( playerGang ) then 
        if ( isTimer ( beachturfTimer ) ) then 
            return 
        end 
  
        local r, g, b = unpack ( exports [ "gang_system" ]:getGangColor ( playerGang ) ) 
        setRadarAreaFlashing ( pArea3, true ) 
        local turfGang = getElementData ( pCuboid3, "getTurfGang", true ) 
        if turfGang then 
        outputChatBox("You came in The Zone Of Turf "..turfGang..". Wait 2 Minutes To Conquer The Turf Power And Earn 4k", player, 0, 255, 0, false) 
        else 
        outputChatBox("This Turf Even belongs Not A Nobody. Wait 2 Minutes To Conquer The Turf Power And Earn 4k", player, 0, 255, 0, false) 
        end 
  
        
        beachturfTimer = setTimer ( 
            function ( ) 
                local beachTurfCplayers = getElementColShape ( pCuboid3 ) 
                local players = getElementsWithinColShape ( pCuboid3, "player" ) 
                setRadarAreaColor ( pArea3, tonumber(r), tonumber(g), tonumber(b), 100 ) 
        for _, player in ipairs ( players ) do 
            if ( getElementData ( player, "gang" ) ) then 
                outputChatBox("Congratulations Conquered The Turf", player, 0, 255, 0, false) 
                triggerClientEvent("onTakeTurf", player) 
                givePlayerMoney ( player, 4000 ) 
                setElementData ( pCuboid3, "getTurfGang", playerGang ) 
            end 
        end 
                setRadarAreaFlashing ( pArea3, false ) 
            end 
            ,120000, 1 
        ) 
    end 
end 
end 
end 
addEventHandler ( "onColShapeHit", pCuboid3, radar3 ) 

بالله وضح وش ضفت عشان بتاكد ومنها وبتسفيدمنها :)

سطر 32 :

if ( getElementData ( player, "gang" ) ) then 

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...