Jump to content

عدم إطلاق على الى معك بفريق


Recommended Posts

السلام عليكم

انا مركب مود setTeamFriendlyFire

الكود الى فيه

for _, v in ipairs ( getElementsByType 'team' ) do 
    setTeamFriendlyFire ( v, false ) 
end 

المهم انه يحمي الاعب من الطلق بس

يعني لو انا من تيم ekoo وصديقي من تيم ekoo

وطلقت ماراح يتاثر .. بس لو خليت عليه هذي الاسلحة ينقص من دمه

الاسلحة

Grenade 16

Tear Gas 17

Molotov Cocktails 18

Flamethrower 37

Spraycan 41

Fire Extinguisher 42

ينقص من دمه

الزبدة ..

وش احتاج او وش الاكواد الى تخلي

يوم استعمل الاسلحة الى فوق على واحد من فريقي

ينفذ هالكود

cancelEvent() 

عشان يلغي العملية وماينقص من دم الى معي بتيم شيئ ؟؟

Link to comment
  
client Side ! 
function AboShanab ( attacker, weapon, bodypart ) 
    if ( weapon == 16 or 17 or 18 or 37 or 41 or 42 ) and ( attacker == localPlayer ) then 
        cancelEvent() 
    end 
end 
addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), AboShanab ) 
  

Link to comment
  
client Side ! 
function AboShanab ( attacker, weapon, bodypart ) 
    if ( weapon == 16 or 17 or 18 or 37 or 41 or 42 ) and ( attacker == localPlayer ) then 
        cancelEvent() 
    end 
end 
addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), AboShanab ) 
  

المفروض تتحقق من تيم السورس و تيم الاتاكر

Link to comment
  
client Side ! 
function AboShanab ( attacker, weapon, bodypart ) 
    if ( weapon == 16 or 17 or 18 or 37 or 41 or 42 ) and ( attacker == localPlayer ) then 
        cancelEvent() 
    end 
end 
addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), AboShanab ) 
  

كود ابو شنب يمنع ان اللاعب يدمح نفسه بهذي الأسلحه تقدر تسويه كذا

بحيث انه ما يضرب الي بتيمه

client side

--غير مجرب 
function AboShanab ( attacker, weapon, bodypart ) 
    if weapon == 16 or 17 or 18 or 37 or 41 or 42 and attacker == localPlayer then 
        cancelEvent() 
    end 
       if getPlayerTeam(attacker) == getPlayerTeam(localPlayer) and weapon == 16 or 17 or 18 or 37 or 41 or 42 then 
cancelEvent() 
     end 
end 
addEventHandler ( "onClientPlayerDamage", getLocalPlayer(), AboShanab ) 
  
Link to comment

يمديك تستخدم هذا

function AboShanab ( attacker, weapon, bodypart ) 
    if weapon == 16 or weapon == 17 or weapon == 18 or weapon == 37 or weapon == 41 or weapon == 42 then 
        if attacker == source or getPlayerTeam(attacker) == getPlayerTeam(source) then 
            cancelEvent() 
        end 
    end 
end 
addEventHandler ( "onClientPlayerDamage", localPlayer, AboShanab ) 

او هذا

function AboShanab ( attacker, weapon, bodypart ) 
    local weapons = {[16]=true, [17]=true, [18]=true, [37]=true, [41]=true, [42]=true} 
    if weapons[weapon] then 
        if attacker == source or getPlayerTeam(attacker) == getPlayerTeam(source) then 
            cancelEvent() 
        end 
    end 
end 
addEventHandler ( "onClientPlayerDamage", localPlayer, AboShanab ) 

الاثنين شغالين ان شاء الله

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