NEW! Servers for GTA V (FiveM).. Use Coupon SPOOK, take 20% off Click here to order now at SurvivalServers.com
Difference between revisions of "Setting up Custom Loadout"
Jump to navigation
Jump to search
Share your opinion
(Created page with "== Setting up a custom loadout == Before we proceed with setting up custom loadouts. You will want to first head to the following area for the classnames <br> https://github....") |
|||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
:2. Log into your FTP client. ([https://survivalservers.com/wiki/index.php?title=FTP_Access Info here for FTP]) | :2. Log into your FTP client. ([https://survivalservers.com/wiki/index.php?title=FTP_Access Info here for FTP]) | ||
:3. Head into the following directory: /mpmissions/dayzOffline.chernarusplus | :3. Head into the following directory: /mpmissions/dayzOffline.chernarusplus | ||
− | :4. Use Notepad++ to edit the init.c file within the above directory. | + | :4. Use [https://filehippo.com/download_notepad/ Notepad++] to edit the init.c file within the above directory. |
::::*Look for the following area: | ::::*Look for the following area: | ||
− | <pre> itemTop = player.FindAttachmentBySlotName("Body"); | + | <pre> override void StartingEquipSetup(PlayerBase player, bool clothesChosen) |
+ | { | ||
+ | /* | ||
+ | player.RemoveAllItems(); | ||
+ | |||
+ | EntityAI item = player.GetInventory().CreateInInventory(topsMissionArray.GetRandomElement()); | ||
+ | EntityAI item2 = player.GetInventory().CreateInInventory(pantsArray.GetRandomElement()); | ||
+ | EntityAI item3 = player.GetInventory().CreateInInventory(shoesArray.GetRandomElement()); | ||
+ | */ | ||
+ | EntityAI itemTop; | ||
+ | EntityAI itemEnt; | ||
+ | ItemBase itemBs; | ||
+ | float rand; | ||
+ | |||
+ | itemTop = player.FindAttachmentBySlotName("Body"); | ||
if ( itemTop ) | if ( itemTop ) | ||
Line 19: | Line 33: | ||
SetRandomHealth(itemEnt); | SetRandomHealth(itemEnt); | ||
− | itemEnt = | + | itemEnt = player.GetInventory().CreateInInventory("MP5K"); |
− | + | itemBs = ItemBase.Cast(itemEnt); | |
− | + | ||
− | itemEnt = itemTop.GetInventory().CreateInInventory(" | + | itemEnt = itemTop.GetInventory().CreateInInventory("RoadFlare"); |
SetRandomHealth(itemEnt); | SetRandomHealth(itemEnt); | ||
− | itemEnt = itemTop.GetInventory().CreateInInventory(" | + | itemEnt = itemTop.GetInventory().CreateInInventory("CombatKnife"); |
SetRandomHealth(itemEnt); | SetRandomHealth(itemEnt); | ||
+ | |||
+ | itemEnt = player.GetInventory().CreateInInventory("AssaultBag_Green"); | ||
+ | itemBs = ItemBase.Cast(itemEnt); | ||
} | } | ||
Latest revision as of 20:39, 16 December 2018
Setting up a custom loadout
Before we proceed with setting up custom loadouts. You will want to first head to the following area for the classnames
https://github.com/ravmustang/DayZ_SA_ClassName_Dump *thanks to ravmustang*
- 1. Bring down the server by hitting stop on the panel
- 2. Log into your FTP client. (Info here for FTP)
- 3. Head into the following directory: /mpmissions/dayzOffline.chernarusplus
- 4. Use Notepad++ to edit the init.c file within the above directory.
- Look for the following area:
override void StartingEquipSetup(PlayerBase player, bool clothesChosen) { /* player.RemoveAllItems(); EntityAI item = player.GetInventory().CreateInInventory(topsMissionArray.GetRandomElement()); EntityAI item2 = player.GetInventory().CreateInInventory(pantsArray.GetRandomElement()); EntityAI item3 = player.GetInventory().CreateInInventory(shoesArray.GetRandomElement()); */ EntityAI itemTop; EntityAI itemEnt; ItemBase itemBs; float rand; itemTop = player.FindAttachmentBySlotName("Body"); if ( itemTop ) { itemEnt = itemTop.GetInventory().CreateInInventory("Rag"); if ( Class.CastTo(itemBs, itemEnt ) ) itemBs.SetQuantity(4); SetRandomHealth(itemEnt); itemEnt = player.GetInventory().CreateInInventory("MP5K"); itemBs = ItemBase.Cast(itemEnt); itemEnt = itemTop.GetInventory().CreateInInventory("RoadFlare"); SetRandomHealth(itemEnt); itemEnt = itemTop.GetInventory().CreateInInventory("CombatKnife"); SetRandomHealth(itemEnt); itemEnt = player.GetInventory().CreateInInventory("AssaultBag_Green"); itemBs = ItemBase.Cast(itemEnt); } rand = Math.RandomFloatInclusive(0.0, 1.0); if ( rand < 0.25 ) itemEnt = player.GetInventory().CreateInInventory("SodaCan_Cola"); else if ( rand > 0.75 ) itemEnt = player.GetInventory().CreateInInventory("SodaCan_Spite"); else itemEnt = player.GetInventory().CreateInInventory("SodaCan_Pipsi"); SetRandomHealth(itemEnt); rand = Math.RandomFloatInclusive(0.0, 1.0); if ( rand < 0.35 ) itemEnt = player.GetInventory().CreateInInventory("Apple"); else if ( rand > 0.65 ) itemEnt = player.GetInventory().CreateInInventory("Pear"); else itemEnt = player.GetInventory().CreateInInventory("Plum"); SetRandomHealth(itemEnt); }
- 5. From there you will want to grab the new classnames from the link listed at the top of the page. Simply change the
current list out with the new items you wish to have or copy the code line and create a new item to add onto the list.
Do note however that the inventory can only hold so much.
itemEnt = itemTop.GetInventory().CreateInInventory("Battery9V"); SetRandomHealth(itemEnt);
- 6. Once you have made your edits simply save and re upload to the FTP client.
- 7. Start DayZ Standalone back online and join the server
- Do note that you will only get these items when starting a fresh character
- This page will be updated more as time goes on.
Share your opinion