Guest User

Untitled

a guest
Jan 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.05 KB | None | 0 0
  1. //bite motherfuckers
  2.  
  3. [] spawn {
  4.     waitUntil { !isNull (findDisplay 46) };
  5.     _bitingbitches = (finddisplay 46) displayaddeventhandler ["MouseButtonDown", "
  6.  
  7.     private ['_nearestunits', '_nearestunitofside', '_cooldown', '_rand'];
  8.  
  9.     if (((_this select 1) == 0) ) then {
  10.  
  11.     _nearestunits = nearestObjects [player,['Man'],2];
  12.  
  13.     _nearestunitofside = [];
  14.  
  15.     if(west countSide _nearestunits > 0) then {
  16.         {
  17.         _unit = _x;
  18.         if(side _unit == west) then{_nearestunitofside = _nearestunitofside + [_unit]};
  19.         } foreach _nearestunits;
  20.  
  21.  
  22. _lastbite = ((_nearestunitofside select 0) getVariable ['canBeBit', -999]);
  23.  
  24.         if(time - _lastbite > 4) then {
  25.         (_nearestunitofside select 0) setVariable ['canBeBit', time, true];
  26.         [(_nearestunitofside select 0), 'bitbyDog'] call CBA_fnc_globalSay3d;
  27.         [player, 'dogbark1'] call CBA_fnc_globalSay3d;
  28.         (_nearestunitofside select 0) setdammage ((getDammage (_nearestunitofside select 0)) + 0.35);
  29.  
  30.                 [-1, {
  31.                 private ['_objPosition', '_objposition', '_obj', '_pos', '_velocity', '_color', '_alpha', '_ps11'];
  32.             _objPosition = getPos (_this select 0);
  33. _objposition = (_objposition select 2);
  34.  
  35.             _obj = vehicle (_this select 0);
  36.             _pos = position _obj;
  37.             _velocity = [0,0,.1];
  38.             _color = [.5, 0, 0];
  39.             _alpha = .7;
  40.             _ps11 = '#particlesource' createVehicleLocal _pos;  
  41.                         _ps11 attachTo [(_this select 0)];
  42.  
  43.             _ps11 setParticleParams [['\Ca\Data\ParticleEffects\Universal\Universal', 16, 7, 48], '', 'Billboard', 1, 6, [0, 0, 0.5], [0, 0, 0], 0, 10, 1, 0, [1,5],[[1,0,0,0.8],[1,0,0,0]], [0.5,0.5,0], 1, 1, '', '', center];
  44.             _ps11 setParticleRandom [.1, [0, 0, 0], [1, 2, 2], 1, 0, [0, 0, .2, 1.1], 0, 0];
  45.             _ps11 setParticleCircle [0, [0, 0, 0]];
  46.             _ps11 setDropInterval 0.01;
  47.             sleep .4;
  48. deletevehicle _ps11;
  49.        
  50.     }, [(_nearestunitofside select 0)]] call CBA_fnc_globalExecute;
  51.    
  52. _rand = random 1;
  53. if (_rand > 0.25) then {
  54.         [-2, {
  55.         (_this select 0) switchMove 'ActsPercMrunSlowWrflDf_TumbleOver';
  56.     }, [(_nearestunitofside select 0)]] call CBA_fnc_globalExecute;
  57.         };
  58.         };
  59.     };
  60.     };
  61. "];
  62. };
Add Comment
Please, Sign In to add comment