Jump to content

MattL

Recommended Posts

Looks like infiSTAR is blocking the map markers and so the script never executes. I guess you have to find a way to get the markers to execute server side. Schwede is helping me out in the above posted thread if anyone's interested. When he's finished he might release the markers as a separate mod, so that you can add map markers to any script you add through it.

Link to comment
Share on other sites

  • 3 weeks later...

Honestly, you can remove the Part thats blocking the mapmarkers in the ah.SQF

the hacks that are up to date are using the remote execs to do it and older hacks aren't able to do it cuz they are detected.. it's kinda useless to enable it at this point.. it just causes unnecessary servertraffic because of the workarounds..

Link to comment
Share on other sites

  • 5 months later...
  • 3 weeks later...
  • 1 year later...
On 6/23/2014 at 0:11 PM, MattL said:

I'll be attempting a way to make this less... spammable. 

 

remove anything related to briefcases as the cost so make it look like 


// Carepackage script by Matt L
//Special thanks to Infinistar for helping with mag selection for the weapons

private ["_cost","_hasBriefs","_display","_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 = 2;
_hasBriefs = {"ItemBriefCase100oz" == _x} count (magazines player);

if (_hasBriefs >= _cost) then {

for "_i" from 0 to _cost - 1 do {
player removeMagazine "ItemBriefcase100oz";
};

**/
disableSerialization;
_display = findDisplay 24;
(_display) closeDisplay 0;

_distance = 500;
_boxtype = "USVehicleBox_EP1";
_unit = player;
_getPos = getPos _unit;
_position = [_getPos select 0, _getPos select 1, 25];
_box = _boxtype createVehicle _position;
_box setVariable ["Mission",1,true];
_box setVariable ["permaLoot",1,true];
_box setVariable ["ObjectID",""];
_chute = createVehicle ["ParachuteMediumEast", getPos _box, [], 0, "FLY"];
_box attachTo [_chute, [0,0,3]];
_smoke = "SmokeShellBlue" createVehicle (getPos _box);
_smoke attachTo [_box, [0,0,0]];
_var = floor((random 2) + 1);

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

//define items

_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 Z","CinderWallDoorSmall_DZ"];
_supplies = ["CinderBlocks","MortarBucket","ItemTankTrap","PartWoodPlywood","PartWoodLumber","ItemPole","PartGlass"];

//weapon lists
_weapon = "DMR";
_weapon2 = "AK_47_M";
_weapon3 = "BAF_L85A2_RIS_Holo";
_weapon4 = "RPK_74";
_weapon5 = "M14_EP1";
_weapon6 = "M249_DZ";
_giveWep = [_weapon,_weapon2,_weapon3,_weapon4,_weapon5,_weapon6] 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;
uisleep 1;

clearweaponcargoglobal _box;
clearmagazinecargoglobal _box;

uisleep 1;

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

uisleep 1;

waitUntil {(player distance _box) > _distance};
deleteVehicle _box;
deleteVehicle _chute;

/**
} else {
_text = format ["\nYou need two full briefs to call a carepackage!",10];
titleText [_text,"PLAIN DOWN"];
};
**/

Then in your init.sqf call it like 


pack = compile preprocessFileLineNumbers "scripts\carepackage.sqf";
waitUntil {!isNil ("PVDZE_plr_LoginRecord")};
if (dayzPlayerLogin2 select 2) then
{
    player spawn pack;
};

at the bottom

I'm trying to make this work with Epoch 1.0.6

I want to make this only available to new players "Spawn a starter kit"

I have a single (spawn on player) carepackage working as a right click option on the toolbox with no cost - but It is unlimited use. 

How can I make this a one time per player option?

Any help would be appreciated - 

 

Link to comment
Share on other sites

1 hour ago, Bricktop said:

I'm trying to make this work with Epoch 1.0.6

I want to make this only available to new players "Spawn a starter kit"

I have a single (spawn on player) carepackage working as a right click option on the toolbox with no cost - but It is unlimited use. 

How can I make this a one time per player option?

Any help would be appreciated - 

 

see this topic

Spoiler

 

 

Link to comment
Share on other sites

How to add a time restriction to this so players can only do once per 4 hours?

-----------------------------------------------------------

// Carepackage script by Matt L
//Special thanks to Infinistar for helping with mag selection for the weapons

private ["_cost","_hasBriefs","_display","_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 = 2;
_hasBriefs = {"ItemBriefCase100oz" == _x} count (magazines player);

if (_hasBriefs >= _cost) then {

for "_i" from 0 to _cost - 1 do {
player removeMagazine "ItemBriefcase100oz";
};

**/
disableSerialization;
_display = findDisplay 24;
(_display) closeDisplay 0;

_distance = 500;
_boxtype = "USVehicleBox_EP1";
_unit = player;
_getPos = getPos _unit;
_position = [_getPos select 0, _getPos select 1, 25];
_box = _boxtype createVehicle _position;
_box setVariable ["Mission",1,true];
_box setVariable ["permaLoot",1,true];
_box setVariable ["ObjectID",""];
_chute = createVehicle ["ParachuteMediumEast", getPos _box, [], 0, "FLY"];
_box attachTo [_chute, [0,0,3]];
_smoke = "SmokeShellBlue" createVehicle (getPos _box);
_smoke attachTo [_box, [0,0,0]];
_var = floor((random 2) + 1);

//display text to alert user
_textt = format ["\nThe Bait Crate is in the air!",10];
titleText [_textt,"PLAIN DOWN"];

//define items

_tools = [];
_items = [];
_walls = [];
_supplies = [];

//weapon lists
_weapon = "";
_weapon2 = "";
_weapon3 = "";
_weapon4 = "";
_weapon5 = "";
_weapon6 = "";
_giveWep = [_weapon,_weapon2,_weapon3,_weapon4,_weapon5,_weapon6] 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;
uisleep 1;

clearweaponcargoglobal _box;
clearmagazinecargoglobal _box;

uisleep 1;

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

uisleep 1;

waitUntil {(player distance _box) > _distance};
deleteVehicle _box;
deleteVehicle _chute;

/**
} else {
_text = format ["\nYou need two full briefs to call a carepackage!",10];
titleText [_text,"PLAIN DOWN"];
};
**/

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...