Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*** Created by 0verHeaT ***/
- private ["_Missing","_index","_SpawnPats","_helipadsnear","_nearestpad","_veh","_vehicle","_key","_vehname","_position","_checkkey","_sign"];
- _index = _this select 0;
- if (_index < 0) exitWith {cutText["\n\nNo Vehicle selected!","PLAIN DOWN"]};
- _veh = VehStoredList select _index;
- _vehicle = _veh select 0;
- _key = _veh select 1;
- _Missing = "";
- _vehname = getText(configFile >> "cfgVehicles" >> (_vehicle select 0) >> "displayName");
- if (_vehicle select 0 isKindOf 'Air') then {
- _SpawnPats = ["Sr_border"];
- _Missing = "Helipad";
- } else {
- _SpawnPats = ["PARACHUTE_TARGET"];
- _Missing = "Parking Lot";
- };
- _helipadsnear = nearestObjects [(getPosATL player),_SpawnPats,50];
- if ((count _helipadsnear) < 1) exitWith {cutText["\n\nYou need a "+_Missing+"! Right click on your Toolbox to build one!","PLAIN DOWN"]};
- _nearestpad = _helipadsnear select 0;
- _position = getPosATL _nearestpad;
- diag_log format ["[Schwede_Debug]: _nearestpad getPos: %1 | _nearestpad getPosATL: %2",((getPos _nearestpad)),(getPosATL _nearestpad)];
- _checkkey = [player,_key] call BIS_fnc_invAdd;
- if (!(_checkkey)) exitWith {cutText [(localize "str_epoch_player_107"),"PLAIN DOWN"]};
- _sign = createVehicle ["Sign_arrow_down_large_EP1",_position,[],0,"CAN_COLLIDE"];
- diag_log format ["[Schwede_Debug]: _sign getPos: %1 | _sign getPosATL: %2",((getPos _sign)),(getPosATL _sign)];
- _sign setPosATL _position;
- diag_log format ["[Schwede_Debug]: After setPos | _sign getPos: %1 | _sign getPosATL: %2",((getPos _sign)),(getPosATL _sign)];
- PVDZE_veh_spawn = [player,_vehicle,_sign,VirtualGarage];
- publicVariableServer "PVDZE_veh_spawn";
- cutText [format["\n\nYou have successfully spawned a %1, %2 has been added to your toolbelt.",_vehname,getText(configFile >> "CfgWeapons" >> _key >> "displayName")],"PLAIN DOWN"];
- sleep 2;
- call garage_getnearVeh;
- call garage_getstoredVeh;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement