Advertisement
Guest User

sincity vdm / fn_handleDamage

a guest
Feb 9th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. if(!isNil "TON_Debug") then {
  2. systemChat format["PART: %1 || DAMAGE: %2 || SOURCE: %3 || PROJECTILE: %4 || FRAME: %5",_part,_damage,_source,_projectile,diag_frameno];
  3. };
  4.  
  5. //Handle the tazer first (Top-Priority).
  6. if(!isNull _source) then {
  7. if(_source != _unit) then {
  8. _curWep = currentWeapon _source;
  9. if(_projectile in ["B_9x21_Ball","B_556x45_dual"] && _curWep in ["hgun_P07_snds_F","arifle_SDAR_F"]) then {
  10. if(side _source == west) then {
  11. private["_distance","_isVehicle","_isQuad"];
  12. _distance = if(_projectile == "B_556x45_dual") then {100} else {35};
  13. _isVehicle = if(vehicle player != player) then {true} else {false};
  14. //_isQuad = if(_isVehicle) then {if(typeOf (vehicle player) == "B_Quadbike_01_F") then {true} else {false}} else {false};
  15.  
  16. _damage = false;
  17. if(_unit distance _source < _distance) then {
  18. if(!life_istazed && !(_unit getVariable["restrained",false])) then {
  19. if(_isVehicle) then {
  20. if(_vehSPeed < 45) then
  21. {
  22. [_unit,_source] spawn life_fnc_tazed;
  23. };
  24. } else {
  25. [_unit,_source,false] spawn life_fnc_tazed;
  26. };
  27. };
  28. };
  29. };
  30.  
  31. //Temp fix for super tasers on cops.
  32. if(playerSide == west && side _source == west) then {
  33. _damage = false;
  34. };
  35. };
  36. };
  37. /*
  38. // VDM check
  39. _isVehicle = if(vehicle _source != _source) then {true} else {false};
  40. if(_isVehicle) then
  41. {
  42. _damage = false;
  43. // add speed test to see if should be added to wanted list for vehicle manslaughter.
  44. _vehSPeed = speed _source;
  45. if(_vehSpeed > 20) then
  46. {
  47. _curtime = diag_tickTime;
  48. _savedtime = player getVariable["vdmtimer",0];
  49. if((_curtime - _savedtime) > 2 ) then
  50. {
  51. player setVariable["vdmtimer",_curtime];
  52. if(side _source != west && _source != _unit) then
  53. {
  54. [[getPlayerUID _source,_source getVariable["realname",name _source],"187V"],"life_fnc_wantedAdd",false,false] spawn life_fnc_MP;
  55. [[0,format["%1 was just run over by %2. what a cunt act",_unit getVariable["realname",name _unit],_source getVariable["realname",name _source]]],"life_fnc_broadcast",true,false] spawn life_fnc_MP;
  56. };
  57. };
  58. };
  59. };
  60. */
  61. };
  62. [] call life_fnc_hudUpdate;
  63. _damage;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement