Jump to content

طلب كود او مود


Recommended Posts

addEventHandler("onClientPlayerDamage", localPlayer, 
function(attacker) 
   if attacker and getElementType(attacker) == "player" and attacker ~= source then 
       local g1 = getElementData(source, "gang") 
         local g2 = getElementData(attacker, "gang") 
           if g1 and g2 and g1 == g2 then 
          cancelEvent() 
        end 
    end 
end 
) 
Link to comment

# لم يتم التججربة .

Groups = { 
["Your Name Group"] = true, 
} 
  
local cancel = "true"         -- true or false Just . 
  
addEventHandler ( "onClientPlayerDamage", localPlayer, 
    function ( attacker _,_ ) 
       if attacker and attacker ~= source then 
       if Groups[getElementData( source , "Group" )] and Groups[getElementData( attacker, "Group" )] then 
       cancelEvent ( tostring ( cancel ) ); 
       end; 
    end; 
end ); 
Link to comment

@ The Killer : الكود حقك ما فيه غلط , بس الكود حقي طارحه من قبل .

@ MJNONFIK : معاك حق في غلط يصير كذا ...

Groups = { 
["Your Name Group"] = true, 
} 
  
  
addEventHandler ( "onClientPlayerDamage", localPlayer, 
    function ( attacker _,_ ) 
       if attacker and attacker ~= source then 
         if Groups[getElementData( source , "Group" )] and Groups[getElementData( attacker, "Group" )] then 
          cancelEvent (  ); 
       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...