initPlayerLocal.sqf 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. (_this select 0) addEventHandler ["InventoryOpened", {
  2. namUnit=(_this select 0);
  3. _namBackPack=typeof(unitBackpack namUnit);
  4. _namIsConfigured=namUnit getVariable ["namJumpPackConfig", false];
  5. if(!_namIsConfigured && {_namBackPack isEqualTo "SWOP_B_CloneDV"}) then
  6. {
  7. [namUnit] execVM "scripts\zeus3denScripts\playerBased\airborne\HJS Protocal\jumpAssinger.sqf";
  8. [namUnit] execVM "scripts\zeus3denScripts\playerBased\airborne\HJS Protocal\jumpShort.sqf";
  9. [namUnit] execVM "scripts\zeus3denScripts\playerBased\airborne\HJS Protocal\jumpLong.sqf";
  10. [namUnit] execVM "scripts\zeus3denScripts\playerBased\airborne\HJS Protocal\jumpVertical.sqf";
  11. [namUnit] execVM "scripts\zeus3denScripts\playerBased\airborne\HJS Protocal\jumpHandler.sqf";
  12. namUnit setVariable ["namJumpPackConfig", true, true];
  13. hint parseText format["<t color='#40e0d0'>Namenai's Horseborne JumpScript Protocal has been initiated.(HJS Protocal) at time %1 </t> <img image='scripts\zeus3denScripts\playerBased\airborne\HJS Protocal\horseborneImage.jpg' <img size='10' />",time];
  14. };
  15. }];
  16. (_this select 0) addMPEventHandler ["MPRespawn", {
  17. namUnit=(_this select 0);
  18. namUnit setVariable ["namJumpPackConfig", false, true];
  19. }];
  20. //delets body on death
  21. Player addEventHandler ["GetInMan", {
  22. _x addMPEventHandler ["MPkilled",{deleteVehicle (_this select 0);}];
  23. }];
  24. Player addEventHandler ["GetOutMan", {
  25. _x removeAllMPEventHandlers "MPKILLED";
  26. }];