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

Guys,

 

Ive been using this method for custom donator loadouts etc.. but ive noticed once we peak server ( 50 players or so ) and start to hit a little bit of lag, the kits will seem to miss spawning some times, its just a random hit or miss,

Ive tested them on test server with a few players with kits and its no issue,

 

has anyone else experienced this and solved the issue?

 

im just assuming its due to lag, dedi box is coming soon so hopefully that will fix that issue..

Link to comment
Share on other sites

  • 0

I too have this issue, it either due to database lag (its looking for the player UID and cant obtain it before the scrip executes, this the player just gets the default load-out. I am pondering placing a 'wait/hold' command into the script and wait until it obtains the uid before going forward, but I am wary causing players to be unable to access the server during peak load times.

 

My simple fix if upgrading the server with an ssd...but if i come up with a solution ill let you know.

Link to comment
Share on other sites

  • 0

Guys,

 

Ive been using this method for custom donator loadouts etc.. but ive noticed once we peak server ( 50 players or so ) and start to hit a little bit of lag, the kits will seem to miss spawning some times, its just a random hit or miss,

Ive tested them on test server with a few players with kits and its no issue,

 

has anyone else experienced this and solved the issue?

 

im just assuming its due to lag, dedi box is coming soon so hopefully that will fix that issue..

 

Dayz.st's custom loadouts are bugged. I emailed them about it and they said the fault lies in the epoch code :wacko:. Somehow I believe they find it easier to blame the mod than see what they could do to fix it. Anyways, with their db loadout you will notice a second backpack spawning or your rpt file getting errors regarding duplicate gear on the player. Sometimes its fine but at other times it does cause the player's data not being sync'd to the db as epoch code believes the players in 'debug'.

Link to comment
Share on other sites

  • 0

Hey I cannot seem to get this to work on dayz epoch 1.0.3.1, I have followed it to the letter minus the prodonators sections heres a copy of my code

 

//Default Loadout
DefaultMagazines = ["FoodSteakCooked","ItemWatterBottle","ItemBandage","ItemBandage","ItemMorphine","ItemBloodbag","10x_303","10x_303","6Rnd_45ACP","6Rnd_45ACP"];
DefaultWeapons = ["LeeEnfield","revolver_EP1","ItemMap","ItemCompass"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";
 
//Admin Loadout
if ((getPlayerUID player) in ["MYUID"]) then {  //Admins: DevilzShadow
DefaultMagazines = ["FoodSteakCooked","ItemPainkiller","ItemMorphine","ItemBloodbag","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","20Rnd_762x51_DMR","17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemBandage","ItemBandage","FoodSteakCooked","ItemGoldBar10oz"];
DefaultWeapons = ["DMR","ItemToolbox","ItemMap","ItemGPS","ItemCompass","glock17_EP1"];
DefaultBackpack = "DZ_LargeGunBag_EP1";
DefaultBackpackWeapon = "";
};
Link to comment
Share on other sites

  • 0

So in this i have no M9SD, M4A1, Backpack, Backpack items 

any ideas?

	//Default Loadout
		DefaultMagazines = ["FoodSteakCooked","ItemPainkiller","ItemMorphine","ItemBandage","ItemBandage","ItemBloodbag","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","HandGrenade_west"]
		DefaultWeapons = ["ItemToolbox","ItemCompass","Binocular","ItemMap","ItemHatchet","M9SD","M4A1_AIM_SD_camo"]
		DefaultBackpack = "DZ_ALICE_Pack_EP1";
		DefaultBackpackWeapon = ["ItemTent","PartWheel"];
		
		//Admin Loadout
   // if ((getPlayerUID player) in ["",""]) then {  //Admins: names
	//DefaultMagazines = [];
	//DefaultWeapons = [];
	//DefaultBackpack = "DZ_LargeGunBag_EP1";
	//DefaultBackpackWeapon = "";
	};
Link to comment
Share on other sites

  • 0

So i keep getting the default loadouts backpack...

My selected bag, the gear in it.

the M4A1 and M9SD do not work... All else is as written...

Ideas?

 

        
	//Default Loadout
		DefaultMagazines = ["FoodSteakCooked","ItemPainkiller","ItemMorphine","ItemBandage","ItemBandage","ItemBloodbag","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","HandGrenade_west"]
		DefaultWeapons = ["ItemToolbox","ItemCompass","Binocular","ItemMap","ItemHatchet","M9SD","M4A1_AIM_SD_camo"]
		DefaultBackpack = "DZ_ALICE_Pack_EP1";
		DefaultBackpackWeapon = ["ItemTent","PartWheel"];
		
		//Admin Loadout
   // if ((getPlayerUID player) in ["",""]) then {  //Admins: names
	//DefaultMagazines = [];
	//DefaultWeapons = [];
	//DefaultBackpack = "DZ_LargeGunBag_EP1";
	//DefaultBackpackWeapon = "";
	};
Link to comment
Share on other sites

  • 0

i have 3 versions i'm testing right now on our servers. the normal IF test like in this tutorial, A Nested IF and a case switch that i created myself. so far the nested IF is for some reason working better on higher load than the case switch (which works way better than normal IF). but the nested IF look as it actually works just slightly better than case switch on high load time.

Link to comment
Share on other sites

  • 0

I was wondering if anyone can tell my why my loadout script isn't functioning correctly? Everything looks to be in the right place to me. I know the script is -partly- working because it loads the Default Loadout (Average Joe), and the default loadout ONLY. None of the playerID specific loadouts will load. I've tested them all with my own PlayerID. I've Pasted the code below (I've put "PUIDHERE" as a place holder only for the purposes posting, its NOT in the script)

	//Average Joe Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","ItemWaterbottle","FoodSteakCooked","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov"];
DefaultWeapons = ["Makarov","ItemHatchet_DZE"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";

//Slightly Paranoid Loadout
if ((getPlayerUID player) in ["PUID#HERE","PUID#HERE"]) then {
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemWaterbottle","FoodSteakCooked","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","ItemMorphine"];
	DefaultWeapons = ["ItemHatchet_DZE","revolver_EP1","Itemknife","Remmington870","ItemMatchBox_DZE"];
	DefaultBackpack = "DZ_Assault_Pack_EP1";
	DefaultBackpackWeapon = "";
	};

//Survivalist Loadout
if ((getPlayerUID player) in ["PUID#HERE"]) then {
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemWaterbottle","FoodSteakCooked","15Rnd_W1866_Slug","15Rnd_W1866_Slug","15Rnd_W1866_Slug","ItemPainkiller","ItemMorphine","17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17"];
	DefaultWeapons = ["ItemHatchet_DZE","Glock17","Itemknife","Winchester1866","ItemMatchBox_DZE","ItemMap","ItemToolbox","ItemCrowbar"];
	DefaultBackpack = "DZ_TerminalPack_EP1";
	DefaultBackpackWeapon = "";
	};

//Big Game Hunter Loadout
if ((getPlayerUID player) in ["PUID#HERE"]) then {
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemWaterbottle","FoodSteakCooked","ItemBloodbag","ItemAntibiotic","ItemPainkiller","ItemMorphine","7Rnd_45ACP_1911","7Rnd_45ACP_1911","7Rnd_45ACP_1911","7Rnd_45ACP_1911","5Rnd_762x51_M24","5Rnd_762x51_M24","5Rnd_762x51_M24"];
	DefaultWeapons = ["Colt1911","M24","ItemHatchet_DZE","Itemknife","ItemMatchBox_DZE","ItemMap","ItemToolbox","ItemCrowbar","Binocular","ItemCompass","ItemGPS"];
	DefaultBackpack = "DZ_ALICE_Pack_EP1";
	DefaultBackpackWeapon = "";
	};

//Ultimate Gun-Nut Loadout
if ((getPlayerUID player) in ["PUID#HERE"]) then {
	DefaultMagazines = ["ItemBandage","ItemBandage",ItemBandage","ItemBandage","ItemWaterbottle","FoodSteakCooked","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","ItemBloodbag","ItemAntibiotic","ItemPainkiller","ItemMorphine"];
	DefaultWeapons = ["M9SD","M4A1_AIM_SD_camo","ItemHatchet_DZE","Itemknife","ItemMatchBox_DZE","ItemMap","ItemToolbox","ItemCrowbar","Binocular_Vector","ItemCompass","ItemGPS","ItemEtool"];
	DefaultBackpack = "DZ_British_ACU";
	DefaultBackpackWeapon = "";
	};

P.S  [] ExecVM "Scripts\loadout.sqf"; is correctly in the init.sqf since it loads the custom default loadout. I use Dayz-ST as a host and do not use their loadout tool (I think its bad) so I've left that loadout empty. I'm still using 1.0.3.1 because of issues I'm having with 1.0.4.1

 

Thanks in advance

Link to comment
Share on other sites

  • 0

http://pastebin.com/QeF37sm9

 

Use this case switch instead :) It will still happen from time to time that players spawn without their kit, but it works well. I'm testing a version of nested if checks right now and i've only heard of one time a donator on our servers didn't spawn with his loadout. When i've done some more testing i will show the method i use currently, but if you know how to do nested IF statements, you can create it youself

 

 

remember to remove any Default loadout settings you might have in you init!

 

Also put the load code of the donator script under this part in your init
 

if (!isDedicated) then {
	//Conduct map operations
	0 fadeSound 0;
	waitUntil {!isNil "dayz_loadScreenMsg"};
	dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");

so it looks like this

if (!isDedicated) then {
	//Conduct map operations
	0 fadeSound 0;
	waitUntil {!isNil "dayz_loadScreenMsg"};
	dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
	
	//Custom Loadouts
	[] ExecVM "donation\donatorsLoadout.sqf";

Please note that i have a separate folder for my donation stuff so i use a folder in the root of my mission called "donation" where i load every thing from. Edit to you needs

Link to comment
Share on other sites

  • 0

Still not working for me, less so, in fact, now even the default loadout won't load.

My init.sqf looks like:

//Conduct map operations
	0 fadeSound 0;
	waitUntil {!isNil "dayz_loadScreenMsg"};
	dayz_loadScreenMsg = (localize "STR_AUTHENTICATING");
	
		  //Custom Loadouts
	[] ExecVM "Scripts\Loadouts.sqf";

And I've converted to the format you used:

switch true do {

//Slightly Paranoid Loadout
case ((getPlayerUID player) in ["0","0"]) :
{
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemWaterbottle","FoodSteakCooked","6Rnd_45ACP","6Rnd_45ACP","6Rnd_45ACP","8Rnd_B_Beneli_74Slug","8Rnd_B_Beneli_74Slug","ItemMorphine"];
	DefaultWeapons = ["ItemHatchet_DZE","revolver_EP1","Itemknife","Remmington870","ItemMatchBox_DZE"];
	DefaultBackpack = "DZ_Assault_Pack_EP1";
	DefaultBackpackWeapon = "";
	};

//Survivalist Loadout
case ((getPlayerUID player) in ["0"]) :
{
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemWaterbottle","FoodSteakCooked","15Rnd_W1866_Slug","15Rnd_W1866_Slug","15Rnd_W1866_Slug","ItemPainkiller","ItemMorphine","17Rnd_9x19_glock17","17Rnd_9x19_glock17","17Rnd_9x19_glock17"];
	DefaultWeapons = ["ItemHatchet_DZE","Glock17","Itemknife","Winchester1866","ItemMatchBox_DZE","ItemMap","ItemToolbox","ItemCrowbar"];
	DefaultBackpack = "DZ_TerminalPack_EP1";
	DefaultBackpackWeapon = "";
	};

//Big Game Hunter Loadout
case ((getPlayerUID player) in ["0"]) :
{
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemWaterbottle","FoodSteakCooked","ItemBloodbag","ItemAntibiotic","ItemPainkiller","ItemMorphine","7Rnd_45ACP_1911","7Rnd_45ACP_1911","7Rnd_45ACP_1911","7Rnd_45ACP_1911","5Rnd_762x51_M24","5Rnd_762x51_M24","5Rnd_762x51_M24"];
	DefaultWeapons = ["Colt1911","M24","ItemHatchet_DZE","Itemknife","ItemMatchBox_DZE","ItemMap","ItemToolbox","ItemCrowbar","Binocular","ItemCompass","ItemGPS"];
	DefaultBackpack = "DZ_ALICE_Pack_EP1";
	DefaultBackpackWeapon = "";
	};

//Ultimate Gun-Nut Loadout
case ((getPlayerUID player) in ["0","0","0"]) :
{	// 
	DefaultMagazines = ["ItemBandage","ItemBandage",ItemBandage","ItemBandage","ItemWaterbottle","FoodSteakCooked","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","ItemBloodbag","ItemAntibiotic","ItemPainkiller","ItemMorphine"];
	DefaultWeapons = ["M9SD","M4A1_AIM_SD_camo","ItemHatchet_DZE","Itemknife","ItemMatchBox_DZE","ItemMap","ItemToolbox","ItemCrowbar","Binocular_Vector","ItemCompass","ItemGPS","ItemEtool"];
	DefaultBackpack = "DZ_British_ACU";
	DefaultBackpackWeapon = "";
	};
	
	//Average Joe Loadout
	default
	{
	DefaultMagazines = ["ItemBandage","ItemBandage","ItemWaterbottle","FoodSteakCooked","8Rnd_9x18_Makarov","8Rnd_9x18_Makarov"];
	DefaultWeapons = ["Makarov","ItemHatchet_DZE"];
	DefaultBackpack = "DZ_Patrol_Pack_EP1";
	DefaultBackpackWeapon = "";
	};

};

Is it possible my antihack (using infistar) or another script is breaking it, and how would that be so, since I'm not running anything else that affects player loot or start position (like select spawn)

Link to comment
Share on other sites

  • 0

so delete the // in your "//Ultimate Gun-Nut Loadout" case (the last line shown in the codebox below)

//Ultimate Gun-Nut Loadout
case ((getPlayerUID player) in ["0","0","0"]) :
{	// 

also you are missing a quote symbol in you ultimate package

DefaultMagazines = ["ItemBandage","ItemBandage",ItemBandage",

see the last "ItemBandage"  that is missing a start quote

 

 

and as a side note, you don't need "ItemMap" and "ItemGPS" in the same loadout as the GPS will provide you with a map.

Link to comment
Share on other sites

  • 0

so delete the // in your "//Ultimate Gun-Nut Loadout" case (the last line shown in the codebox below)

//Ultimate Gun-Nut Loadout
case ((getPlayerUID player) in ["0","0","0"]) :
{	// 

also you are missing a quote symbol in you ultimate package

DefaultMagazines = ["ItemBandage","ItemBandage",ItemBandage",

see the last "ItemBandage"  that is missing a start quote

 

 

and as a side note, you don't need "ItemMap" and "ItemGPS" in the same loadout as the GPS will provide you with a map.

Bad ass, thanks. I'm still new to this (about a week or so) and I've never scripted before. I do pretty good usually, but the little crap still gets me from time to time.The busted item was messing the whole script up, thanks. Its all working now.

Link to comment
Share on other sites

  • 0

Still looking for some help here guys,

//Default Loadout
DefaultMagazines = ["FoodSteakCooked","ItemPainkiller","ItemMorphine","ItemBandage","ItemBandage","ItemBloodbag","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","HandGrenade_west"]
DefaultWeapons = ["ItemToolbox","ItemCompass","Binocular","ItemMap","ItemHatchet","M9SD","M4A1_AIM_SD_camo"]
DefaultBackpack = "DZ_ALICE_Pack_EP1";
DefaultBackpackWeapon = ["ItemTent","PartWheel"];

The M9SD and M4A1
Backpack and items in it

do not work. everything else is ok

Link to comment
Share on other sites

  • 0

[Not working - scratch this!]

I haven't tested this as i don't use it myself but the proper way to set the backpack is (i think), as an example:

 

DefaultBackpackWeapon = [[["DMR_DZ","Mk_48_DZ"],[1,1]],[["20Rnd_762x51_DMR","100Rnd_762x51_M240","ItemBloodbag"],[3,3,1]]];

 

to break it up the backbacks inventory is build up by arrays inside arrays. Time to color code the whole thing

 

[[["DMR_DZ","Mk_48_DZ],[1,1]],[["20Rnd_762x51_DMR","100Rnd_762x51_M240","ItemBloodbag],[3,3,1]]]

 

The red array is to encapsule all the data in one array

The green array is Weapon slots

The pink array is magazines slots

 

The first array inside the green array there you set the actual class names of weapons the 2'nd array inside the green array is how many. So the first class name correspond to the first number

The first array inside the pink array there you set the actual class names of magazine items, the 2'nd array inside the pink array is how many. So the first class name correspond to the first number

 

DefaultBackpackWeapon = "";

can ONLY be used for 1 weapon like

DefaultBackpackWeapon = "M4A1_AIM_SD_camo";

 

you can't use magazine items here!

 

and regarding the weapon class name it's case sensetive

 

Well you are missing ';' (semicolon)at the end of "DefaultMagazines" and "DefaultWeapons"

 

so try use this instead

//Default Loadout
DefaultMagazines = ["FoodSteakCooked","ItemPainkiller","ItemMorphine","ItemBandage","ItemBandage","ItemBloodbag","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","HandGrenade_west"];
DefaultWeapons = ["ItemToolbox","ItemCompass","Binocular","ItemMap","ItemHatchet","M9SD","M4A1_AIM_SD_camo"];
DefaultBackpack = "DZ_ALICE_Pack_EP1";
DefaultBackpackWeapon = "";
Link to comment
Share on other sites

  • 0

 

I haven't tested this as i don't use it myself but the proper way to set the backpack is (i think), as an example:

 

DefaultBackpackWeapon = [[["DMR_DZ","Mk_48_DZ"],[1,1]],[["20Rnd_762x51_DMR","100Rnd_762x51_M240","ItemBloodbag"],[3,3,1]]];

 

to break it up the backbacks inventory is build up by arrays inside arrays. Time to color code the whole thing

 

[[["DMR_DZ","Mk_48_DZ],[1,1]],[["20Rnd_762x51_DMR","100Rnd_762x51_M240","ItemBloodbag],[3,3,1]]]

 

The red array is to encapsule all the data in one array

The green array is Weapon slots

The pink array is magazines slots

 

The first array inside the green array there you set the actual class names of weapons the 2'nd array inside the green array is how many. So the first class name correspond to the first number

The first array inside the pink array there you set the actual class names of magazine items, the 2'nd array inside the pink array is how many. So the first class name correspond to the first number

 

 

and regarding the waepon class name it's case sensetive

 

Well you are missing ';' (semicolon)at the end of "DefaultMagazines" and "DefaultWeapons"

 

so try use this instead

//Default Loadout
DefaultMagazines = ["FoodSteakCooked","ItemPainkiller","ItemMorphine","ItemBandage","ItemBandage","ItemBloodbag","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","HandGrenade_west"];
DefaultWeapons = ["ItemToolbox","ItemCompass","Binocular","ItemMap","ItemHatchet","M9SD","M4A1_AIM_SD_camo"];
DefaultBackpack = "DZ_ALICE_Pack_EP1";
DefaultBackpackWeapon = [[[],[]],[["ItemTent","PartWheel"],[1,1]]];

and if it still don't work

//Default Loadout
DefaultMagazines = ["FoodSteakCooked","ItemPainkiller","ItemMorphine","ItemBandage","ItemBandage","ItemBloodbag","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","30Rnd_556x45_StanagSD","HandGrenade_west"];
DefaultWeapons = ["ItemToolbox","ItemCompass","Binocular","ItemMap","ItemHatchet","M9SD","M4A1_AIM_SD_camo"];
DefaultBackpack = "DZ_ALICE_Pack_EP1";
DefaultBackpackWeapon = [];

Welp everything but the backpack weapon works, Thanks for the help!

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;};
Link to comment
Share on other sites

  • 0

Welp everything but the backpack weapon works, Thanks for the help!

Just updated the post regarding the backpack thing. had a look at the code and it does only support one weapon. working on adding some handler to server_playerLogin.sqf so it will write it to the DB when logging in as a new player. will post the solution if i get it to work

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;};

 

unfortunately you can't use the same calls in epoch as in owerwatch

Link to comment
Share on other sites

  • 0

I don't know why but we just can't get this to work. There is no .rpt error what so ever and the .sqf is being called exactly like your example.

To be precisely though: The default loadout works just fine. But for the custom loadouts for specific player there is still the default loadout in 100% of the times.

 

Our SQF looks like this (with proper PlayerIDs of course):

 

//Default Loadout
DefaultMagazines = ["ItemBandage","ItemBandage","ItemPainkiller","ItemWaterbottleBoiled","FoodSteakCooked"];
DefaultWeapons = [ItemFlashlight","ItemMap"];
DefaultBackpack = "DZ_Patrol_Pack_EP1";
DefaultBackpackWeapon = "";


//Donator Loadout
if ((getPlayerUID player) in ["xx","xx","xx","xx"]) then {   //Donators: name1-4
DefaultMagazines = ["ItemBandage","ItemBandage","ItemBandage","ItemBandage","17Rnd_9x19_glock17","17Rnd_9x19_glock17","ItemWaterbottleBoiled","ItemWaterbottleBoiled","FoodSteakCooked","30rnd_9x19_MP5SD"];
DefaultWeapons = ["glock17_EP1","MP5SD","ItemMap","Itemtoolbox"];
DefaultBackpack = "DZ_ALICE_Pack_EP1";
DefaultBackpackWeapon = " ";
};
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...