Jump to content

Invincible


Recommended Posts

Hello there,

I have made a script that makes the players in the staff team invincible, atleast that's what I wanted to make, but whenever ANY player is in the staff team, all of the players in the other teams are also invincible. I don't know why, and I have tried a lot of things.

This is my script:

  
function StopDamage (theTeam) 
  local players = getPlayersInTeam(getTeamFromName("Staff")) 
  for i,v in pairs(players) do 
    if getPlayerTeam(v) == getTeamFromName("Staff") then 
      cancelEvent() 
    end 
  end 
end 
addEventHandler("onClientPlayerDamage", localPlayer, StopDamage) 
  

I think it should do what I want, but it turns out it doesn't.

Thanks in advance,

~Gtagasje

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