Jump to content

Heal every sec


marty000123

Recommended Posts

Hey there

I'm looking for a script which heals the ''Staff'' team (So who spawned as the team called '' Staff '') every second.

Because I have a zombie server, they can get beaten easily while they have godmode.

This is the only way to fix it, to just get them healed 100% every second (without messages :P)

Thans in advance :)

Marty

Link to comment
  
setTimer( 
function() 
for k,v in ipairs(getElementsByType("player")) do 
if getTeamName(getPlayerTeam(v)) == "Staff" then 
setElementHealth(v, getElementHealth(v)+10)     
end 
end 
end, 1000, 0) 
  

Thank you very much for your fast response!

I edited it a bit to this,

  
setTimer( 
function() 
for k,v in ipairs(getElementsByType("player")) do 
if getTeamName(getPlayerTeam(v)) == "Staff" then 
setElementHealth(v, getElementHealth(v)+100)     
end 
end 
end, 100, 0) 
  

So it's just impossible 100% To be beaten down by zombies.

Thanks for your help!

Marty

Link to comment
I just discovered that when I'm in the staff team, and I shoot someone with the resource turned off, I also can't damage them.

How does that come and how to fix that?

Marty

probably some other resource is running that is canceling onClientPlayerDamage évent.

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