marty000123 Posted September 7, 2014 Share Posted September 7, 2014 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 ) Thans in advance Marty Link to comment
Anubhav Posted September 7, 2014 Share Posted September 7, 2014 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) Link to comment
marty000123 Posted September 7, 2014 Author Share Posted September 7, 2014 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
tosfera Posted September 7, 2014 Share Posted September 7, 2014 Why don't you cancel the damage client sided? So you don't have a loop running 10 times a second... Link to comment
marty000123 Posted September 7, 2014 Author Share Posted September 7, 2014 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 Link to comment
Saml1er Posted September 7, 2014 Share Posted September 7, 2014 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now