Jump to content
  • 0

Care Package Drop


LoadingSA

Question

I'm looking to add a script to our admin menu that would allow me to target a player and have a box drop on their location with a green smoke gernade attaced to it.

 

Here is what I have so far;

closeDialog 0;
titleText ["Click On The Map", "PLAIN DOWN"]; titleFadeOut 4;
carepkg=
 
    {
        onMapSingleClick hint format ["CarePackage Called In @\n%1" ,_pos];
        for "_i" from 0 to 0 do
        {
            _pos1 =  [(_pos select 0), (_pos select 1), 100];
					sleep 1;
					
             _box = "BAF_VehicleBox" createVehicle _pos1;
		    _smoke        = "SmokeshellGreen" createVehicle position _box;
		    _smoke attachto [_box, [0,0,0]]; 
		    _box attachTo [_chute, [0,0,0]];
			
_box addWeaponCargoGlobal ["AK_74", _itemn];
_box addMagazineCargoGlobal ["30Rnd_545x39_AK", _itemn * 2];

			sleep 1;
			_chute = createVehicle ["ParachuteC", [(_pos1) select 0,(_pos1) select 1], [], 0, "FLY"];
        
			[]spawn
			sleep 1;
			vehC = nearestObjects [vehicle player, ["BAF_VehicleBox"], 150];
			vehD = nearestObjects [vehicle player, ["ParachuteC"], 500];
			veh = vehC select 0;
			chute = vehD select 0;
			veh attachTo [chute, [0,0,1.5]];
			
		};
 
        onMapSingleClick "";
            openMap [false, false];
    };
 
openMap [true, false];
onMapSingleClick "[_pos select 0, _pos select 1, _pos select 2] call carepkg";
Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Maybe add:

openMap [true, false];

Just before/after the "Click on map" message.

 

And I think you can give the player a GPS with this:

 

if (isnil "fsdandposanpsdaon" ) then {fsdandposanpsdaon=0};

if (fsdandposanpsdaon==0) then
{
	player addweapon "ItemGPS";
	fsdandposanpsdaon=1;
};

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...