Halvhjearne

downgrades.sqf

Feb 7th, 2014
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.50 KB | None | 0 0
  1. /*
  2.     Script by HALV
  3.     usage: parse varibles to the script, example below will Detatch suppressor from mk17 and will:
  4.     require toolbox and scrap metal, remove scrap, but leave toolbox
  5.     ["weapon2change",   "toolneeded",   "magazineadded"(""=nothing),    "tooladded"(""=nothing),    "outputweapon",         "Text"]
  6.     ["SCAR_H_CQC_CCO",  "ItemToolbox",  "PartGeneric",                  "",                         "SCAR_H_CQC_CCO_SD",    "Suppressor Detatched"]
  7. */
  8.  
  9. _weapon = _this select 0;
  10. _toolitem = _this select 1;
  11. _magitem = _this select 2;
  12. _tooloutput = _this select 3;
  13. _weapoutput = _this select 4;
  14. _string = _this select 5;
  15.  
  16. if(_toolitem !="" and !(player hasWeapon _toolitem))exitwith{
  17.     _txt1 = (gettext (configFile >> 'cfgweapons' >> _toolitem >> 'displayName'));
  18.     titleText [format["You need %1 for this",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
  19. };
  20.  
  21. if(_tooloutput !="" and (player hasWeapon _tooloutput))exitwith{
  22.     _txt1 = (gettext (configFile >> 'cfgweapons' >> _tooloutput >> 'displayName'));
  23.     titleText [format["You already have %1",_txt1], "PLAIN DOWN"]; titleFadeOut 5;
  24. };
  25.  
  26. closeDialog 0;
  27. player playActionNow "Medic";
  28. [player,"repair",0,false,10] call dayz_zombieSpeak;
  29. [player,10,true,(getPosATL player)] spawn player_alertZombies;
  30. sleep 2;
  31. player removeWeapon _weapon;
  32. sleep 2;
  33.  
  34. if(_magitem !="")then{
  35.     player addMagazine _magitem;
  36. };
  37.  
  38. if(_tooloutput !="")then{
  39.     player addWeapon _tooloutput;
  40. };
  41.  
  42. player addWeapon _weapoutput;
  43. sleep 1;
  44. player selectWeapon _weapoutput;
  45. titleText [format["%1",_string], "PLAIN DOWN"]; titleFadeOut 5;
Advertisement
Add Comment
Please, Sign In to add comment