1
0

fn_onhit.sqf 800 B

12345678910111213141516171819202122232425262728
  1. /*
  2. * Author: MrClock
  3. * HitPart XEH function
  4. *
  5. *
  6. * Arguments:
  7. * Inherited from HitPart XEH
  8. *
  9. * Example:
  10. * (_this select 0) call JLTS_fnc_onHit;
  11. *
  12. * Return Value:
  13. * None
  14. *
  15. */
  16. params["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"];
  17. //if (!hasInterface) exitWith {};
  18. if (isNil{_ammo select 4}) exitWith {/*systemChat "Fall damage"*/};
  19. if (!alive _target) exitWith {};
  20. private _ammoUsed = _ammo select 4;
  21. if (getNumber(configFile >> "CfgAmmo" >> _ammoUsed >> "JLTS_isEMPAmmo") == 1) then {[_target,_shooter,_ammoUsed,_projectile] call RD501_fnc_onHitEMP};
  22. if (getNumber(configFile >> "CfgAmmo" >> _ammoUsed >> "JLTS_isStunAmmo") == 1) then {[_target,_shooter,_ammoUsed] call JLTS_fnc_onHitStun};