Advertisement
Guest User

Untitled

a guest
May 21st, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. /*** Created by 0verHeaT ***/
  2. private ["_Missing","_index","_SpawnPats","_helipadsnear","_nearestpad","_veh","_vehicle","_key","_vehname","_position","_checkkey","_sign"];
  3. _index = _this select 0;
  4. if (_index < 0) exitWith {cutText["\n\nNo Vehicle selected!","PLAIN DOWN"]};
  5.  
  6. _veh = VehStoredList select _index;
  7. _vehicle = _veh select 0;
  8. _key = _veh select 1;
  9. _Missing = "";
  10. _vehname = getText(configFile >> "cfgVehicles" >> (_vehicle select 0) >> "displayName");
  11.  
  12. if (_vehicle select 0 isKindOf 'Air') then {
  13. _SpawnPats = ["Sr_border"];
  14. _Missing = "Helipad";
  15. } else {
  16. _SpawnPats = ["PARACHUTE_TARGET"];
  17. _Missing = "Parking Lot";
  18. };
  19.  
  20. _helipadsnear = nearestObjects [(getPosATL player),_SpawnPats,50];
  21. if ((count _helipadsnear) < 1) exitWith {cutText["\n\nYou need a "+_Missing+"! Right click on your Toolbox to build one!","PLAIN DOWN"]};
  22.  
  23. _nearestpad = _helipadsnear select 0;
  24. _position = getPosATL _nearestpad;
  25. diag_log format ["[Schwede_Debug]: _nearestpad getPos: %1 | _nearestpad getPosATL: %2",((getPos _nearestpad)),(getPosATL _nearestpad)];
  26. _checkkey = [player,_key] call BIS_fnc_invAdd;
  27. if (!(_checkkey)) exitWith {cutText [(localize "str_epoch_player_107"),"PLAIN DOWN"]};
  28.  
  29. _sign = createVehicle ["Sign_arrow_down_large_EP1",_position,[],0,"CAN_COLLIDE"];
  30. diag_log format ["[Schwede_Debug]: _sign getPos: %1 | _sign getPosATL: %2",((getPos _sign)),(getPosATL _sign)];
  31. _sign setPosATL _position;
  32. diag_log format ["[Schwede_Debug]: After setPos | _sign getPos: %1 | _sign getPosATL: %2",((getPos _sign)),(getPosATL _sign)];
  33.  
  34. PVDZE_veh_spawn = [player,_vehicle,_sign,VirtualGarage];
  35. publicVariableServer "PVDZE_veh_spawn";
  36.  
  37. cutText [format["\n\nYou have successfully spawned a %1, %2 has been added to your toolbelt.",_vehname,getText(configFile >> "CfgWeapons" >> _key >> "displayName")],"PLAIN DOWN"];
  38.  
  39. sleep 2;
  40. call garage_getnearVeh;
  41. call garage_getstoredVeh;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement