Jump to content

Friendly Fire > Classes.


Panda

Recommended Posts

Posted

Hello everyone,

Well i tried to make friendly fire script function but the problem is i don't want it to be locked to teams, i want it to be locked to Classes. Idk what i'm doing but i just tried something it doesn't work already tested it but yeah.. I really need some help over here :$

function Trolo ( attacker, attackerweapon, bodypart, loss ) 
 if attacker and getElementType(attacker) == "player" then 
            if  ( getElementData ( attacker, "class" ) == "Delta Team" ) ~= ( getElementData ( source, "class" ) == "Delta Team" ) then      
cancelEvent() 
end 
end 
end           
addEventHandler ("onPlayerDamage", getRootElement(), Trolo) 

i'm not sure about it, need some help.

Thanks.

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