Jump to content

تصحيح كود


Recommended Posts

االسلام عليكم ورحمه الله

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

الكود حق لو احد  اخد بوكس واحد يموت

ابي لو الشخص مات تروح منه هالخاصية ويصير عادي

محاولتي

addEventHandler("onPlayerWasted", root,
    function(attacker, weapon, bodypart)
        if ( getElementData(attacker,"Damage") == true ) then
            if attacker and attacker ~= source and getElementType(attacker) == "player" then
                if weapon == 0 then
                    killPed(source, attacker, weapon, bodypart) ==false) ---- ذا من عندي سويتة فولس
                end 
            end
        end
    end
    )

 

Link to comment
36 minutes ago, SAM!! said:

االسلام عليكم ورحمه الله

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

الكود حق لو احد  اخد بوكس واحد يموت

ابي لو الشخص مات تروح منه هالخاصية ويصير عادي

محاولتي


addEventHandler("onPlayerWasted", root,
    function(attacker, weapon, bodypart)
        if ( getElementData(attacker,"Damage") == true ) then
            if attacker and attacker ~= source and getElementType(attacker) == "player" then
                if weapon == 0 then
                    killPed(source, attacker, weapon, bodypart) ==false) ---- ذا من عندي سويتة فولس
                end 
            end
        end
    end
    )

 

Damage انا الحين مو فاهم وين الخاصيه بس لو تقصد الخاصيه هي الداتا 

يصير كذا

addEventHandler("onPlayerWasted", root,
    function(attacker, weapon, bodypart)
        if ( getElementData(attacker,"Damage") == true ) then
            if attacker and attacker ~= source and getElementType(attacker) == "player" then
                if weapon == 0 then
					setElementData( attacker, "Damage", false )
        		end 
            end
        end
    end
    )

killPed(source, attacker, weapon, bodypart) ==false) ---- ذا من عندي سويتة فولس

وهذا غلط ^^ واصلا م له داعي الحدث لما الاعب يموت انت تبي تموته وهو يموت

Link to comment
addEventHandler("onPlayerWasted", root,
    function(attacker, weapon, bodypart)
        if ( getElementData (attacker, "Damage" ) == true ) then
            if attacker and attacker ~= source and getElementType(attacker) == "player" then
			setElementData( attacker, "Damage", false )
            end
        end
    end
)

-- جرب

 

Link to comment
            addEventHandler("onPlayerWasted", root,
                function(_, killer)
    			if killer and killer ~= source and getElementType(killer) == "player" then
                    if ( getElementData (killer, "Damage" ) == true ) then
            			setElementData( killer, "Damage", false )
                        end
                    end
                end
            )

            -- جرب

 

Edited by *RayaN-Alharbi.
  • Like 1
Link to comment
10 minutes ago, *RayaN-Alharbi. said:

            addEventHandler("onPlayerWasted", root,
                function(_, killer)
    			if killer and killer ~= source and getElementType(killer) == "player" then
                    if ( getElementData (killer, "Damage" ) == true ) then
            			setElementData( killer, "Damage", false )
                        end
                    end
                end
            )

            -- جرب

 

.يعطيك العافيه م ركزت * للفنكشن

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