[OPEN] How can I change my init.c SpawnObject items into a pbo instead of in the init.c

Karinna

New Member
Hi All,
I have seen mod packs for bridges etc. as .pbo style mod packs

I have all of my SpawnObject items in my init.c file and would like to remove them from init.c and turn them into a mod.

I have got a template for the layout of the .pbo

scripts/5_Mission/myspawnlist.c

But I need to know how to construct the config.cpp

There does not seem to be much info when I search google on the subject

Thanks all!
 
Last edited:

ALKINDA

Valued Member!
heya

Step1: you can put at the top of you init.c this.

Code:
#include "$CurrentDir:\\mpmissions\\dayzOffline.chernarusplus\\map_addons\\YOURMAPSPAWNITEMS.c"

but ofcourse change the directory to where your file is.


hereis a sample of YOURMAPSPAWNITEMS.c
Code:
void YOURMAPSPAWNITEMS()
{
SpawnObject( "bldr_rock_monolith1", "14760.700195 34.657902 13322.099609", "0.000000 0.000000 0.000000" );
};
notice the void is named YOURMAPSAWNITEMS, needs to reference what is put in void main() in init, which is below.

Step2: inside init.c go to
Code:
void main()
{

    //INIT WEATHER BEFORE ECONOMY INIT------------------------
    Weather weather = g_Game.GetWeather();


Step3: just under the
Code:
void main()
{

insert
Code:
YOURMAPSPAWNITEMS();

you should then save and restart server, if you want loot there ask.
 
Top