TheGamingChief

Untitled

Apr 29th, 2016
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.64 KB | None | 0 0
  1. _art = _this select 0;
  2. _stunbullets = ["B_12Gauge_74Slug","8Rnd_B_Beneli_74Slug","F_40mm_White",1,"8Rnd_9x18_MakarovSD"];
  3. _pballbullets = ["cal68_fieldpaint","cal68_propaint1","cal68_propaint2","cal68_specpaint1","cal68_specpaint2","cal68_propaint"];
  4. if (_art == "fired") then
  5. {
  6. _ammo = _this select 1;
  7. _wep = _this select 2;
  8. _bullet = nearestObject [getpos player, _ammo];
  9. if(_wep == "Saiga12K")exitwith{};
  10. if (not(_ammo == (_stunbullets select 0))and(not(_ammo == (_stunbullets select 4)))) exitWith {};
  11. _vel = velocity _bullet;
  12. _pos = getpos _bullet;
  13. _teiler = (_stunbullets select 3);
  14. _bullet = (_stunbullets select 2) createVehicle _pos;
  15. _bullet setVelocity [(_vel select 0)/_teiler, (_vel select 1)/_teiler, (_vel select 2)/_teiler];
  16. };
  17.  
  18.  
  19. if (_art == "hit") then
  20. {
  21. _shooter = _this select 1;
  22. _selection = _this select 2;
  23. _damage = _this select 3;
  24. _plydmg = getDammage player;
  25. if(_damage < 0.01 or _selection == "")exitwith{};
  26. if(vehicle player != player)exitWith {format['if (player == %1) then {server globalChat "The person you tried to tase is in a vehicle!"',_shooter] call swag};
  27. if ((_plydmg) < 0.5) then {player setDammage 0};
  28. if(_selection == "Legs")exitwith{if(!canstand player)exitwith{};player setHit["Legs", 1];};
  29. if(_selection == "Hands")exitwith{if(handshit player == 1)exitwith{};player setHit["Hands", 1];};
  30. isstunned = true;
  31. StunActiveTime = StunActiveTime + StunTimePerHit;
  32. if(vehicle player != player)exitWith{};
  33. "dynamicBlur" ppEffectEnable true;
  34. "dynamicBlur" ppEffectAdjust [10];
  35. "dynamicBlur" ppEffectCommit 0;
  36. waitUntil {ppEffectCommitted "dynamicBlur"};
  37. "dynamicBlur" ppEffectEnable true;
  38. "dynamicBlur" ppEffectAdjust [0];
  39. "dynamicBlur" ppEffectCommit StunActiveTime;
  40. if(_selection != "Melee")then{(format["server globalchat ""%1 was tased by %2"";", name player, name _shooter]) call broadcast};
  41. if(!(call isprone)) then
  42. {
  43. (format ["%1 switchmove ""%2"";", player, "adthpercmstpslowwrfldnon_4"]) call broadcast;
  44. }
  45. else
  46. {
  47. (format ["%1 switchmove ""%2"";", player, "adthppnemstpsraswpstdnon_2"]) call broadcast;
  48. };
  49. _weapons = weapons player - nonlethalweapons;
  50. if (count _weapons > 0) then
  51. {
  52. {player removeWeapon _x} forEach _weapons;
  53. call compile format ['waffenhalter%1 = "weaponholder" createVehicle getpos player; waffenhalter%1 setVehicleInit "this setVehicleVarName ""waffenhalter%1""; waffenhalter%1 = this;"; processInitCommands;', rolenumber];
  54. sleep 0.5;
  55. (format ["{waffenhalter%2 ADDWEAPONCARGO [_x, 1];} forEach %3; waffenhalter%2 setpos %4; if (isServer) then {[waffenhalter%2, 300] spawn ISSE_DeleteVehicle;};", player, rolenumber, _weapons, (getpos player)]) call broadcast;
  56. sleep 0.5;
  57. };
  58. while{StunActiveTime > 0} do {if(StunActiveTime > MaxStunTime)then{StunActiveTime = MaxStunTime}; StunActiveTime = StunActiveTime - 1; sleep 1;};
  59. StunActiveTime = 0;
  60. if (animationstate player != "civillying01" and animationstate player != "civilsitting" and animationstate player != "actspercmstpsnonwrfldnon_interrogate02_forgoten" and animationstate player != "civilsitting02" and animationstate player != "civilsitting03") then
  61. {
  62. isstunned = false;
  63. player setVariable ["Cuffed",false,true];
  64. if(player call ISSE_IsVictim)then{(format ["%1 switchmove ""%2"";", player, "amovppnemstpsnonwnondnon"]) call broadcast};
  65. };
  66.  
  67. };
  68.  
  69. if (_art == "pball") then
  70. {
  71. player setdamage 0;
  72. };
Add Comment
Please, Sign In to add comment