Advertisement
t3quila

disposable.sqf

Feb 12th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.19 KB | None | 0 0
  1. //When player equips AT4s
  2. launchIS_AT4 = {_this removeMagazines "AT4_HEAT"; _this addMagazine ["AT4_HEAT",1]};
  3. launchIS_AT4HEDP = {_this removeMagazines "AT4_HEDP"; _this addMagazine ["AT4_HEDP",1]};
  4. launchIS_AT4HP = {_this removeMagazines "AT4_HP"; _this addMagazine ["AT4_HP",1]};
  5.  
  6. //When player puts AT4s
  7. launchIS_AT4_put = {if !(_this hasWeapon "launch_AT4_F") then {_this removeMagazines "AT4_HEAT"}};
  8. launchIS_AT4HEDP_put = {if !(_this hasWeapon "launch_AT4_HEDP_F") then {_this removeMagazines "AT4_HEDP"}};
  9. launchIS_AT4HP_put = {if !(_this hasWeapon "launch_AT4_HP_F") then {_this removeMagazines "AT4_HP"}};
  10.  
  11. //When player fires AT4s
  12. launchIS_AT4_fired = {if (_this hasWeapon "launch_AT4_F") then {_this addWeapon "launch_AT4_EMPTY_F"; _this removeMagazines "AT4_HEAT"}};
  13. launchIS_AT4HEDP_fired = {if (_this hasWeapon "launch_AT4_HEDP_F") then {_this addWeapon "launch_AT4_EMPTY_F"; _this removeMagazines "AT4_HEDP"}};
  14. launchIS_AT4HP_fired = {if (_this hasWeapon "launch_AT4_HP_F") then {_this addWeapon "launch_AT4_EMPTY_F"; _this removeMagazines "AT4_HP"}};
  15.  
  16. //Events
  17. AT4rockettake = player addEventHandler ["Take", {if (_this select 2 == "launch_AT4_F") then {(_this select 0) call launchIS_AT4}}];
  18. AT4HEDProckettake = player addEventHandler ["Take", {if (_this select 2 == "launch_AT4_HEDP_F") then {(_this select 0) call launchIS_AT4HEDP}}];
  19. AT4HProckettake = player addEventHandler ["Take", {if (_this select 2 == "launch_AT4_HP_F") then {(_this select 0) call launchIS_AT4HP}}];
  20.  
  21. AT4rocketput = player addEventHandler ["put", {(_this select 0) call launchIS_AT4_put}];
  22. AT4HEDProcketput = player addEventHandler ["put", {(_this select 0) call launchIS_AT4HEDP_put}];
  23. AT4HProcketput = player addEventHandler ["put", {(_this select 0) call launchIS_AT4HP_put}];
  24.  
  25. AT4rocketfired = player addEventHandler ["Fired", {if (_this select 1 == "launch_AT4_F") then {(_this select 0) call launchIS_AT4_fired}}];
  26. AT4HEDProcketfired = player addEventHandler ["Fired", {if (_this select 1 == "launch_AT4_HEDP_F") then {(_this select 0) call launchIS_AT4HEDP_fired}}];
  27. AT4HProcketfired = player addEventHandler ["Fired", {if (_this select 1 == "launch_AT4_HP_F") then {(_this select 0) call launchIS_AT4HP_fired}}];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement