Jump to content

MattL

Recommended Posts

Awesome mod, but one issue. Only me and my admins can spawn them. Normal players can not. I have the infistar antihack, so should I add any exceptions for this? 

hmm I tested this with infistar and had no issues....I would try turning off some of the options in the ahconfig and see what happens

Link to comment
Share on other sites

So the bomb package is a proximity detonation? There is no way to make it an interact-with-crate detonation? I love the bomb idea obviously, Im just afraid of my players sending bombs into enemy bases or missions to clear them.

 

Thoughts?

Link to comment
Share on other sites

So the bomb package is a proximity detonation? There is no way to make it an interact-with-crate detonation? I love the bomb idea obviously, Im just afraid of my players sending bombs into enemy bases or missions to clear them.

 

Thoughts?

It might be possible, but off the top of my head I don't know.

Link to comment
Share on other sites

Let me ask you Matt, will your click package script only work on chernarus? Is it possible that the reason it wont work on my lingor server is because its a different map?

No, the command onMapClick is universal to each individual map. I have no clue why it wont work for you on lingor my man

Link to comment
Share on other sites

Jordan, I run Vilayer and its super easy. 

 

File Manager>vilayercodecustom>missions>epoch.(yourinstancehere)>Scripts

 

I put all carepackage files in there. Make sure as the OP says to have the extra_rc.hpp code for the send carepackage point to the clickpackage.sqf.

Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...
  • 1 month later...

Link Is Dead XD

not sure if these are the most up to date, but they're the only files I can find for it at the moment.https://www.dropbox.com/s/hxk5izy6r8u2ilr/bombpackage.rar?dl=0   https://www.dropbox.com/s/o0r2884k31i49jp/mappackage.rar?dl=0      https://www.dropbox.com/s/o645no1wup9k0mv/carepackage.sqf?dl=0

Link to comment
Share on other sites

  • 1 month later...

matt if you get bored you should update this to work with coins

 

here you go !

 

Works with coins and countless other customizations ;)

private ["_cost","_positionM","_Marker","_LastUsedTime","_height","_downspeed","_wealth","_distance","_boxtype","_unit","_getPos","_position","_box","_chute","_smoke","_var","_textt","_tools","_items","_walls","_supplies","_weapon","_weapon2","_weapon3","_weapon4","_weapon5","_weapon6","_giveWep","_possibleMags","_mag","_whichBuild","_crateItems","_text"];

_cost = 20000;
_wealth = player getVariable["cashMoney",0];
_distance = 500;
_boxtype = "USVehicleBox_EP1";
_LastUsedTime = 900;
_height = 100;
_downspeed = -3;
_OnlineLimit = 20;
_unit = player;
_getPos = getPos _unit;
_position = [_getPos select 0, (_getPos select 1) - 5, _height];
_positionM = [_getPos select 0, _getPos select 1];

//item lists
_tools = ["ItemEtool","ItemKnife","ItemGPS","ItemFishingPole","ItemHatchet_DZE","ItemMatchbox_DZE","ItemCrowbar"];
_items = ["ItemSodaPepsi","FoodCanCorn","FoodNutmix","ItemSodaClays","FoodCanSardines","ItemKiloHemp"];
_walls = ["ItemWoodWallGarageDoor","ItemWoodWallWithDoorLg","ItemWoodWallLg","ItemWoodWallGarageDoor","ItemWoodFloor","metal_floor_kit"];
_supplies = ["CinderBlocks","MortarBucket","ItemTankTrap","PartWoodPlywood","PartWoodLumber","ItemPole","PartGlass"];


_giveWep = ["DMR","FHQ_ACR_WDL_TWS_SD","BAF_LRR_scoped","USSR_cheytacM200_sd","m107_DZ","BAF_L85A2_RIS_CWS"] call BIS_fnc_selectRandom;
_possibleMags = getArray (configfile >> "cfgWeapons" >> _giveWep >> "magazines");
_mag = _possibleMags select 0;

//select arrays to use
_crateItems = [_walls,_supplies,_items] call BIS_fnc_selectRandom;

_Time = time - lastpack;

if(_Time < _LastUsedTime) exitWith { // If cooldown is not done then exit script
    cutText [format["please wait %1 before calling in another Air Drop!",(round(_Time - _LastUsedTime))], "PLAIN DOWN"]; //display text at bottom center of screen when players cooldown is not done
};

if(!(canbuild) || (inSafeZone)) exitWith { cutText ["\n\nYou are in a Safezone and cannot perform that action!" , "PLAIN DOWN"]; };
if (dayz_combat == 1) exitwith { cutText ["\n\nYou are in combat and cannot perform that action!", "PLAIN DOWN"] };


if ((count playableUnits) < _OnlineLimit) exitWith  { cutText [format["Air Drop Failed. Less Than %1 Players online.",_OnlineLimit], "PLAIN DOWN"]; };
if(_wealth < _cost) exitWith { cutText [format["You need %1 coins to Call an AirDrop.",_cost], "PLAIN DOWN"]; };

player setVariable["cashMoney",(_wealth - _cost),true];

PVDZE_plr_Save = [player,(magazines player),true,true] ;
publicVariableServer "PVDZE_plr_Save";

deleteMarker "MarkerDrop";
_null  = createMarker ["MarkerDrop",_positionM];
"MarkerDrop"  setMarkerText "Air Drop";
"MarkerDrop"  setMarkerType "mil_objective";
"MarkerDrop"  setMarkerColor "ColorRed";

lastpack = time;

for "_x" from 1 to 100 do {
    if (_x >= 2) then {cutText [format ["AIR DROP ARRIVING IN %1", 101-_x], "PLAIN DOWN"];};
    uiSleep 1;
};

_chute = createVehicle ["ParachuteMediumEast", _position, [], 0, "FLY"];
_chutePos = getPos _chute;
_box = createVehicle [_boxtype, _chutePos, [], 0, "FLY"];
_box attachTo [_chute, [0,0,3]];
_box setVariable ["Mission",1,true];
_chute setVariable ["Mission",1,true];
_box setVariable ["ObjectID", ""];
_chute setVariable ["ObjectID", ""];
_smoke = "SmokeShellBlue" createVehicle (getPos _box);
_smoke attachTo [_box, [0,0,0]];
_var = floor((random 20) + 1);

//display text to alert user
_textt = format ["\nCarepackage is above you!",10];
titleText [_textt,"PLAIN DOWN"];

while {getPos _box select 2 > 4} do
{
 _chute SetVelocity [0,0,_downspeed];
 uiSleep 0.1;
};
detach _box;
while {getPos _box select 2 > 0} do {
_box setPos [getPos _box select 0, getPos _box select 1, (getPos _box select 2) - .25]
};
deleteVehicle _chute;
_posATL = getPosATL _box;
deleteVehicle _box;
_boxx = _boxtype createVehicle _posATL;
_boxx setVariable ["Mission",1,true];
_boxx setVariable ["ObjectID", ""];

clearweaponcargoglobal _boxx;
clearmagazinecargoglobal _boxx;

{_boxx addMagazineCargoGlobal [_x, _var];} forEach _crateItems;
{_boxx addWeaponCargoGlobal [_x, 1];} forEach _tools;
_boxx addMagazineCargoGlobal [_mag, _var];
_boxx addWeaponCargoGlobal [_giveWep, 1];
Link to comment
Share on other sites

 

here you go !

 

Works with coins and countless other customizations ;)

private ["_cost","_positionM","_Marker","_LastUsedTime","_height","_downspeed","_wealth","_distance","_boxtype","_unit","_getPos","_position","_box","_chute","_smoke","_var","_textt","_tools","_items","_walls","_supplies","_weapon","_weapon2","_weapon3","_weapon4","_weapon5","_weapon6","_giveWep","_possibleMags","_mag","_whichBuild","_crateItems","_text"];

_cost = 20000;
_wealth = player getVariable["cashMoney",0];
_distance = 500;
_boxtype = "USVehicleBox_EP1";
_LastUsedTime = 900;
_height = 100;
_downspeed = -3;
_OnlineLimit = 20;
_unit = player;
_getPos = getPos _unit;
_position = [_getPos select 0, (_getPos select 1) - 5, _height];
_positionM = [_getPos select 0, _getPos select 1];

//item lists
_tools = ["ItemEtool","ItemKnife","ItemGPS","ItemFishingPole","ItemHatchet_DZE","ItemMatchbox_DZE","ItemCrowbar"];
_items = ["ItemSodaPepsi","FoodCanCorn","FoodNutmix","ItemSodaClays","FoodCanSardines","ItemKiloHemp"];
_walls = ["ItemWoodWallGarageDoor","ItemWoodWallWithDoorLg","ItemWoodWallLg","ItemWoodWallGarageDoor","ItemWoodFloor","metal_floor_kit"];
_supplies = ["CinderBlocks","MortarBucket","ItemTankTrap","PartWoodPlywood","PartWoodLumber","ItemPole","PartGlass"];


_giveWep = ["DMR","FHQ_ACR_WDL_TWS_SD","BAF_LRR_scoped","USSR_cheytacM200_sd","m107_DZ","BAF_L85A2_RIS_CWS"] call BIS_fnc_selectRandom;
_possibleMags = getArray (configfile >> "cfgWeapons" >> _giveWep >> "magazines");
_mag = _possibleMags select 0;

//select arrays to use
_crateItems = [_walls,_supplies,_items] call BIS_fnc_selectRandom;

_Time = time - lastpack;

if(_Time < _LastUsedTime) exitWith { // If cooldown is not done then exit script
    cutText [format["please wait %1 before calling in another Air Drop!",(round(_Time - _LastUsedTime))], "PLAIN DOWN"]; //display text at bottom center of screen when players cooldown is not done
};

if(!(canbuild) || (inSafeZone)) exitWith { cutText ["\n\nYou are in a Safezone and cannot perform that action!" , "PLAIN DOWN"]; };
if (dayz_combat == 1) exitwith { cutText ["\n\nYou are in combat and cannot perform that action!", "PLAIN DOWN"] };


if ((count playableUnits) < _OnlineLimit) exitWith  { cutText [format["Air Drop Failed. Less Than %1 Players online.",_OnlineLimit], "PLAIN DOWN"]; };
if(_wealth < _cost) exitWith { cutText [format["You need %1 coins to Call an AirDrop.",_cost], "PLAIN DOWN"]; };

player setVariable["cashMoney",(_wealth - _cost),true];

PVDZE_plr_Save = [player,(magazines player),true,true] ;
publicVariableServer "PVDZE_plr_Save";

deleteMarker "MarkerDrop";
_null  = createMarker ["MarkerDrop",_positionM];
"MarkerDrop"  setMarkerText "Air Drop";
"MarkerDrop"  setMarkerType "mil_objective";
"MarkerDrop"  setMarkerColor "ColorRed";

lastpack = time;

for "_x" from 1 to 100 do {
    if (_x >= 2) then {cutText [format ["AIR DROP ARRIVING IN %1", 101-_x], "PLAIN DOWN"];};
    uiSleep 1;
};

_chute = createVehicle ["ParachuteMediumEast", _position, [], 0, "FLY"];
_chutePos = getPos _chute;
_box = createVehicle [_boxtype, _chutePos, [], 0, "FLY"];
_box attachTo [_chute, [0,0,3]];
_box setVariable ["Mission",1,true];
_chute setVariable ["Mission",1,true];
_box setVariable ["ObjectID", ""];
_chute setVariable ["ObjectID", ""];
_smoke = "SmokeShellBlue" createVehicle (getPos _box);
_smoke attachTo [_box, [0,0,0]];
_var = floor((random 20) + 1);

//display text to alert user
_textt = format ["\nCarepackage is above you!",10];
titleText [_textt,"PLAIN DOWN"];

while {getPos _box select 2 > 4} do
{
 _chute SetVelocity [0,0,_downspeed];
 uiSleep 0.1;
};
detach _box;
while {getPos _box select 2 > 0} do {
_box setPos [getPos _box select 0, getPos _box select 1, (getPos _box select 2) - .25]
};
deleteVehicle _chute;
_posATL = getPosATL _box;
deleteVehicle _box;
_boxx = _boxtype createVehicle _posATL;
_boxx setVariable ["Mission",1,true];
_boxx setVariable ["ObjectID", ""];

clearweaponcargoglobal _boxx;
clearmagazinecargoglobal _boxx;

{_boxx addMagazineCargoGlobal [_x, _var];} forEach _crateItems;
{_boxx addWeaponCargoGlobal [_x, 1];} forEach _tools;
_boxx addMagazineCargoGlobal [_mag, _var];
_boxx addWeaponCargoGlobal [_giveWep, 1];

nice.. I can add this as a right click option correct?

Link to comment
Share on other sites

so yea I'd like to add this as a scroll wheel option when looking at say, a notebook. But this script doesn't seem designed for that.. I'd need to make variables to add the fn_selfactions and somehow add them to the script?

_isPC = typeOf cursorTarget in ["Laptop_EP1"];

if((isPC and (player distance cursorTarget <= 2)) and _canDo) then {
if (s_player_deploycarepackage < 0) then {
        s_player_deploycarepackage = player addaction[("<t color=""#FFFF00"">" + ("Deploy Carepackage") +"</t>"),"custom\carepackages.sqf","",5,false,true,"", ""];
    };
} else {
    player removeAction s_player_deploycarepackage;
    s_player_deploycarepackage= -1;
};   

but how exactly would I add that to the script? Something like

private ["_cost","_positionM","_Marker","_LastUsedTime","_height","_downspeed","_wealth","_distance","_boxtype","_unit","_getPos","_position","_box","_chute","_smoke","_var","_textt","_tools","_items","_walls","_supplies","_weapon","_weapon2","_weapon3","_weapon4","_weapon5","_weapon6","_giveWep","_possibleMags","_mag","_whichBuild","_crateItems","_text","_isPC"];

_cost = 2000;
_wealth = player getVariable["cashMoney",0];
_distance = 500;
_boxtype = "USVehicleBox_EP1";
_LastUsedTime = 900;
_height = 100;
_downspeed = -3;
_OnlineLimit = 1;
_unit = player;
_getPos = getPos _unit;
_position = [_getPos select 0, (_getPos select 1) - 5, _height];
_positionM = [_getPos select 0, _getPos select 1];
_isPC = "Laptop_EP1";

 

????

Link to comment
Share on other sites

_isAirdrop = cursorTarget isKindOf "Notebook";
if ((speed player <= 1) && _isAirdrop && _canDo && (player distance cursorTarget < 4)) then {
    if (s_player_Airdrop < 0) then {
        s_player_Airdrop = player addAction [("<t color=""#0096ff"">" + ("Deploy Carepackage") +"</t>"),"custom\carepackages.sqf",cursorTarget, 0, false, true, "",""];
    };
} else {
    player removeAction s_player_Airdrop;
    s_player_Airdrop = -1;
};
Link to comment
Share on other sites

_isAirdrop = cursorTarget isKindOf "Notebook";
if ((speed player <= 1) && _isAirdrop && _canDo && (player distance cursorTarget < 4)) then {
    if (s_player_Airdrop < 0) then {
        s_player_Airdrop = player addAction [("<t color=""#0096ff"">" + ("Deploy Carepackage") +"</t>"),"custom\carepackages.sqf",cursorTarget, 0, false, true, "",""];
    };
} else {
    player removeAction s_player_Airdrop;
    s_player_Airdrop = -1;
};

I dont need to modify the carepackages.sqf at all?

 

What qualifies as a notebook? I have static laptops around the map which you can't pick up. I was trying to get a cursor option when you look at one, similar to a banker except your only option is to call in this carepackage.

 

Im definitely missing something here because i get no scroll wheel option when looking at the laptop_EP1

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
×
×
  • Create New...