Jump to content
Sign in to follow this  
Alyxm

this allowDamage false is not working, please help

Recommended Posts

Hey i'm an admin on a server trying to get invulnerability, there is definitely something I'm missing here to stop other players from killing me. If not, please help me anyway! thanks again

Share this post


Link to post
Share on other sites

This AddEventHandler ["HandleDamage", {False}];

note: I give everyone the benefit of the doubt... I do hope you're not trying to abuse commands in public servers.

Share this post


Link to post
Share on other sites

It's quite interesting that allowDamage does not seem to work properly. It doesn't prevent damage fully, and when for example hit by a rocket which causes 1 damage, allowDamage does not trigger and you'll die. Ironically I just PMed Dwarden about it because to me it seemed like a dev issue.

Share this post


Link to post
Share on other sites
This AddEventHandler ["HandleDamage", {False}];

note: I give everyone the benefit of the doubt... I do hope you're not trying to abuse commands in public servers.

Where and how do I implement this? I'm playing on wasteland servers, I wont use it on a public server, I cant, I only know how to put this through pressing u, then debug, proving grounds, and console. This method is only possible via admin status.

And this command isn't working via that way.

Share this post


Link to post
Share on other sites

Ok, you have two problems here.

1.) allowDamage does not work in multi-player due to it being run on local machines only.

2.) The following will prevent any unit from taking damage, however, it must be implemented in the init line of the unit whilst editing the mission in the in-game editor. You cannot implement this from the in-game admin console.

this addEventHandler ["HandleDamage", {false}];

Share this post


Link to post
Share on other sites

I would do this, add this to your mission init

call compile preProcessFile "whitelist.sqf";

Then the whitelist would look like this...Add in your player uid and the other admins if any into the Admin_Array

private["_uid"];
_uid = getPlayerUID; 
Admin_Array = [list,OF,UIDS,SEPARATED,BY,COMMAS];

if(_uid in Admin_Array) then
{
  this addEventHandler ["HandleDamage", {false}];
};

That should solve most of your problems minus what tryteyker was talking about. Let me know if you have any other questions.

Edited by dcthehole

Share this post


Link to post
Share on other sites

Use this instead.

[color="#FF0000"]player[/color] addEventHandler ["HandleDamage", {false}];

Share this post


Link to post
Share on other sites
The command is - this allowDammage FALSE;

Must have two "m".

You're thinking of getDammage.

Share this post


Link to post
Share on other sites

None of the solutions given here so far have fixed this issue.

I personally was using 'this allowDamage false;' for testing and certain training units/players.

Anyone else have a solution for making players/units invulnerable?

Share this post


Link to post
Share on other sites

Are you placing them in the right place, if your using this allowDamage false or this addEventHandler ["HandleDamage", {}] they need to go in the units init or waypoint on act.

If you use them in a trigger you will need to name the unit then use that name instead of this

Share this post


Link to post
Share on other sites

Yep, tried both of them in the units init field.

this allowDamage false; was working in alpha.

Share this post


Link to post
Share on other sites

Still not happy?

I came here in a similar search - but didn't got a working answer in that thread ether.

My solution (cause using ACE) where an additional:

player setVariable ["ace_w_allow_dam",false,true];

player allowDamage false;

and to get killed again use:

player setVariable ["ace_w_allow_dam",nil,true]; // yes, nil as in unSet

player allowDamage true;

gz.

Edited by tabakhase
removed ace_w_eh, added "turn off"

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×