player2_dz

Untitled

Nov 20th, 2013
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 2.12 KB | None | 0 0
  1. private["_hasCrowbar1","_item","_text","_body","_name","_hasCrowbar2","_knockoutMode"];
  2. _body =     _this select 3;
  3. _onLadder =     (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
  4.  
  5. if (_onLadder) exitWith {cutText ["You can't knock a player out while you're on a ladder; don't you know anything?" , "PLAIN DOWN"]};
  6.  
  7. //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  8. // Knockout Configuration \\\\\\\\\\\\\\\\\\\\\\\\\
  9. ///////////////////////////////////////////////////
  10. //==============================================//
  11. // Knockout Gear Requirements
  12. //--------------------------------------------//
  13. // 2: Weapon (Primary or Secondary) Required
  14. // 1: Crowbar Required
  15. // 0: Nothing Required
  16. //---------------------------------------//
  17. _knockoutMode = 0;
  18. //=====================================//
  19. // Credits
  20. //-----------------------------------//
  21. // Script by Player2
  22. // Thanks To:
  23. // DayZRedux, OpenDayZ
  24. // GhostZ, Gorsy
  25. //==============================//
  26. // www.ZombZ.net
  27. //============================//
  28.  
  29. _hasCrowbar1 = "MeleeCrowbar" in weapons player;
  30. _hasCrowbar2 = "ItemCrowbar" in items player;
  31. _hasPrimary = 0;
  32.  
  33.  if (PrimaryWeapon player != "") then {
  34.      _hasPrimary = 1;
  35.  } else {
  36.     _hasPrimary = 0;
  37.  };
  38.  
  39.  
  40. if (_knockoutMode == 0) then {
  41.     dayz_knockout = [_body,3.5];
  42.     publicVariable "dayz_knockout";
  43.     player playActionNow "PutDown";
  44.     sleep 1;
  45. };
  46.  
  47. if (_knockoutMode == 1) then {
  48.     if (_hasCrowbar1) then {
  49.         dayz_knockout = [_body,3.5];
  50.         publicVariable "dayz_knockout";
  51.         player playActionNow "PutDown";
  52.         sleep 1;
  53.     };
  54.  
  55.     if (_hasCrowbar2) then {
  56.         dayz_knockout = [_body,3.5];
  57.         publicVariable "dayz_knockout";
  58.         player playActionNow "PutDown";
  59.         sleep 1;
  60.     };
  61.  
  62.     if (!_hasCrowbar1 and !_hasCrowbar2) exitWith
  63.     {
  64.         cutText ["You need a Crowbar for this!" , "PLAIN DOWN"];
  65.     };
  66. };
  67.  
  68. if (_knockoutMode == 2) then {
  69.     if (_hasPrimary == 1) then {
  70.         dayz_knockout = [_body,3.5];
  71.         publicVariable "dayz_knockout";
  72.         player playActionNow "PutDown";
  73.         sleep 1;
  74.     } else {
  75.         cutText ["You need a Primary Weapon for this!" , "PLAIN DOWN"];
  76.     };
  77. };
Add Comment
Please, Sign In to add comment