Jump to content
  • 0

[TUTORIAL] Custom Starting Loadout and Admin/Mod/Donator Loadouts (w/ UIDs)


mysticviperx

Question

So I have been getting a lot of help from here with setting up my server, so I figured I would start making Tutorials on what I have learned.

 

As follows are the instructions to change the starting gear from the default "bandage/painkiller/flashlight" to what ever you want, and how to set up custom gear for different users based on their UIDs. This is not completely my work, some came from Axeman and AsianKid.

 

Original Post

 

Setting Up the Default Load-out (no custom loadouts)

 

To start, this is tested on 1.0.2.4-5, and uses variables that Epoch Devs added to the Server Code.

DefaultMagazines = [];
DefaultWeapons = [];
DefaultBackpack = "";

DefaultMagazines is for any item you place in your primary(food, ammo, parts, money) or secondary(bandages, clips, m203 rounds) inventory.

DefaultWeapons is for any guns/rifles or kit(hatchet, map, Bbnoculars, NVGs) items.

DefaultBackpack is as it would sound, the pack you start out with.

 

You will also see DefaultBackpackWeapon = ""; in my loadout script, I assume it adds items to your back pack, but I don't know its limitations, if I can use guns and ammo.

 

Inserting it into your code is easy. Open the init.sqf in your mission folder or mission.pbo.

 

At about line 20 of a stock Epoch init.sqf file you will find this:

// DayZ Epoch config
spawnShoremode = 1; // Default = 1 (on shore)
spawnArea= 1500; // Default = 1500
MaxHeliCrashes= 5; // Default = 5
MaxVehicleLimit = 300; // Default = 50
MaxDynamicDebris = 500; // Default = 100
dayz_MapArea = 14000; // Default = 10000
dayz_maxLocalZombies = 30; // Default = 30 

Below this, add the following:

//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","FoodSteakCooked"];
DefaultWeapons = ["glock17_EP1","ItemFlashlight","ItemHatchet"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";

Here I have configured the default load-out to be a G17 and 2 clips, 2 bandages, one Morphine, Painkillers, Clean Water, Cooked Steak, a Flashlight and Hatchet. You can change the variables your self to what would be best for your server, including removing everything so players don't even get the stock dayz load-out.

 

Custom Load-Outs (includes default load-out)

 

But, you want even more controls, like load-outs for donators or admins. Thats easy, instead of the above we are going to put all the settings in a loadout.sqf and save that to a "Scripts" folder in our mission folder or mission.pbo.

 

First, create a new folder in the Mission folder or PBO named Scripts.

Then Create a new text document in that folder called "loadout.sqf", is will warn you that you are changing the file type, thats ok.

 

Copy this code into your new lodout.sqf:

//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","FoodSteakCooked"];
DefaultWeapons = ["glock17_EP1","ItemFlashlight","ItemHatchet"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";

//Admin Loadout
if ((getPlayerUID player) in ["12345678","98765432"]) then {  //Admins: Nobody, Somebody
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","ItemWaterbottleBoiled","FoodSteakCooked","20Rnd_B_AA12_74Slug","20Rnd_B_AA12_Pellets","20Rnd_B_AA12_Pellets","ItemGoldBar10oz"];
	DefaultWeapons = ["glock17_EP1","AA12_PMC","Binocular_Vector","NVGoggles","ItemMap","ItemCompass","ItemGPS","ItemWatch","ItemKnife","Itemtoolbox","ItemCrowbar","Itemetool","ItemHatchet"];
	DefaultBackpack = "DZ_LargeGunBag_EP1";
	DefaultBackpackWeapon = "";
	};

//Moderator Loadout
if ((getPlayerUID player) in ["14725836"]) then {   //Moderators: ThatOtherGuy
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","ItemWaterbottleBoiled","FoodSteakCooked","8Rnd_B_Saiga12_Pellets","8Rnd_B_Saiga12_Pellets","8Rnd_B_Saiga12_74Slug","ItemGoldBar10oz"];
	DefaultWeapons = ["glock17_EP1","Saiga12K","Binocular_Vector","NVGoggles","ItemMap","Itemtoolbox"];
	DefaultBackpack = "DZ_Backpack_EP1";
	DefaultBackpackWeapon = "";
	};

//Pro-Donator Loadout
if ((getPlayerUID player) in ["96385274"]) then {  //Pro-Donators: MoneyBags
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","ItemWaterbottleBoiled","FoodSteakCooked","8Rnd_B_Beneli_Pellets","8Rnd_B_Beneli_Pellets","8Rnd_B_Beneli_74Slug","ItemGoldBar10oz"];
	DefaultWeapons = ["M9SD","Remington870_lamp","Binocular","ItemMap","ItemCompass","ItemFlashlightRed","ItemKnife","ItemMatchbox","ItemHatchet"];
	DefaultBackpack = "DZ_GunBag_EP1";
	DefaultBackpackWeapon = "";
	};

//Donator Loadout
if ((getPlayerUID player) in ["456789123"]) then {  //Donators: Nobody
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","ItemMorphine","ItemPainkiller","ItemGoldBar","15Rnd_W1866_Slug","15Rnd_W1866_Slug"];
	DefaultWeapons = ["glock17_EP1","Winchester1866","ItemMap","ItemFlashlightRed","ItemHatchet"];
	DefaultBackpack = "DZ_ALICE_Pack_EP1";
	DefaultBackpackWeapon = "";
	};

Hit save then start looking it over. Here we set the default loadout, then we check to see if the player is anyone we know from admins to donators, and set their loadout outs accordingly.

 

You will need the Players UID you can ask them for it, or if they have been on your server and you have database access then you can find it under "player_data".

 

In the code put their UID in the same place you see the seven or eight number groupings surrounded by parenthesis "  and seperated by commas , if you are setting more than one user for that group. I also write their names at the end of the line in the order that they are placed so I can go back and remember them later.

 

You can edit the different load-outs for each User Group and add more by copying one group and changing the UIDs.

 

Safe the file and Open your init.sqf in your mission folder or mission.pbo. Fine the following lines:

if (!isDedicated) then {
	//Conduct map operations
	0 fadeSound 0;
	waitUntil {!isNil "dayz_loadScreenMsg"};
	dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
	
	//Run the player monitor
	_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
	_playerMonitor = 	[] execVM "\z\addons\dayz_code\system\player_monitor.sqf";	
	_void = [] execVM "R3F_Realism\R3F_Realism_Init.sqf";
	
	//Lights
	//[0,0,true,true,true,58,280,600,[0.698, 0.556, 0.419],"Generator_DZ",0.1] execVM "\z\addons\dayz_code\compile\local_lights_init.sqf";
};

Above "//Run the player monitor" add the following:

	//Custom Loadouts
	[] ExecVM "Scripts\loadout.sqf";

Now we have called the load-out script, and the world is a better place. Save your work, upload your files, and start your server to test out the scripts. Remember, you have to re-spawn for it to work.

 

 

UPDATE

So with each update the epoch devs are giving us server admins more varibles to call and edit in our init.sqf. My hope is they will add a varible to set the default skin when you load in. (logic must be applied when users select between a Male and Female character. Either it ignores females, or it allows for a array to be set: ["Male_Skin","Female_Skin"]) 

 

Further, I would like to make it easyier to set up items in these arrays, but as with everything, it becomes hard. I myself had to visit no less that 5 diffrent sorces to find all the "Item IDs" for diffrent items. But, my current data base is pretty current, with most of the non-OP items listed. Here is a link of the items you can buy and sell on my server all listed by their "ItemID" and organised in a way thats easy to read.

 

As for posts 8-13, I can give no reasoning why the script is failing for them. I my self have broken it many times by forgetting a comma between UIDs, but this only leads to players not getting their custom loadouts, I have not experianced any server issues or stalls from this edit, and I will be the first to admit I dont always know what I'm doing and I am always breaking my server with something.

Link to comment
Share on other sites

Recommended Posts

  • 0

Your default loadout, has a missing quote on itemflashlight.

 

For your donator there's a space in default backpackweapon, but since that's blank I don't think that matters.

 

Here's an example of my default and $1 donator one to compare if you like:

 

//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","HandRoadFlare","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov"]; 
DefaultWeapons = ["ItemWatch","ItemFlashlight","Makarov"]; 
DefaultBackpack = "DZ_Patrol_Pack_EP1"; 
DefaultBackpackWeapon = "";
 
//Donator Loadout
if ((getPlayerUID player) in [""]) then 
{
DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","HandRoadFlare","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov"]; 
DefaultWeapons = ["ItemWatch","ItemMap","ItemHatchet_DZE","ItemFlashlight","Makarov"]; 
DefaultBackpack = "DZ_Patrol_Pack_EP1"; 
DefaultBackpackWeapon = "";
};
Link to comment
Share on other sites

  • 0

 

We use this in our Overwatch server:

 

//Arkiteck
if (_puid == "") exitWith {
[] call LOADOUTS_START;
[] call LOADOUTS_TEXT;
_skin = "Sniper3_DZ";
_bp = "DZ_CivilBackpack_EP1";
_inventory =
[
"ItemWatch","ItemMap","ItemCompass","ItemGps","Binocular_Vector","ItemKnife","ItemMatchbox",
"RH_hk417sdeotech","ItemBloodbag","ItemMorphine","ItemMatchbox","ItemToolbox","ItemEtool",
"FoodMRE","RH_20Rnd_762x51_SD_hk417","RH_20Rnd_762x51_SD_hk417","RH_20Rnd_762x51_SD_hk417","RH_20Rnd_762x51_SD_hk417",
"ItemBandage","vil_USP45SD","vil_usp45sd_mag","vil_usp45sd_mag","vil_usp45sd_mag",
"vil_usp45sd_mag","ItemBandage","ItemBandage","ItemBandage","ItemSodaMdew","ItemPainkiller"
];
_backpack =
[
"FHQ_MSR_DESERT","FHQ_rem_7Rnd_338Lapua_MSR_NT","FoodMRE","ItemSodaMdew",
"FHQ_rem_7Rnd_338Lapua_MSR_NT","FHQ_rem_7Rnd_338Lapua_MSR_NT","DomeTentStorage"
];
[_inventory] call ADD_INVENTORY;
if (_bp != "") then {[_bp,_backpack] call ADD_BP_INVENTORY;};
if (isClass (configFile >> "CfgMagazines" >> ("Skin_"+_skin))) then {[dayz_playerUID, dayz_characterID, _skin] spawn player_humanityMorph;};

 

Hey, im trying to get starter and custom loadouts to work on my overwatch server and im running into issues.  I see what you did here but could you elaborate a little bit on what to do?  Im a noob to this stuff.   thanks

Link to comment
Share on other sites

  • 0

This is not working for me

 

//Donator Loadout
if ((getPlayerUID player) in ["232240646","145198150","162459014"]) then {  //Donators: BulletofAnarchy
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","ItemMorphine","ItemPainkiller","ItemPainkiller","ItemBloodbag","ItemBloodbag""20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","ItemAntibiotic","FoodCanPasta","ItemSodaPepsi","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"];
	DefaultWeapons = ["M9SD","DMR","ItemGPS","ItemFlashlight","ItemHatchet_DZE","ItemKnife","ItemMatchbox","ItemCompass"];
	DefaultBackpack = "DZ_LargeGunBag_EP1";
	DefaultBackpackWeapon = "";
	};
 
I can't seem to get this to work, there's not breaks, the site just breaks up the line.
Link to comment
Share on other sites

  • 0

I am having issues when server gets over 30 players on. Some people get loadout, some don't... and most of the time the customs ones doesn't work at all.
 

//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","FoodCanSardines","ItemWaterbottle","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD"];
DefaultWeapons = ["Itemtoolbox","ItemMap","ItemHatchet_DZE","ItemCompass","ItemKnife","M9SD"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";

//Sniper Loadout
if ((getPlayerUID player) in ["xxxxxxxx","xxxxxxxx"]) then {  // Delta_Ghrim and Mads
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","ItemWaterbottleBoiled","FoodSteakCooked","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","Skin_Sniper1_DZ"];
	DefaultWeapons = ["M9SD","DMR","Binocular_Vector","NVGoggles","ItemMap","ItemCompass","ItemGPS","ItemWatch","ItemKnife","Itemtoolbox","ItemCrowbar","Itemetool","ItemHatchet_DZE","Itemetool"];
	DefaultBackpack = "DZ_Backpack_EP1";
	DefaultBackpackWeapon = "";
	};
Link to comment
Share on other sites

  • 0

lol go on google, search custom loadout dayz. pops up with 5 different tutporials alll with the same basic script xD YAY lets add to that ...

The fact about this script is that when there is too many players online, it stops working apparently... well it does that with me and many people as I can tell by the amount of persons asking about it.

Link to comment
Share on other sites

  • 0

Hello i have a problem, if a few players are online sometimes you start without Startgear !

 

What is that?

 

Kevin

  

lol go on google, search custom loadout dayz. pops up with 5 different tutporials alll with the same basic script xD YAY lets add to that ...

What an attitude wow the dude is just asking.

But freakstyle, when I get to a computer tomorrow I will post my way of doing it with nested IFs. On my tablet omw to bed now, but I haven't heard of one donator not spawning with his gear since I implemented this

Link to comment
Share on other sites

  • 0

  

What an attitude wow the dude is just asking.

But freakstyle, when I get to a computer tomorrow I will post my way of doing it with nested IFs. On my tablet omw to bed now, but I haven't heard of one donator not spawning with his gear since I implemented this

I would love to see that also!

Link to comment
Share on other sites

  • 0
The fact about this script is that when there is too many players online, it stops working apparently... well it does that with me and many people as I can tell by the amount of persons asking about it.

 

yeah FragZ

 

 

@geekgarage Can you do something about it?
Link to comment
Share on other sites

  • 0
waitUntil {(getPlayerUID player) != ""};
//Default
DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","15Rnd_9x19_M9","15Rnd_9x19_M9","FoodSteakCooked","ItemSodaPepsi","HandRoadFlare","ItemAntibiotic","SmokeShellGreen"];
DefaultWeapons = ["ItemMap","ItemMachete","ItemWatch","ItemFlashlight","M9"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";
//Elite Donator Loadout Assault
if ((getPlayerUID player) in GGDonatorEliteAssault) then {
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","ItemAntibiotic","ItemMorphine",
	"ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","FoodMRE","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","Skin_Sniper1_DZ"];
	DefaultWeapons = ["UZI_SD_EP1","M4A3_RCO_GL_EP1","Binocular_Vector","NVGoggles","ItemGPS","ItemCompass","ItemWatch","Itemetool","Itemtoolbox","ItemFlashlightRed","ItemMatchbox","ItemKnife"];
	DefaultBackpack = "DZ_Backpack_EP1";
	DefaultBackpackWeapon = "";
} else {
	//Elite Donator Loadout Sniper
	if ((getPlayerUID player) in GGDonatorEliteSniper) then {
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","ItemAntibiotic",
	"ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","FoodMRE","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR",
	"Skin_Sniper1_DZ"];
	DefaultWeapons = ["UZI_SD_EP1","M40A3","Binocular_Vector","NVGoggles","ItemGPS","ItemCompass","ItemWatch","Itemetool","Itemtoolbox","ItemFlashlightRed","ItemMatchbox","ItemKnife"];
	DefaultBackpack = "DZ_Backpack_EP1";
	DefaultBackpackWeapon = "";
	} else {
		//Veteran Donator Loadout Assault
		if ((getPlayerUID player) in GGDonatorVeteranAssault) then {
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemMorphine","ItemPainkiller",
		"ItemBloodbag","ItemWaterbottleBoiled","FoodMRE","30Rnd_556x45_G36","30Rnd_556x45_G36","30Rnd_556x45_G36","30Rnd_556x45_G36","FR_OHara_DZ"];
		DefaultWeapons = ["M9SD","G36K_camo","Binocular_Vector","ItemGPS","ItemCompass","ItemWatch","Itemtoolbox","ItemFlashlightRed","ItemMatchbox","ItemKnife"];
		DefaultBackpack = "DZ_CivilBackpack_EP1";
		DefaultBackpackWeapon = "";
		} else {
			//Veteran Donator Loadout Sniper
			if ((getPlayerUID player) in GGDonatorVeteranSniper) then {
			DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemMorphine","ItemPainkiller",
			"ItemBloodbag","ItemWaterbottleBoiled","FoodMRE","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","Skin_Sniper1_DZ"];
			DefaultWeapons = ["M9SD","M4SPR","Binocular_Vector","ItemGPS","ItemCompass","ItemWatch","Itemtoolbox","ItemFlashlightRed","ItemMatchbox","ItemKnife"];
			DefaultBackpack = "DZ_CivilBackpack_EP1";
			DefaultBackpackWeapon = "";
			} else {
				//Normal Donator Assault Loadout
				if ((getPlayerUID player) in GGDonatorNormalAssault) then {
				DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD",
				"ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","FoodMRE","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","Skin_Soldier1_DZ"];
				DefaultWeapons = ["MakarovSD","M4A1_Aim_camo","ItemMap","ItemCompass","ItemWatch","Itemtoolbox","ItemFlashlightRed","ItemKnife"];
				DefaultBackpack = "DZ_British_ACU";
				DefaultBackpackWeapon = "";
				} else {
					//Normal Donator Sniper Loadout
					if ((getPlayerUID player) in GGDonatorNormalSniper) then {
					DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","ItemMorphine",
					"ItemPainkiller","ItemWaterbottleBoiled","FoodMRE","5x_22_LR_17_HMR","5x_22_LR_17_HMR","5x_22_LR_17_HMR","5x_22_LR_17_HMR","5x_22_LR_17_HMR","5x_22_LR_17_HMR",
					"Skin_GUE_Soldier_Sniper_DZ"];
					DefaultWeapons = ["MakarovSD","huntingrifle","ItemMap","ItemCompass","ItemWatch","Itemtoolbox","ItemFlashlightRed","ItemKnife"];
					DefaultBackpack = "DZ_British_ACU";
					DefaultBackpackWeapon = "";
					} else {
						//Basic Donator Loadout
						if ((getPlayerUID player) in GGDonatorBasic) then {
						DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemPainkiller","ItemWaterbottleBoiled","FoodMRE","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag",
						"30Rnd_556x45_Stanag","17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17"];
						DefaultWeapons = ["glock17_EP1","M4A1","ItemMap","ItemCompass","Itemtoolbox","ItemKnife"];
						DefaultBackpack = "DZ_ALICE_Pack_EP1";
						DefaultBackpackWeapon = "";	
						};
					};
				};
			};
		};
	};
};

this is how i do it

Link to comment
Share on other sites

  • 0
waitUntil {(getPlayerUID player) != ""};
//Default
DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","15Rnd_9x19_M9","15Rnd_9x19_M9","FoodSteakCooked","ItemSodaPepsi","HandRoadFlare","ItemAntibiotic","SmokeShellGreen"];
DefaultWeapons = ["ItemMap","ItemMachete","ItemWatch","ItemFlashlight","M9"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";
//Elite Donator Loadout Assault
if ((getPlayerUID player) in GGDonatorEliteAssault) then {
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","ItemAntibiotic","ItemMorphine",
	"ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","FoodMRE","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","Skin_Sniper1_DZ"];
	DefaultWeapons = ["UZI_SD_EP1","M4A3_RCO_GL_EP1","Binocular_Vector","NVGoggles","ItemGPS","ItemCompass","ItemWatch","Itemetool","Itemtoolbox","ItemFlashlightRed","ItemMatchbox","ItemKnife"];
	DefaultBackpack = "DZ_Backpack_EP1";
	DefaultBackpackWeapon = "";
} else {
	//Elite Donator Loadout Sniper
	if ((getPlayerUID player) in GGDonatorEliteSniper) then {
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","ItemAntibiotic",
	"ItemMorphine","ItemPainkiller","ItemBloodbag","ItemWaterbottleBoiled","FoodMRE","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR",
	"Skin_Sniper1_DZ"];
	DefaultWeapons = ["UZI_SD_EP1","M40A3","Binocular_Vector","NVGoggles","ItemGPS","ItemCompass","ItemWatch","Itemetool","Itemtoolbox","ItemFlashlightRed","ItemMatchbox","ItemKnife"];
	DefaultBackpack = "DZ_Backpack_EP1";
	DefaultBackpackWeapon = "";
	} else {
		//Veteran Donator Loadout Assault
		if ((getPlayerUID player) in GGDonatorVeteranAssault) then {
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemMorphine","ItemPainkiller",
		"ItemBloodbag","ItemWaterbottleBoiled","FoodMRE","30Rnd_556x45_G36","30Rnd_556x45_G36","30Rnd_556x45_G36","30Rnd_556x45_G36","FR_OHara_DZ"];
		DefaultWeapons = ["M9SD","G36K_camo","Binocular_Vector","ItemGPS","ItemCompass","ItemWatch","Itemtoolbox","ItemFlashlightRed","ItemMatchbox","ItemKnife"];
		DefaultBackpack = "DZ_CivilBackpack_EP1";
		DefaultBackpackWeapon = "";
		} else {
			//Veteran Donator Loadout Sniper
			if ((getPlayerUID player) in GGDonatorVeteranSniper) then {
			DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemMorphine","ItemPainkiller",
			"ItemBloodbag","ItemWaterbottleBoiled","FoodMRE","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","Skin_Sniper1_DZ"];
			DefaultWeapons = ["M9SD","M4SPR","Binocular_Vector","ItemGPS","ItemCompass","ItemWatch","Itemtoolbox","ItemFlashlightRed","ItemMatchbox","ItemKnife"];
			DefaultBackpack = "DZ_CivilBackpack_EP1";
			DefaultBackpackWeapon = "";
			} else {
				//Normal Donator Assault Loadout
				if ((getPlayerUID player) in GGDonatorNormalAssault) then {
				DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD",
				"ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","FoodMRE","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","Skin_Soldier1_DZ"];
				DefaultWeapons = ["MakarovSD","M4A1_Aim_camo","ItemMap","ItemCompass","ItemWatch","Itemtoolbox","ItemFlashlightRed","ItemKnife"];
				DefaultBackpack = "DZ_British_ACU";
				DefaultBackpackWeapon = "";
				} else {
					//Normal Donator Sniper Loadout
					if ((getPlayerUID player) in GGDonatorNormalSniper) then {
					DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","8Rnd_9x18_MakarovSD","ItemMorphine",
					"ItemPainkiller","ItemWaterbottleBoiled","FoodMRE","5x_22_LR_17_HMR","5x_22_LR_17_HMR","5x_22_LR_17_HMR","5x_22_LR_17_HMR","5x_22_LR_17_HMR","5x_22_LR_17_HMR",
					"Skin_GUE_Soldier_Sniper_DZ"];
					DefaultWeapons = ["MakarovSD","huntingrifle","ItemMap","ItemCompass","ItemWatch","Itemtoolbox","ItemFlashlightRed","ItemKnife"];
					DefaultBackpack = "DZ_British_ACU";
					DefaultBackpackWeapon = "";
					} else {
						//Basic Donator Loadout
						if ((getPlayerUID player) in GGDonatorBasic) then {
						DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemPainkiller","ItemWaterbottleBoiled","FoodMRE","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag",
						"30Rnd_556x45_Stanag","17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17"];
						DefaultWeapons = ["glock17_EP1","M4A1","ItemMap","ItemCompass","Itemtoolbox","ItemKnife"];
						DefaultBackpack = "DZ_ALICE_Pack_EP1";
						DefaultBackpackWeapon = "";	
						};
					};
				};
			};
		};
	};
};

this is how i do it

 

For example, taht *GGDonatorBasic* thingy, what is it? Is it like a separate file where UIDs are written? Can you explain a bit more?

Link to comment
Share on other sites

  • 0

We use switch statements in our loadouts. Loadouts still load about 95% of the time :)

_uid = getPlayerUID player;
switch (_uid) do {
	case "xxxx": {
		// This donator
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","HandRoadFlare","30Rnd_9x19_UZI","30Rnd_9x                19_UZI","Skin_Sniper1_DZ"]; 
		DefaultWeapons = ["ItemWatch","ItemMap","ItemHatchet_DZE","ItemFlashlight","UZI_EP1"]; 
		DefaultBackpack = "DZ_ALICE_Pack_EP1"; 
	};
	case "xxxx": {
		// This donator
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","HandRoadFlare","30Rnd_9x19_UZI","30Rnd_9x                19_UZI"]; 
		DefaultWeapons = ["ItemWatch","ItemMap","ItemHatchet_DZE","ItemFlashlight","UZI_EP1"]; 
		DefaultBackpack = "DZ_ALICE_Pack_EP1"; 
	};
	case "xxxx": {
		// This donator
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","HandRoadFlare","30Rnd_9x19_UZI","30Rnd_9x               19_UZI","Skin_CZ_Special_Forces_GL_DES_EP1_DZ"]; 
		DefaultWeapons = ["ItemWatch","ItemMap","ItemHatchet_DZE","ItemFlashlight","UZI_EP1"]; 
		DefaultBackpack = "DZ_ALICE_Pack_EP1"; 
	};
	case "xxxx": {
		// This donator
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","30Rnd_9x19_UZI","30Rnd_9x19_UZI","30Rnd_5                56x45_StanagSD","30Rnd_556x45_StanagSD","Skin_Soldier_Sniper_PMC_DZ"]; 
		DefaultWeapons = ["ItemWatch","ItemMap","ItemHatchet_DZE","NVGoggles","UZI_EP1","M4A1_AIM_SD_camo"]; 
		DefaultBackpack = "DZ_Backpack_EP1"; 
	};
};

Once 1.0.5 hits I will be adding defaultSkin to the mix :D

Link to comment
Share on other sites

  • 0

We use switch statements in our loadouts. Loadouts still load about 95% of the time :)

_uid = getPlayerUID player;
switch (_uid) do {
	case "xxxx": {
		// This donator
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","HandRoadFlare","30Rnd_9x19_UZI","30Rnd_9x                19_UZI","Skin_Sniper1_DZ"]; 
		DefaultWeapons = ["ItemWatch","ItemMap","ItemHatchet_DZE","ItemFlashlight","UZI_EP1"]; 
		DefaultBackpack = "DZ_ALICE_Pack_EP1"; 
	};
	case "xxxx": {
		// This donator
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","HandRoadFlare","30Rnd_9x19_UZI","30Rnd_9x                19_UZI"]; 
		DefaultWeapons = ["ItemWatch","ItemMap","ItemHatchet_DZE","ItemFlashlight","UZI_EP1"]; 
		DefaultBackpack = "DZ_ALICE_Pack_EP1"; 
	};
	case "xxxx": {
		// This donator
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","HandRoadFlare","30Rnd_9x19_UZI","30Rnd_9x               19_UZI","Skin_CZ_Special_Forces_GL_DES_EP1_DZ"]; 
		DefaultWeapons = ["ItemWatch","ItemMap","ItemHatchet_DZE","ItemFlashlight","UZI_EP1"]; 
		DefaultBackpack = "DZ_ALICE_Pack_EP1"; 
	};
	case "xxxx": {
		// This donator
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","30Rnd_9x19_UZI","30Rnd_9x19_UZI","30Rnd_5                56x45_StanagSD","30Rnd_556x45_StanagSD","Skin_Soldier_Sniper_PMC_DZ"]; 
		DefaultWeapons = ["ItemWatch","ItemMap","ItemHatchet_DZE","NVGoggles","UZI_EP1","M4A1_AIM_SD_camo"]; 
		DefaultBackpack = "DZ_Backpack_EP1"; 
	};
};

Once 1.0.5 hits I will be adding defaultSkin to the mix :D

So using your method, I could just change the *xxx* to UIDs and it would work?

Link to comment
Share on other sites

  • 0

I copy and pasted directly out of our working mission file. I removed the ids and put the x's in there.

 

In other words... yes :D

 

I just created a file called customloadouts.sqf, put that in that file and then called it from the init.sqf under the if (!isDedicated) then like such:

 

[] ExecVM "Mods\Misc\CustomLoadouts.sqf";

 

Have fun!

 

EDIT:

BTW, if you want a default, your last statement will look like this:

 

	default{
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","HandRoadFlare","30Rnd_9x19_UZI","30Rnd_9x19_UZI"]; 
		DefaultWeapons = ["ItemWatch","ItemFlashlight","UZI_EP1"]; 
		DefaultBackpack = "DZ_Patrol_Pack_EP1";
	};
Link to comment
Share on other sites

  • 0

 

I copy and pasted directly out of our working mission file. I removed the ids and put the x's in there.

 

In other words... yes :D

 

I just created a file called customloadouts.sqf, put that in that file and then called it from the init.sqf under the if (!isDedicated) then like such:

 

[] ExecVM "Mods\Misc\CustomLoadouts.sqf";

 

Have fun!

 

EDIT:

BTW, if you want a default, your last statement will look like this:

 

	default{
		DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","HandRoadFlare","30Rnd_9x19_UZI","30Rnd_9x19_UZI"]; 
		DefaultWeapons = ["ItemWatch","ItemFlashlight","UZI_EP1"]; 
		DefaultBackpack = "DZ_Patrol_Pack_EP1";
	};

 

If there are many players under the same loadout, do you do it like "xxx","xxx","xxx"

or

"xxx,xxx,xxx"

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...