Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

JmB314

Dayz Init.c modification

Recommended Posts

Good morning all,

I have several problems to modify my Init.c file

1- I want to place a full stuf Glock19 in the military belt holster (no problem for the knife in the knife holder), But the fact of assembling all the elements of the glock19 (Mag, suppresor, viewfinder, TTRlight + Pile9v) makes attachment impossible,

and even the glock don't spawn!

 

Code:<EntityAI mbelt = player.GetHumanInventory().CreateInInventory("MilitaryBelt");

mbelt.GetInventory().CreateAttachment("Canteen");

mbelt.GetInventory().CreateAttachment("NylonKnifeSheath");

mbelt.GetInventory().CreateAttachment("CombatKnife");

mbelt.GetInventory().CreateAttachment("PlateCarrierHolster");

EntityAi gun = player.GetInventory().CreateAttachment("Glock19");

gun.GetInventory().CreateAttachment("Mag_Glock_15Rnd");

gun.GetInventory().CreateAttachment("PistolSuppressor");

gun.GetInventory().CreateAttachment("TLRLight");

EntityAI optic_attach = gun.GetInventory().CreateAttachment("FNP45_MRDSOptic");

optic_attach.GetInventory().CreateAttachment("Battery9V");>

2-I want to assemble a CZ257 with options (Mag, Optic) and place it on the player's shoulder. Is there a speciale code for this location?

3- I want to assign him a bag and place objects in it, not in the clothes.

Can someone help me?

Thanks

 

Edited by JmB314
RESOLVED

Share this post


Link to post
Share on other sites

An idea.

Create in "cfgspawnabletypes.xml" an item glock_complete, for exemple, with all accessories added and inserte this item your init.c

I make this in others circunstances, addeding m4 full in cars, and works fine.

Sorry for my bad english.

Share this post


Link to post
Share on other sites

×