Jump to content

Custom Loadouts for Admins and Regular Players


MisterT

Recommended Posts

Has anyone got to the bottom of working out why new player are not getting this until they re-spawn ?

 

It looks like the "player addEventHandler ["Respawn", {" does not fire or start for new players and I cannot find what controls that. Was gona try a random "Spawn" rather then respawn but just wondering if anyone else has it figured yet ?

 

Thanks

Link to comment
Share on other sites

This is quite normal, "addEventHandler" is repeated each time player dies.

Means first time you die, you get one loadout, second time you get 2, etc...

 

You have to add a "removeEventHandler" at the end of the loop to prevent this.

Link to comment
Share on other sites

I couldn't get this to work... am I missing something?

I added Donators.sqf to my Root (where my infistar Run.sqf and all the folders like my MP mission files are and @epochhive is..)

My donators.sqf contains the following
Donators_list = ["765xxxxxxxxxxxxx","765xxxxxxxxxxxxx","765xxxxxxxxxxxxx"];

My Mission.sqm looks like this:

class Groups
{
items = 100;
class Item0
{
side = "CIV";
class Vehicles
{
items = 1;
class Item0
{
position[] = {23598.076,3.19,17997.086};
azimut = 136.241;
special = "NONE";
id = 0;
side = "CIV";
vehicle = "VirtualMan_EPOCH";
player = "PLAY CDG";
leader = 1;
skill = 0.6;
init="if (isServer) then {execVM '\Donators.sqf';};"; 
};
};
};

private ["_player"];
if (!isServer) then {
waitUntil {!isNull player};
waitUntil {player == player};

while {true} do {
_player = player;
player addEventHandler ["Respawn", {
if (getPlayerUID player in Donations_list) then {
_PistolANDmag = [["hgun_Rook40_snds_F","16Rnd_9x21_Mag"],["hgun_P07_snds_F","16Rnd_9x21_Mag"]] call BIS_fnc_selectRandom;
_pistol = _PistolANDmag select 0;
_mag = _PistolANDmag select 1;
_item = "FAK";
_food = ["CookedSheep_EPOCH","CookedGoat_EPOCH","CookedChicken_EPOCH","CookedRabbit_EPOCH","ItemTunaCooked","ItemSeaBassCooked","ItemTroutCooked","FoodSnooter","FoodMeeps"] call BIS_fnc_selectRandom;
_drink = ["ItemSodaRbull","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","FoodWalkNSons","WhiskeyNoodle"] call BIS_fnc_selectRandom;
_uniform = "U_O_GhillieSuit";
_vest = ["V_F41_EPOCH","V_41_EPOCH"] call BIS_fnc_selectRandom;
hint format [" %1 \n %2 \n %3 \n %4 \n %5 \n %6 \n %7",_pistol,_mag,_item,_food,_drink,_uniform,_vest];
player addVest _vest;
player addWeapon _pistol;
player addMagazine _mag;
player addMagazine _item;
player addMagazine _food;
player addMagazine _drink;
player addMagazine "16Rnd_9x21_Mag";
player addMagazine "16Rnd_9x21_Mag";
player addWeapon "EpochRadio0";
player addWeapon "NVGoggles";
player addWeapon "Rangefinder";
player addWeapon "ItemWatch";
player addWeapon "ItemCompass";
player addWeapon "ItemGPS";
player addBackpack "B_AssaultPack_cbr";
player addItemToBackpack "Hatchet";
player addItemToBackpack "hatchet_swing";
player forceAddUniform _uniform;
} else {
_PistolANDmag = [["hgun_Rook40_F","16Rnd_9x21_Mag"],["hgun_P07_F","16Rnd_9x21_Mag"]] call BIS_fnc_selectRandom;
_pistol = _PistolANDmag select 0;
_mag = _PistolANDmag select 1;
_item = "";
_food = "";
_drink = "";
_uniform = ["U_C_Driver_4","U_C_Driver_3","U_C_Driver_2","U_C_Driver_1","U_C_Scientist","U_C_Journalist","U_C_WorkerCoveralls","U_C_Poor_1","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_tricolour","U_C_Poloshirt_burgundy","U_C_Poloshirt_blue","U_C_Poloshirt_stripped"] call BIS_fnc_selectRandom;
_vest = ["V_F41_EPOCH","V_41_EPOCH"] call BIS_fnc_selectRandom;
hint format [" %1 \n %2 \n %3 \n %4 \n %5 \n %6 \n %7",_pistol,_mag,_item,_food,_drink,_uniform,_vest];
player addVest _vest;
player addWeapon _pistol;
player addMagazine _mag;
player addMagazine _item;
player addMagazine _food;
player addMagazine _drink;
player addWeapon "EpochRadio0"; 
player addWeapon "ItemWatch";
player addWeapon "ItemCompass";
player addBackpack "B_parachute";
_modelMale = (typeOF player == "Epoch_Male_F");
_modelFemale = (typeOF player == "Epoch_Female_F");

if (_modelFemale) then {
player forceAddUniform "U_BasicBodyFemale";
};
if (_modelMale) then {
player forceAddUniform _uniform;
}; 
};
}];waitUntil {_player != player};
};
};

Link to comment
Share on other sites

You add this part to your init.sqf

private ["_player"];
if (!isServer) then {
waitUntil {!isNull player};
waitUntil {player == player};

while {true} do {
_player = player;
player addEventHandler ["Respawn", {
if (getPlayerUID player in Donations_list) then {
_PistolANDmag = [["hgun_Rook40_snds_F","16Rnd_9x21_Mag"],["hgun_P07_snds_F","16Rnd_9x21_Mag"]] call BIS_fnc_selectRandom;
_pistol = _PistolANDmag select 0;
_mag = _PistolANDmag select 1;
_item = "FAK";
_food = ["CookedSheep_EPOCH","CookedGoat_EPOCH","CookedChicken_EPOCH","CookedRabbit_EPOCH","ItemTunaCooked","ItemSeaBassCooked","ItemTroutCooked","FoodSnooter","FoodMeeps"] call BIS_fnc_selectRandom;
_drink = ["ItemSodaRbull","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","FoodWalkNSons","WhiskeyNoodle"] call BIS_fnc_selectRandom;
_uniform = "U_O_GhillieSuit";
_vest = ["V_F41_EPOCH","V_41_EPOCH"] call BIS_fnc_selectRandom;
hint format [" %1 \n %2 \n %3 \n %4 \n %5 \n %6 \n %7",_pistol,_mag,_item,_food,_drink,_uniform,_vest];
player addVest _vest;
player addWeapon _pistol;
player addMagazine _mag;
player addMagazine _item;
player addMagazine _food;
player addMagazine _drink;
player addMagazine "16Rnd_9x21_Mag";
player addMagazine "16Rnd_9x21_Mag";
player addWeapon "EpochRadio0";
player addWeapon "NVGoggles";
player addWeapon "Rangefinder";
player addWeapon "ItemWatch";
player addWeapon "ItemCompass";
player addWeapon "ItemGPS";
player addBackpack "B_AssaultPack_cbr";
player addItemToBackpack "Hatchet";
player addItemToBackpack "hatchet_swing";
player forceAddUniform _uniform;
} else {
_PistolANDmag = [["hgun_Rook40_F","16Rnd_9x21_Mag"],["hgun_P07_F","16Rnd_9x21_Mag"]] call BIS_fnc_selectRandom;
_pistol = _PistolANDmag select 0;
_mag = _PistolANDmag select 1;
_item = "";
_food = "";
_drink = "";
_uniform = ["U_C_Driver_4","U_C_Driver_3","U_C_Driver_2","U_C_Driver_1","U_C_Scientist","U_C_Journalist","U_C_WorkerCoveralls","U_C_Poor_1","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_tricolour","U_C_Poloshirt_burgundy","U_C_Poloshirt_blue","U_C_Poloshirt_stripped"] call BIS_fnc_selectRandom;
_vest = ["V_F41_EPOCH","V_41_EPOCH"] call BIS_fnc_selectRandom;
hint format [" %1 \n %2 \n %3 \n %4 \n %5 \n %6 \n %7",_pistol,_mag,_item,_food,_drink,_uniform,_vest];
player addVest _vest;
player addWeapon _pistol;
player addMagazine _mag;
player addMagazine _item;
player addMagazine _food;
player addMagazine _drink;
player addWeapon "EpochRadio0"; 
player addWeapon "ItemWatch";
player addWeapon "ItemCompass";
player addBackpack "B_parachute";
_modelMale = (typeOF player == "Epoch_Male_F");
_modelFemale = (typeOF player == "Epoch_Female_F");

if (_modelFemale) then {
player forceAddUniform "U_BasicBodyFemale";
};
if (_modelMale) then {
player forceAddUniform _uniform;
}; 
};
}];waitUntil {_player != player};
};
};

 

if you don't have a init.sqf then just make one.

Link to comment
Share on other sites

I ended up reverting to a loot crate in the clone room to guarantee first time spawners being able to pickup a loadout.

I got what i posted working fine on the init. I needed to clarify that I would like them to be pulled server side. Oh well..

 

@second_coming May I ask how you put those crates down?

Link to comment
Share on other sites

I got what i posted working fine on the init. I needed to clarify that I would like them to be pulled server side. Oh well..

 

@second_coming May I ask how you put those crates down?

 

 

I found the solution on this forum somewhere, just tried to find it to give credit where it's due but can't find it again :/

 

Edit the mission.sqm and add in the following:

 

class Vehicles
{
items=1;
class Item0
{
position[] = {1021.4781,5.8340983,2026.704};
azimut = 153.62447;
id=102;
side="EMPTY";
vehicle="O_supplyCrate_F";
skill=0.60000002;
init="clearMagazineCargoGlobal this;  clearWeaponCargoGlobal this;  clearItemCargoGlobal this; clearAllItemsFromBackpack this; clearBackpackCargoGlobal this; this addAction[""<t color='#D11313'>Grab Starting Loadout</t>"", ""loadoutfrombox.sqf""];";
 
};
};
This calls a script loadoutfrombox.sqf in your mission.pbo.

Here is the one I use (swap xxxx for your UID:

if (getPlayerUID player in ["xxxx"] ) then {

	hint "Admin Loadout Supplied";
	clearWeaponCargo player;
	clearMagazineCargo player;
	removeBackpackGlobal player;
	player forceAddUniform "U_OG_Guerilla2_3";
	player addBackpack "B_Carryall_oucamo";
	player addHeadGear "H_11_EPOCH";
	player addVest "V_26_EPOCH";
	
	player addWeapon "hgun_P07_F";	
	player addWeapon "srifle_EBR_F";	
	player addWeapon "EpochRadio0"; 
	player addWeapon "ItemGPS";
	player addWeapon "ItemMap";
	player addWeapon "ItemWatch";
	player addWeapon "ItemCompass";
	player addWeapon "Laserdesignator";
	
	player addPrimaryWeaponItem "optic_tws";
	player addPrimaryWeaponItem "muzzle_snds_B";

	player addHandgunItem "muzzle_snds_L";	
	
	player addItemToVest "FAK";
	player addItemToVest "FAK";
	player addItemToVest "scam_epoch";
	player addItemToVest "scam_epoch";
	player addItemToVest "ItemSodaRbull";
	player addItemToVest "ItemSodaRbull";

	player addMagazines ["30Rnd_9x21_Mag", 4];
	player addMagazines ["20Rnd_762x51_Mag", 5];
	player addMagazines ["EnergyPackLg", 2];
	player addMagazines ["handGrenade", 6];
	player addMagazines ["DemoCharge_Remote_Mag", 4];	
	EPOCH_playerEnergy = 2500;
	EPOCH_playerCrypto = 25000;
}
else
{
	hint "Standard Loadout Supplied";
	clearWeaponCargo player;
	clearMagazineCargo player;
	player addWeapon "hgun_Pistol_heavy_01_F";
	player addMagazine "11Rnd_45ACP_Mag";
	player addWeapon "EpochRadio0"; 
	player addWeapon "ItemMap";
	player addItemToVest  "FAK";
	player addItemToVest  "scam_epoch";
	player addItemToVest  "ItemSodaRbull";
	player addItemToVest  "11Rnd_45ACP_Mag";
	player addItemToVest  "11Rnd_45ACP_Mag";
	EPOCH_playerCrypto = 100;
	EPOCH_playerEnergy = 500;
					
		   
	_modelMale = (typeOF player == "Epoch_Male_F");
	_modelFemale = (typeOF player == "Epoch_Female_F");	
			
	if (_modelFemale) then {
		player forceAddUniform "U_BasicBodyFemale";
	};
	if (_modelMale) then {
		player forceAddUniform "U_C_Poor_1";
}; 
};
Link to comment
Share on other sites

 I found the solution on this forum somewhere, just tried to find it to give credit where it's due but can't find it again :/

 

Edit the mission.sqm and add in the following:

 

class Vehicles

{

items=1;

class Item0

{

position[] = {1021.4781,5.8340983,2026.704};

azimut = 153.62447;

id=102;

side="EMPTY";

vehicle="O_supplyCrate_F";

skill=0.60000002;

init="clearMagazineCargoGlobal this;  clearWeaponCargoGlobal this;  clearItemCargoGlobal this; clearAllItemsFromBackpack this; clearBackpackCargoGlobal this; this addAction[""<t color=#D11313'>Grab Starting Loadout</t>"", ""loadoutfrombox.sqf"];";

 

};

};

 

This calls a script loadoutfrombox.sqf in your mission.pbo.

Here is the one I use (swap xxxx for your UID:

 

if (getPlayerUID player in ["xxxx"] ) then {

    hint "Admin Loadout Supplied";

    clearWeaponCargo player;

    clearMagazineCargo player;

    removeBackpackGlobal player;

    player forceAddUniform "U_OG_Guerilla2_3";

    player addBackpack "B_Carryall_oucamo";

    player addHeadGear "H_11_EPOCH";

    player addVest "V_26_EPOCH";

    

    player addWeapon "hgun_P07_F";    

    player addWeapon "srifle_EBR_F";    

    player addWeapon "EpochRadio0";

    player addWeapon "ItemGPS";

    player addWeapon "ItemMap";

    player addWeapon "ItemWatch";

    player addWeapon "ItemCompass";

    player addWeapon "Laserdesignator";

    

    player addPrimaryWeaponItem "optic_tws";

    player addPrimaryWeaponItem "muzzle_snds_B";

    player addHandgunItem "muzzle_snds_L";    

    

    player addItemToVest "FAK";

    player addItemToVest "FAK";

    player addItemToVest "scam_epoch";

    player addItemToVest "scam_epoch";

    player addItemToVest "ItemSodaRbull";

    player addItemToVest "ItemSodaRbull";

    player addMagazines ["30Rnd_9x21_Mag", 4];

    player addMagazines ["20Rnd_762x51_Mag", 5];

    player addMagazines ["EnergyPackLg", 2];

    player addMagazines ["handGrenade", 6];

    player addMagazines ["DemoCharge_Remote_Mag", 4];    

    EPOCH_playerEnergy = 2500;

    EPOCH_playerCrypto = 25000;

}

else

{

    hint "Standard Loadout Supplied";

    clearWeaponCargo player;

    clearMagazineCargo player;

    player addWeapon "hgun_Pistol_heavy_01_F";

    player addMagazine "11Rnd_45ACP_Mag";

    player addWeapon "EpochRadio0";

    player addWeapon "ItemMap";

    player addItemToVest "FAK";

    player addItemToVest "scam_epoch";

    player addItemToVest "ItemSodaRbull";

    player addItemToVest "11Rnd_45ACP_Mag";

    player addItemToVest "11Rnd_45ACP_Mag";

    EPOCH_playerCrypto = 100;

    EPOCH_playerEnergy = 500;

                    

        

    _modelMale = (typeOF player == "Epoch_Male_F");

    _modelFemale = (typeOF player == "Epoch_Female_F");    

            

    if (_modelFemale) then {

        player forceAddUniform "U_BasicBodyFemale";

    };

    if (_modelMale) then {

        player forceAddUniform "U_C_Poor_1";

};

};

 

 

 

 

This is a good solution, but.....

 

How can you set the script up so each player can only use it once per-spawn? As it is now they could just keep getting gear until they have so much the can't carry it all

Link to comment
Share on other sites

 

I got the box to spawn in altis, set up the grid and everything.. is there a reason why its not clearing the contents from "O_supplyCrate_F" its showing up with the default items that O_supplyCrate_F has.. not the loadouts i created. 

 

I placed the loadoutfrombox.sqf in the mission pbo,

 

this is my mission.sqm section...

 class Item100

{
side = "CIV";
            class Vehicles
            {
                items=1;
                class Item0
                {
                    position[] = {23600.6,0.0828726,18003.8};
                    azimut = 0;
                    id=100;
                    side="EMPTY";
                    vehicle="O_supplyCrate_F";
                    skill=0.6;
                    init="clearMagazineCargoGlobal this;  clearWeaponCargoGlobal this;  clearItemCargoGlobal this; clearAllItemsFromBackpack this; clearBackpackCargoGlobal this; this addAction[""<t color=#D11313'>Grab Starting Loadout</t>"", ""loadoutfrombox.sqf"];";
  };
};
};

}; 

 

and this is my loadouts 

 if (getPlayerUID player in ["xxx","xxx","xxx","xxx","xxx"] ) then {

 
hint "admin Loadout Supplied";
clearWeaponCargo player;
clearMagazineCargo player;
removeBackpackGlobal player;
player forceAddUniform "U_O_GhillieSuit";
player addBackpack "B_AssaultPack_cbr";
player addVest "V_41_EPOCH";
 
player addWeapon "hgun_Rook40_snds_F";
player addWeapon "EpochRadio0"; 
player addWeapon "ItemGPS";
player addWeapon "ItemMap";
player addWeapon "ItemWatch";
player addWeapon "ItemCompass";
    player addWeapon "NVG_EPOCH";
player addWeapon "Rangefinder";
 
player addItemToVest "FAK";
player addItemToVest "scam_epoch";
player addItemToVest "ItemSodaRbull";
 
player addMagazines ["16Rnd_9x21_Mag", 3];
EPOCH_playerEnergy = 2500;
 
}
else
{
hint "Standard Loadout Supplied";
clearWeaponCargo player;
clearMagazineCargo player;
_uniform = ["U_C_Driver_4","U_C_Driver_3","U_C_Driver_2","U_C_Driver_1","U_C_Scientist","U_C_Journalist","U_C_WorkerCoveralls","U_C_Poor_1","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_tricolour","U_C_Poloshirt_burgundy","U_C_Poloshirt_blue","U_C_Poloshirt_stripped"] call BIS_fnc_selectRandom;
hint format [" %1",_uniform,];
player addWeapon "hgun_P07_F";
player addMagazine "16Rnd_9x21_Mag";
player addWeapon "EpochRadio0"; 
player addWeapon "ItemMap";
EPOCH_playerEnergy = 500;
player addBackpack "B_parachute";
  
_modelMale = (typeOF player == "Epoch_Male_F");
_modelFemale = (typeOF player == "Epoch_Female_F");
 
if (_modelFemale) then {
player forceAddUniform "U_BasicBodyFemale";
};
if (_modelMale) then {
player forceAddUniform _uniform;
}; 
};

Link to comment
Share on other sites

This is a good solution, but.....

 

How can you set the script up so each player can only use it once per-spawn? As it is now they could just keep getting gear until they have so much the can't carry it all

 

Which is why I only give out the basic loadout to everyone but myself, they can fill the default vest with ammo and a couple of handguns, it's not the end of the world. Plus I am looking into stopping people dropping items in the clone room to resolve it long term.

Link to comment
Share on other sites

In fact there is an easier solution to people taking more than one loadout:

if (getPlayerUID player in ["xx"] ) then {

	hint "Admin Loadout Supplied";
	clearWeaponCargo player;
	clearMagazineCargo player;
	removeBackpackGlobal player;
	player forceAddUniform "U_OG_Guerilla2_3";
	player addBackpack "B_Carryall_oucamo";
	player addHeadGear "H_11_EPOCH";
	player addVest "V_26_EPOCH";
	
	player addWeapon "hgun_P07_F";	
	player addWeapon "srifle_EBR_F";	
	player addWeapon "EpochRadio0"; 
	player addWeapon "ItemGPS";
	player addWeapon "ItemMap";
	player addWeapon "ItemWatch";
	player addWeapon "ItemCompass";
	player addWeapon "Laserdesignator";
	
	player addPrimaryWeaponItem "optic_tws";
	player addPrimaryWeaponItem "muzzle_snds_B";

	player addHandgunItem "muzzle_snds_L";	
	
	player addItemToVest "FAK";
	player addItemToVest "FAK";
	player addItemToVest "scam_epoch";
	player addItemToVest "scam_epoch";
	player addItemToVest "ItemSodaRbull";
	player addItemToVest "ItemSodaRbull";

	player addMagazines ["30Rnd_9x21_Mag", 4];
	player addMagazines ["20Rnd_762x51_Mag", 5];
	player addMagazines ["EnergyPackLg", 2];
	player addMagazines ["handGrenade", 6];
	player addMagazines ["DemoCharge_Remote_Mag", 4];	
	EPOCH_playerEnergy = 2500;
	EPOCH_playerCrypto = 25000;
}
else
{
	if (EPOCH_playerCrypto == 0) then
	{
		hint "Standard Loadout Supplied";
		clearWeaponCargo player;
		clearMagazineCargo player;
		player addWeapon "hgun_Pistol_heavy_01_F";
		player addMagazine "11Rnd_45ACP_Mag";
		player addWeapon "EpochRadio0"; 
		player addWeapon "ItemMap";
		player addItemToVest  "FAK";
		player addItemToVest  "scam_epoch";
		player addItemToVest  "ItemSodaRbull";
		player addItemToVest  "11Rnd_45ACP_Mag";
		player addItemToVest  "11Rnd_45ACP_Mag";
		EPOCH_playerCrypto = 100;
		EPOCH_playerEnergy = 500;
						
			   
		_modelMale = (typeOF player == "Epoch_Male_F");
		_modelFemale = (typeOF player == "Epoch_Female_F");	
				
		if (_modelFemale) then {
			player forceAddUniform "U_BasicBodyFemale";
		};
		if (_modelMale) then {
			player forceAddUniform "U_C_Poor_1";	
		};

	}else{
		hint "Standard Loadout Already Supplied";
	}; 
};
Link to comment
Share on other sites

This works also

			if (EPOCH_playerCrypto == 0) then
			{
			_PistolANDmag = [["hgun_Pistol_Signal_F","6Rnd_GreenSignal_F"],["hgun_Pistol_Signal_F","6Rnd_RedSignal_F"],["hgun_Pistol_heavy_02_Yorris_F","6Rnd_45ACP_Cylinder"],["hgun_Pistol_heavy_02_F","6Rnd_45ACP_Cylinder"],["hgun_Pistol_heavy_01_MRD_F","11Rnd_45ACP_Mag"],["hgun_Pistol_heavy_01_snds_F","11Rnd_45ACP_Mag"],["hgun_Pistol_heavy_01_F","11Rnd_45ACP_Mag"],["hgun_ACPC2_snds_F","9Rnd_45ACP_Mag"],["hgun_ACPC2_F","9Rnd_45ACP_Mag"],["hgun_Rook40_snds_F","16Rnd_9x21_Mag"],["hgun_Rook40_F","16Rnd_9x21_Mag"],["hgun_P07_snds_F","16Rnd_9x21_Mag"],["hgun_P07_F","16Rnd_9x21_Mag"]] call BIS_fnc_selectRandom;
			_pistol = _PistolANDmag select 0;
			_mag = _PistolANDmag select 1;
			_item = "FAK";
			_food = ["CookedSheep_EPOCH","CookedGoat_EPOCH","CookedChicken_EPOCH","CookedRabbit_EPOCH","ItemTunaCooked","ItemSeaBassCooked","ItemTroutCooked","FoodSnooter","FoodMeeps"] call BIS_fnc_selectRandom;
			_drink = ["ItemSodaRbull","ItemSodaOrangeSherbet","ItemSodaPurple","ItemSodaMocha","ItemSodaBurst","FoodWalkNSons","WhiskeyNoodle"] call BIS_fnc_selectRandom;
			_uniform = ["U_C_Scientist","U_C_Journalist","U_C_WorkerCoveralls","U_C_Poor_1","U_C_Poloshirt_redwhite","U_C_Poloshirt_salmon","U_C_Poloshirt_tricolour","U_C_Poloshirt_burgundy","U_C_Poloshirt_blue","U_C_Poloshirt_stripped"] call BIS_fnc_selectRandom;
			_vest = ["V_16_EPOCH","V_15_EPOCH","V_14_EPOCH","V_13_EPOCH","V_12_EPOCH","V_11_EPOCH","V_10_EPOCH","V_9_EPOCH","V_8_EPOCH","V_7_EPOCH","V_6_EPOCH","V_5_EPOCH","V_4_EPOCH","V_3_EPOCH","V_2_EPOCH","V_1_EPOCH"] call BIS_fnc_selectRandom;
			hint format ["Standard Loadout Supplied"];
			clearWeaponCargo player;
			clearMagazineCargo player;
			player addVest _vest;
			player addWeapon _pistol;
			player addMagazine _mag;
			player addMagazine _item;
			player addMagazine _food;
			player addMagazine _drink;
			player addWeapon "EpochRadio0"; 
                        EPOCH_playerCrypto = 100;
			EPOCH_playerEnergy = 500;
			_modelMale = (typeOF player == "Epoch_Male_F");
            _modelFemale = (typeOF player == "Epoch_Female_F");	
        
                if (_modelFemale) then {
                     player forceAddUniform "U_BasicBodyFemale";
                         };
                if (_modelMale) then {
                    player forceAddUniform _uniform;
                         };        		      	
			
		
			}else{
				hint "Standard Loadout Already Supplied";
			}; 

I set mine up so admins get the same loadout as players.  This way players still get a (somewhat) random loadout.

 

These coords for the loot box work for Bornholm

position[] = {13813.3,0.305496,6887.16};
azimut = 176.925;
Link to comment
Share on other sites

 

 

I found the solution on this forum somewhere, just tried to find it to give credit where it's due but can't find it again :/

 

Edit the mission.sqm and add in the following:

 

class Vehicles
{
items=1;
class Item0
{
position[] = {1021.4781,5.8340983,2026.704};
azimut = 153.62447;
id=102;
side="EMPTY";
vehicle="O_supplyCrate_F";
skill=0.60000002;
init="clearMagazineCargoGlobal this;  clearWeaponCargoGlobal this;  clearItemCargoGlobal this; clearAllItemsFromBackpack this; clearBackpackCargoGlobal this; this addAction[""<t color='#D11313'>Grab Starting Loadout</t>"", ""loadoutfrombox.sqf""];";
 
};
};

Noob question here, but do I just add this below Class Item99, and follow the same syntax, or do I just add as is? I've got everything working perfect and I would like to just get this working first time rather than fiddle around with it unnecessarily, if I can help it.  With all this random AI hunting everyone, a radio, and a pistol would definitely be helpful for new players to stay alive for at least a few minutes :P

Link to comment
Share on other sites

For the stock Altis mission.sqm and the crate almost center it would be,

	class Vehicles
	{
		items=1;
		class Item0
		{
			position[]={23599.836,3.1900001,18000.484};
			azimut=153.62447;
			id=100;
			side="EMPTY";
			vehicle="O_supplyCrate_F";
			skill=0.60000002;
			init="clearMagazineCargoGlobal this;  clearWeaponCargoGlobal this;  clearItemCargoGlobal this; clearAllItemsFromBackpack this; clearBackpackCargoGlobal this; this addAction[""<t color='#D11313'>Grab Starting Loadout</t>"", ""Your script name and location here""];";
		};
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
  • Advertisement
×
×
  • Create New...