Advertisement
Veticus

Arma 3* Repo Script [For Fun]

Sep 29th, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.58 KB | None | 0 0
  1. /*
  2. This script is a little tricky. Okay so first off i haven't tested it yet so if it doesn't work here's some reasons.
  3.  
  4. 1. I didn't stick the "_VehicleRepo" as a global variable. To change that just remove the "_" before the local variable.
  5.  
  6. 2. I hope you guys know how to use "addActions" because you won't be able to just use this without some form of key bind or addAction. Heres a link to BI Wiki for addActions if your really that new. "https://community.bistudio.com/wiki/addAction".
  7.  
  8. 3. And the last thing is "TRUCK_CLASSNAME" just stick a vehicle class name in their. They can be found here. "http://wiki.7thcavalry.us/wiki/ARMA_3_Vehicles" any vehicle will work. But make sure you edit "attachTo" and "setVectorUp" to match your vehicles size.
  9.  
  10. Enjoy guys,
  11. Veticus
  12. */
  13.  
  14. /*
  15. ---------------
  16. Author: Veticus;
  17. ---------------
  18. Script: Repo.sqf;
  19. ---------------
  20. */
  21.  
  22. DL_Repo_Main = {
  23.     private ["_Repotruck", "_TargetVehicle", "_VehicleRepo"];
  24.  
  25.     _Repotruck = nearestObject [(getPos player), "TRUCK_CLASSNAME"];
  26.     _TargetVehicle = cursorTarget;
  27.     _VehicleRepo = false;
  28.  
  29.     if (_VehicleRepo isEqualTo false) then {
  30.         player playMoveNow "AinvPknlMstpSnonWnonDnon_medic_1";
  31.         sleep 3.5;
  32.         _TargetVehicle attachTo [_Repotruck, [0, -6.8, -.55]];
  33.         _TargetVehicle setVectorUp [0, -0.2, 2];
  34.         _VehicleRepo = true;
  35.     } else {
  36.         player playMoveNow "AinvPknlMstpSnonWnonDnon_medic_1";
  37.         sleep 3.5;
  38.         detach _TargetVehicle;
  39.         _TargetVehicle setVectorUp [0, 0, 1];
  40.         _TargetVehicle setPosATL [getPosATL _TargetVehicle select 0, getPosATL _TargetVehicle select 1, 0];
  41.         _VehicleRepo = false;
  42.     };
  43. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement