Jump to content
Astronauth-e12e430adb6a88eb

Script to make Players on DS take no damage while in any vehicle.

Recommended Posts

Hello,

I am noob at such things as scripting , but long story short - Could you guys help me how to ensure that "when any MP player on DS enters any vehicle (even fresh spawn by zeus) then player takes no damage at all ? and when any MP player leaves any vehicle it is vulnerable again ?

Thank you in advance.

Share this post


Link to post
Share on other sites

Place this code in the mission's initPlayerLocal.sqf:

player addEventHandler ["GetInMan",{
	player allowDamage false;
}];
player addEventHandler ["GetOutMan",{
	player allowDamage true;
}];

 

Associated commands, in case you want to change/understand any of it:

https://community.bistudio.com/wiki/addEventHandler

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#GetInMan

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#GetOutMan

https://community.bistudio.com/wiki/allowDamage

  • Like 1

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

×