Advertisement
Guest User

Untitled

a guest
Jan 10th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 0.93 KB | None | 0 0
  1. /*
  2.     File: fn_function_1.sqf
  3.     Author: Brutalzic
  4.     devarma3france.fr
  5.     http://devarma3france.fr  ||  http://www.btrteam.fr
  6.     BTR Team / MCF Gaming / 5-DAG
  7. */
  8. player addEventHandler
  9. ["handleDamage",
  10.     {
  11.         _player = _this select 0;
  12.         _shooter = _this select 6;
  13.         _time = time;
  14.         _factor = _player distance _shooter;
  15.  
  16.         if ((_this select 4) isEqualTo "cartridge_flashball") then {
  17.             _player forceWalk true;
  18.             if (_factor < 3) then {
  19.                 _player setDamage 0.8;
  20.                 waitUntil {_time + 0.006};
  21.                 _player forceWalk false;
  22.                 _player setfatigue 1;
  23.             };
  24.             if (_factor > 3) then {
  25.                 if (_factor < 10) then {
  26.                     _player setDamage 0.3;
  27.                     waitUntil {_time + 0.006};
  28.                     _player forceWalk false;
  29.                     _player setfatigue 1;
  30.                 };
  31.             };
  32.             if (_factor > 10) then {
  33.                 if (_factor < 30) then {
  34.                     waitUntil {_time + 0.003};
  35.                     _player forceWalk false;
  36.                     _player setfatigue 1;
  37.                 };
  38.             };
  39.         };
  40.     }
  41. ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement