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

I just wanted to drop in real quick since I just now found this post of yours and wanted to say thank you!

 

GREATLY appreciated technical detail and explanation! I can't tell you how surprising and helpful it was to find that you've got an item w/ itemID (and prices w/ location!) database hosted somewhere. I'll be sending whatever donation I can through that database next week in appreciation =)

 

I had to make a vehicle database by hand when I first got started doing server setup and it took FOREVER and drove me insane! Great work sir

 

EDIT: And of course, very much grateful to AsianKid and Axeman (sp?) for their work and contributions as well!

Link to comment
Share on other sites

  • 0

Has anyone found a way to put things in loadout backpacks with this script?

DefaultBackpackWeapon = [""];

only works with weapon(s) addition to the backpack.

[To my knowledge, so I don't throw anyone else off who is passing through...only one weapon]

 

I was hoping to find an easy way to put some materials in one of my loadouts bag by default. Any ideas greatly appreciated.

Link to comment
Share on other sites

  • 0

I just wanted to drop in real quick since I just now found this post of yours and wanted to say thank you!

 

GREATLY appreciated technical detail and explanation! I can't tell you how surprising and helpful it was to find that you've got an item w/ itemID (and prices w/ location!) database hosted somewhere. I'll be sending whatever donation I can through that database next week in appreciation =)

 

I had to make a vehicle database by hand when I first got started doing server setup and it took FOREVER and drove me insane! Great work sir

 

EDIT: And of course, very much grateful to AsianKid and Axeman (sp?) for their work and contributions as well!

 

Ah Ha, well if you donate useing the link at the bottom of that website (my current store invontory) you will accually be donating to the developer of the website and associated tools, Nightmare. Not a bad place for the money to go, as he does deserve it with all his work. If you have a hankering to donate to me, the you can simply visit my main site. (http://dayz.mvxhosting.com) Intrestingly enough, I had to completly rewrite the database to make that website more readable. And even now there are still errors, like "Weapons Friendly 2". That vender does not exist on the map, it is part of the data base due to a call I am wary of deleting.

 

 

Has anyone found a way to put things in loadout backpacks with this script?

DefaultBackpackWeapon = [""];
only works with weapon(s) addition to the backpack.

[To my knowledge, so I don't throw anyone else off who is passing through...only one weapon]

 

I was hoping to find an easy way to put some materials in one of my loadouts bag by default. Any ideas greatly appreciated.

 

 

Well you could just throw some items in there and see what it does, i am lazy and havent tried or forgot what the results where.

 

something like:

DefaultBackpackWeapon = ["ItemOne","ItemTwo","WeaponOne","WeaponTwo"];

Just remember to give a large enough backpack to hold everything.

Link to comment
Share on other sites

  • 0

In the latest change log for 1.0.5 the "DefaultBackPackWeapon" was updated to

 

[CHANGED] Replaced variable DefaultBackpackWeapon = ""; with DefaultBackpackItems = [""]; which accepts both weapons and magazines. @icomrade
 
Which allows me to assume that currently you can put what ever you want in the string, they just poorly chose the varible name
Link to comment
Share on other sites

  • 0

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.

...

<snip>

Implemented this on my server, working fine - thank you very much for this -- "liked"!

 

P.S.: I used loadout.sqf

Link to comment
Share on other sites

  • 0

my default load outs are working completely however, my admin, moderator etc. have not worked. i have tried with my UID and my steam ID but it does not seem to work. can someone tell me the problem and how it can resolved thank-you.

 

//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemMorphine","ItemPainkiller","ItemWaterbottleBoiled","FoodSteakCooked","ItemBloodbag"];
DefaultWeapons = ["glock17_EP1","ItemFlashlight","Itemtoolbox","ItemCompass","ItemKnife","ItemWatch","Itemcrowbar","ItemMap"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";
 
//Admin Loadout
if ((getPlayerUID player) in ["1111111111","98765432"]) then {   //Admins: nobody, Somebody
DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","ItemBloodbag","ItemMorphine","ItemWaterbottleBoiled","FoodSteakCooked","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","20rnd_762x51_B_SCAR","20rnd_762x51_B_SCAR",20rnd_762x51_B_SCAR"];
DefaultWeapons = ["SCAR_H_LNG_Sniper","NVGoggles","ItemMap","Itemtoolbox","ItemCompass","Itemcrowbar","Itemwatch","UZI_SD_EP1","ItemGPS","ItemKnife","ItemFlashlight"];
DefaultBackpack = "US_Backpack_EP1";
DefaultBackpackWeapon = "SCAR_L_CQC_Holo","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag";
};
 
 
//Moderator Loadout
if ((getPlayerUID player) in ["111111111","98765432"]) then {  //Moderators: 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 = "";
};
 
//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 = "";
};
Link to comment
Share on other sites

  • 0

Try this, you were missing a quote from the beginning of the last scar clip in your default mag, and had DefaultBackpackWeapons when its now DefaultBackpackItems also missing square brackets from that statement, i can't see an issue with the others  :P but it is like 5am so may be overlooking it.

//Admin Loadout
if ((getPlayerUID player) in ["1111111111","98765432"]) then {   //Admins: nobody, Somebody
DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","ItemBloodbag","ItemMorphine","ItemWaterbottleBoiled","FoodSteakCooked","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","20rnd_762x51_B_SCAR","20rnd_762x51_B_SCAR","20rnd_762x51_B_SCAR"];
DefaultWeapons = ["SCAR_H_LNG_Sniper","NVGoggles","ItemMap","Itemtoolbox","ItemCompass","Itemcrowbar","Itemwatch","UZI_SD_EP1","ItemGPS","ItemKnife","ItemFlashlight"];
DefaultBackpack = "US_Backpack_EP1";
DefaultBackpackItems = ["SCAR_L_CQC_Holo","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag"];
};
Link to comment
Share on other sites

  • 0

Hi,

 

I've tried using this method for my server, but the starter gear works. Donator doesn't even when I use the set up for starter in donation area. It doesn't load.

 

I've posted my script below, in the hope that somebody could help me out.

 

 

Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemPainkiller"];
DefaultWeapons = ["M9SD","ItemFlashlight","ItemToolbox","ItemHatchet_DZE"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackItems = [];
 
Luckystrike (Expires: 27/09)
if ((getPlayerUID player) in ["76561198101993144"]) then {
DefaultMagazines = ["20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemBandage","ItemBandage","ItemBandage","ItemBandage","Skin_FR_OHara_DZ","ItemPainkiller","ItemMorphine","ItemBloodbag","ItemAntibiotic","ItemSodaCoke"
DefaultWeapons = ["DMR_DZ","M9SD","Binocular","ItemGPS","ItemToolbox","ItemCrowbar","ItemHatchet_DZE","ItemFlashlightRed"];
DefaultBackpack = "DZ_Backpack_EP1";
DefaultBackpackItems = [];
};
 
TheGreatMichael (Expires: 29/09)
if ((getPlayerUID player) in ["76561198063134386"]) then {
DefaultMagazines = ["20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","ItemBandage","ItemBandage","ItemBandage","ItemBandage","Sniper1_DZ","ItemPainkiller","ItemMorphine","ItemBloodbag","ItemAntibiotic","ItemSodaCoke"
DefaultWeapons = ["vil_M110","UZI_SD_EP1","Binocular","ItemGPS","ItemToolbox","ItemCrowbar","ItemHatchet_DZE","ItemFlashlightRed"];
DefaultBackpack = "DZ_Backpack_EP1";
DefaultBackpackItems = [];
};
 
DawnofTheGoose (Expires: 29/09)
if ((getPlayerUID player) in ["76561198095072846"]) then {
DefaultMagazines = ["RH_20Rnd_762x51_SD_hk417","RH_20Rnd_762x51_SD_hk417","RH_20Rnd_762x51_SD_hk417","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemBandage","ItemBandage","ItemBandage","ItemBandage","Soldier_Sniper_PMC_DZ","ItemPainkiller","ItemMorphine","ItemBloodbag","ItemAntibiotic","ItemSodaCoke"
DefaultWeapons = ["RH_hk417sdsp","M9SD","Binocular","ItemGPS","ItemToolbox","ItemCrowbar","ItemHatchet_DZE","ItemFlashlightRed"];
DefaultBackpack = "DZ_Backpack_EP1";
DefaultBackpackItems = [];
};
 

 
Kind regards,
 
Triple
Link to comment
Share on other sites

  • 0

 

Hi,

 

I've tried using this method for my server, but the starter gear works. Donator doesn't even when I use the set up for starter in donation area. It doesn't load.

 

I've posted my script below, in the hope that somebody could help me out.

 

-snip-

 
Kind regards,
 
Triple

 

 

Seems like you're missing the ]; on the end of each of the DefaultMagazines list for your players:

 

Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemPainkiller"];
DefaultWeapons = ["M9SD","ItemFlashlight","ItemToolbox","ItemHatchet_DZE"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackItems = [];
 
Luckystrike (Expires: 27/09)
if ((getPlayerUID player) in ["76561198101993144"]) then {
DefaultMagazines = ["20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemBandage","ItemBandage","ItemBandage","ItemBandage","Skin_FR_OHara_DZ","ItemPainkiller","ItemMorphine","ItemBloodbag","ItemAntibiotic","ItemSodaCoke"];
DefaultWeapons = ["DMR_DZ","M9SD","Binocular","ItemGPS","ItemToolbox","ItemCrowbar","ItemHatchet_DZE","ItemFlashlightRed"];
DefaultBackpack = "DZ_Backpack_EP1";
DefaultBackpackItems = [];
};
 
TheGreatMichael (Expires: 29/09)
if ((getPlayerUID player) in ["76561198063134386"]) then {
DefaultMagazines = ["20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","30Rnd_9x19_UZI_SD","ItemBandage","ItemBandage","ItemBandage","ItemBandage","Sniper1_DZ","ItemPainkiller","ItemMorphine","ItemBloodbag","ItemAntibiotic","ItemSodaCoke"];
DefaultWeapons = ["vil_M110","UZI_SD_EP1","Binocular","ItemGPS","ItemToolbox","ItemCrowbar","ItemHatchet_DZE","ItemFlashlightRed"];
DefaultBackpack = "DZ_Backpack_EP1";
DefaultBackpackItems = [];
};
 
DawnofTheGoose (Expires: 29/09)
if ((getPlayerUID player) in ["76561198095072846"]) then {
DefaultMagazines = ["RH_20Rnd_762x51_SD_hk417","RH_20Rnd_762x51_SD_hk417","RH_20Rnd_762x51_SD_hk417","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemBandage","ItemBandage","ItemBandage","ItemBandage","Soldier_Sniper_PMC_DZ","ItemPainkiller","ItemMorphine","ItemBloodbag","ItemAntibiotic","ItemSodaCoke"];
DefaultWeapons = ["RH_hk417sdsp","M9SD","Binocular","ItemGPS","ItemToolbox","ItemCrowbar","ItemHatchet_DZE","ItemFlashlightRed"];
DefaultBackpack = "DZ_Backpack_EP1";
DefaultBackpackItems = [];
};

Link to comment
Share on other sites

  • 0

So has anyone figured out how to make them spawn wearing the skin that i want them to?

>.>

My loadouts work perfect, but i want to add a exclusive skin as a donation perk.  The skin is added to my server, but isn't a item (or 'Magazine') in the DB.

 

I would also like to change the Default Loadout Skin as well, simply because its fugly

Link to comment
Share on other sites

  • 0
HELLO EVERYONE!!
 
I'm sure that you are all anxious to find out how to add the items to a donator's backpack!
 
It is very simple!!! & a lot of people, will be kicking themselves!!!
 
At the bottom of the codes where it usually says " DefaultBackpackWeapons " all you have to do is change it to " DefaultBackpackItems " As I have shown in the code below!
 
Enjoy and have fun everbody!
 
//Thanks for testing
if ((getPlayerUID player) in ["0","0","0"]) then {  //Donators: ADDNAMESHERE
DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","Skin_Pilot_EP1_DZ","ItemWaterbottle","FoodBeefCooked","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","5Rnd_762x51_M24","5Rnd_762x51_M24","5Rnd_762x51_M24","5Rnd_762x51_M24"];
DefaultWeapons = ["M9SD","M24","ItemMap","Toolbox","ItemHatchet","ItemEtool","ItemMatchbox","ItemKnife","ItemWatch","ItemCompass","ItemGPS","ItemRadio"];
DefaultBackpack = "DZ_LargeGunBag_EP1";
DefaultBackpackItems = ["ItemMorphine","ItemBloodbag","ItemEpinephrine","ItemAntibiotic","ItemPainkiller","ItemHeatPack"];
DefaultBackpackWeapons = [""]
};
Link to comment
Share on other sites

  • 0

EDIT: Did some changes and everyone gets the loadout 100%. Server lag or not getting gender selection does not effect it anymore. The default loadout that a normal player gets works everytime also.

Step one:

Default loadout. Placed inside the Dayz Epoch Config. In your init.sqf.

DZE_DeathMsgGlobal = true; 
spawnShoremode = 0;
spawnArea= 1500;
MaxVehicleLimit = 150;
MaxDynamicDebris = 0;
dayz_MapArea = 12000;

DefaultMagazines = ["ItemMorphine","ItemBandage","7Rnd_45ACP_1911","7Rnd_45ACP_1911"];
DefaultWeapons = ["Colt1911","ItemCompass","ItemGPS","ItemHatchet_DZE"];
DefaultBackpack = "DZ_TK_Assault_Pack_EP1";
DefaultBackpackWeapon = "";

dayz_paraSpawn = true;

Step 2:

Create a new sqf file named loadout and place this code in it.

My loadout.sqf

waitUntil {(getPlayerUID player) != ""};
_loadList = ["xxxxxxxxx","xxxxxxxxx","xxxxxxxxx"];
_lpID = getPlayerUID player;

//CL1 *** player ***
if ((_lpID in ["xxxxxxxxx"]) && (_lpID in _loadList)) then {
DefaultMagazines = ["5Rnd_86x70_L115A1","Skin_Soldier1_DZ"];
DefaultWeapons = ["ItemCompass","BAF_LRR_scoped"];
DefaultBackpack = "DZ_Backpack_EP1";
DefaultBackpackWeapon = "";
};

//CL2 *** player ***
if ((_lpID in ["xxxxxxxxx"]) && (_lpID in _loadList)) then {
DefaultMagazines = ["5Rnd_86x70_L115A1","Skin_Soldier1_DZ"];
DefaultWeapons = ["ItemCompass","BAF_LRR_scoped"];
DefaultBackpack = "DZ_Backpack_EP1";
DefaultBackpackWeapon = "";
};

//CL3 *** player ***
if ((_lpID in ["xxxxxxxxx"]) && (_lpID in _loadList)) then {
DefaultMagazines = ["5Rnd_86x70_L115A1","Skin_Soldier1_DZ"];
DefaultWeapons = ["ItemCompass","BAF_LRR_scoped"];
DefaultBackpack = "DZ_Backpack_EP1";
DefaultBackpackWeapon = "";
};

In your Init.sqf place the [] execVM "Scripts\loadout.sqf"; inside the if (!isDedicated) then {

My Init.sqf

if (!isDedicated) then {
	0 fadeSound 0;
	waitUntil {!isNil "dayz_loadScreenMsg"};
	dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
	[] execVM "Scripts\loadout.sqf";
	[] execVM "Scripts\kh_actions.sqf";
	
	_id = player addEventHandler ["Respawn", {_id = [] spawn player_death;}];
	_playerMonitor = 	[] execVM "\z\addons\dayz_code\system\player_monitor.sqf";
	[] execVM "Scripts\safezone.sqf";
};

Remember you can add as many loadouts as you want. I have over 60 in mine. Works perfect if you want everyone to have a different loadout.

 

When you want to put loadout.sqf to the server.pbo... how would you do that to protect better the UIDs from pbo thiefs?

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