Ambross

Delenda loadouts onplayerRespawn.sqf

Oct 18th, 2019
186
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _playersWeapons = weapons player;
  2. _playerRole = roleDescription player;
  3. _playerBackpackItems = backpackItems player;
  4. _itemsplayer = items player;
  5.  
  6. if ("H_MilCap_mcamo" in _itemsplayer) then {_playerRole = "AirborneSquadLeader";};
  7. if ("H_Booniehat_mcamo" in _itemsplayer) then {_playerRole = "AirborneRepairSpecialist";};
  8. if ("launch_B_Titan_F" in _playersWeapons) then {_playerRole = "AirborneAARifleman";};
  9. if ("arifle_MXM_F" in _playersWeapons) then {_playerRole = "AirborneMarksman";};
  10. if ("DemoCharge_Remote_Mag" in _playerBackpackItems) then {_playerRole = "AirborneExplosiveSpecialist";};
  11. if ("Medikit" in _playerBackpackItems) then {_playerRole = "Medic";};
  12. if ("launch_MRAWS_sand_F" in _playersWeapons) then {_playerRole = "LAT2";};
  13. if ("arifle_MX_SW_F" in _playersWeapons) then {_playerRole = "AR";};
  14. if ("arifle_MX_GL_F" in _playersWeapons) then {_playerRole = "GL";};
  15.  
  16. player sideChat format ["Role: %1",_playerRole];
  17.  
  18. switch (_playerRole) do {
  19. case "AirborneSquadLeader":
  20. {
  21. player setUnitTrait ["medic",false,false];
  22. player setUnitTrait ["engineer",false,false];
  23. player setUnitTrait ["explosiveSpecialist",false,false];
  24. player setUnitTrait ["UAVHacker",true,false];
  25. };
  26.  
  27. case "AirborneRepairSpecialist":
  28. {
  29. player setUnitTrait ["medic",false,false];
  30. player setUnitTrait ["engineer",true,false];
  31. player setUnitTrait ["explosiveSpecialist",false,false];
  32. player setUnitTrait ["UAVHacker",true,false];
  33. };
  34.  
  35. case "AirborneAARifleman":
  36. {
  37. player setUnitTrait ["medic",false,false];
  38. player setUnitTrait ["engineer",false,false];
  39. player setUnitTrait ["explosiveSpecialist",false,false];
  40. player setUnitTrait ["UAVHacker",true,false];
  41. };
  42.  
  43. case "AirborneMarksman":
  44. {
  45. player setUnitTrait ["medic",false,false];
  46. player setUnitTrait ["engineer",false,false];
  47. player setUnitTrait ["explosiveSpecialist",false,false];
  48. player setUnitTrait ["UAVHacker",true,false];
  49. };
  50.  
  51. case "AirborneExplosiveSpecialist":
  52. {
  53. player setUnitTrait ["medic",false,false];
  54. player setUnitTrait ["engineer",false,false];
  55. player setUnitTrait ["explosiveSpecialist",true,false];
  56. player setUnitTrait ["UAVHacker",true,false];
  57. };
  58.  
  59. case "BasicRifle":
  60. {
  61. player setUnitTrait ["medic",false,false];
  62. player setUnitTrait ["engineer",false,false];
  63. player setUnitTrait ["explosiveSpecialist",false,false];
  64. player setUnitTrait ["UAVHacker",true,false];
  65. };
  66.  
  67. case "medic":
  68. {
  69. player setUnitTrait ["medic",true,false];
  70. player setUnitTrait ["engineer",false,false];
  71. player setUnitTrait ["explosiveSpecialist",false,false];
  72. player setUnitTrait ["UAVHacker",true,false];
  73. };
  74.  
  75. case "LAT2":
  76. {
  77. player setUnitTrait ["medic",false,false];
  78. player setUnitTrait ["engineer",false,false];
  79. player setUnitTrait ["explosiveSpecialist",false,false];
  80. player setUnitTrait ["UAVHacker",true,false];
  81. };
  82.  
  83.  
  84. case "AR":
  85. {
  86. player setUnitTrait ["medic",false,false];
  87. player setUnitTrait ["engineer",false,false];
  88. player setUnitTrait ["explosiveSpecialist",false,false];
  89. player setUnitTrait ["UAVHacker",true,false];
  90. };
  91.  
  92.  
  93. case "GL":
  94. {
  95. player setUnitTrait ["medic",false,false];
  96. player setUnitTrait ["engineer",false,false];
  97. player setUnitTrait ["explosiveSpecialist",false,false];
  98. player setUnitTrait ["UAVHacker",true,false];
  99. };
  100.  
  101. };
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×