Jump to content

No DM in team, script.


Adde

Recommended Posts

Hey guys, I need some help with this script. It should make it unavailable for players in the same team ( police department ) to damage eachother IF the weapon isn´t oghtstick. I made it like this, can´t find the error. And nothing in debug.

function noDM(attacker) 
if ( getPlayerTeam(source) == "Police Department" ) and ( getPlayerTeam(attacker) == "Police Department" ) and ( not getPlayerWeapon(attacker) == "3" ) then 
cancelEvent() 
end 
end 
addEventHandler("onPlayerDamage", getRootElement(), noDM) 

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