Welcome to The Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies and more


Create Custom Spawn Loadouts


Recommended Posts

Step 1: Open phpmyadmin and go to your database for the map you are using.

 

Step 2: Click on cust_loadout. This is where you will create the custom loadout. This page is all about creating a inventory, a backpack loadout, and a skin the player will spawn with.

 

Step 3: Click insert and fill out the values.

 

-ID: this is a number for organization only. I prefer to use the first four digits of the player ID this custom kit is for. Something you will use later is this number plus a player ID.

 

-Inventory: [["M4A3_CCO_EP1","M9SD","Binocular","Binocular_Vector","ItemGPS","ItemMap","ItemCompass","ItemKnife","ItemHatchet","ItemMatchbox","ItemToolbox"],["30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","30Rnd_556x45_Stanag","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","15Rnd_9x19_M9SD","ItemBandage","ItemBandage","ItemBandage","ItemBandage"]] *You will have to know proper arma 2 classnames and coding to create custom kits. Since I am so nice I have included a link to a inventory generator. It is a simple program once installed will allow custom kits to be created with ease. NOTE: Make sure to check the classnames. Such as the waterbottle. The inventory generator due to human error spells it WATTERBOTTLE with two T's in water so make sure to fix that before putting it in here. http://www.2shared.com/file/At7TY6oS/Da ... rator.html is a safe link to a safe download used many times by my group. This is the disclaimer given to my donators

Please note DO NOT PUT weapons in backpack. Another thing to note. Add your primary and secondary weapon first, then the ammo, then the inventory stuff, then the toolbelt, and lastly all your backpack items. Helps make sure the code is generated properly. Thank You.

 

-Backpack: ["DZ_Backpack_EP1",[[],[]],[["FoodCanBakedBeans","ItemBloodbag","ItemMorphine","ItemPainkiller","ItemWaterBottle","ItemWire"],[3,2,2,2,3,1]]] *Once again just use the loadout generator or learn the classnames and syntax to build your own loadout.

 

-Model: Survivor2_DZ is the standard player model. You can use the Sniper1_DZ and other classnames but Survivor2_DZ works the best without issue.

 

Step 4: Click cust_loadout_profile and then click on insert.

-cust_loadout_id will be the ID number you used previously

-unique_id will be the player's unique ID which can be found in the Arma 2 main menu under player profiles. You will need the number or it may not work.

 

Step 5: Have them test it. Should spawn fully geared without a restart or anything once you have it all set up. Once you get the hang of it and make them generate the codes it takes seconds to create a new profile. This works 99% of the time with 1% hiccup and they spawn with default gear. If people complain it isn't working you need to make sure the code is properly generated following my guidelines and that the player ID is correct. Majority of the time it will be just a hiccup. Especially if it worked previously.

 

Best of luck. Use these pics to assist you.

step1.png

step2.png

step3.png

step4.png

Share this post


Link to post
Share on other sites

  • 1 month later...

I have done this for multiple people giving almost everybody a different loadout and now all of a sudden 2 of the custom loadouts are not working after they have been working for a few weeks?

Share this post


Link to post
Share on other sites

  • 9 months later...

I dont have this option in my phpadmin. You where it says recent tables? You see how you have the scroll menu under that? Well I don't have that second scroll menu. I only have the one on the top that says recent tables. Is there a reason for that?

Share this post


Link to post
Share on other sites

I dont have this option in my phpadmin. You where it says recent tables? You see how you have the scroll menu under that? Well I don't have that second scroll menu. I only have the one on the top that says recent tables. Is there a reason for that?

Share this post


Link to post
Share on other sites

  • 1 month later...

So I copied those perfect, added my own items, but keep getting this error "SQL Error (1064). You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near [["SCAR_H_CQC_CCO","UZI_SD_EP1","Binocular_Vector","ItemRadio","ItemGPS","ItemToolbox","ItemEtool","ItemCrowbar"],["20Rnd_762x51_B_SCAR","30Rnd_9x19_UZI_SD"]] at line 1? Should this not work

Share this post


Link to post
Share on other sites

So I copied those perfect, added my own items, but keep getting this error "SQL Error (1064). You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near [["SCAR_H_CQC_CCO","UZI_SD_EP1","Binocular_Vector","ItemRadio","ItemGPS","ItemToolbox","ItemEtool","ItemCrowbar"],["20Rnd_762x51_B_SCAR","30Rnd_9x19_UZI_SD"]] at line 1? Should this not work

Share this post


Link to post
Share on other sites

This is how I added my custom and donator loadouts. Its very easy as long as you follow the directions.

 

 

 

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.

Share this post


Link to post
Share on other sites

This is how I added my custom and donator loadouts. Its very easy as long as you follow the directions.

 

 

 

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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...