Не работает object spawner dayz

Не работает object spawner dayz

Hi, i have made a billboard for my server. i testet ist and i can spawn it with the community online tool on my server without any problems.
Now i did try to place it on the map with the offline tool and extract the data to the init.c file of my server. i did try a few diferent version but i still get this error:

SCRIPT (E): @»$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c,4″: Undefined function ‘CreateObject_WIP’
SCRIPT (E): @»$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c,4″: Unknown type ‘auto’
SCRIPT (E): @»$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c,4″: Error in parameters
SCRIPT (E): @»$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c,5″: Can’t find variable ‘obj’
SCRIPT (E): @»$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c,6″: Can’t find variable ‘obj’
SCRIPT (E): @»$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c,7″: Can’t find variable ‘obj’
SCRIPT (E): @»$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c,8″: Can’t find variable ‘obj’
SCRIPT (E): @»$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c,9″: Can’t find variable ‘obj’
SCRIPT (E): @»$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c,10″: Can’t find variable ‘obj’
SCRIPT (E): @»$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c,11″: Can’t find variable ‘obj’
SCRIPT (E): @»$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c,11″: Can’t find variable ‘obj’
SCRIPT (E): Can’t compile mission init script’!

the init.c looks like this:

//Spawn helper function
void SpawnObject( string type, vector position, vector orientation )
<
auto obj = GetGame().CreateObject_WIP( type, position, ECE_CREATEPHYSICS );
obj.SetFlags( EntityFlags.STATIC, false );
obj.SetPosition( position );
obj.SetOrientation( orientation );
obj.SetOrientation( obj.GetOrientation() ); //Collision fix
obj.Update();
obj.SetAffectPathgraph( true, false );
if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );
>

void main()
<
//Your custom spawned objects
SpawnObject( «land_billboard_1_ml», «6423.720215 9.570000 2713.739990», «-76.000000 0.000000 0.000000» );
SpawnObject( «land_billboard_1_ml», «10495.272461 5.950000 2308.802002», «142.999985 0.000000 0.000000» );

//INIT WEATHER BEFORE ECONOMY INIT————————

any help for my problem? Whay doesnt the server start and how i can fix it?

Источник

Не работает object spawner dayz

EURU4170, 13.10 2021 13:30:38
NULL pointer to instance
Class: ‘JMModuleManager’
Function: ‘

Runtime mode
CLI params: config serverDZ.cfg.active port 2602 profiles profiles adminlog freezecheck dologs mod @CF;@Community-Online-Tools;

EURU4170, 13.10 2021 13:30:38
NULL pointer to instance
Class: ‘COTModule’
Function: ‘

EURU4170, 13.10 2021 13:30:38
NULL pointer to instance
Class: ‘JMPlayerModule’
Function: ‘

from the server script.log. happens right after every start of the server, it doesnt crash the server for me, just errors

SCRIPT (E): NULL pointer to instance
Class: ‘JMModuleManager’
Function: ‘

SCRIPT (E): NULL pointer to instance
Class: ‘COTModule’
Function: ‘

SCRIPT (E): NULL pointer to instance
Class: ‘JMPlayerModule’
Function: ‘

why crash . help

NULL pointer to instance
Class: ‘JMModuleManager’
Function: ‘

NULL pointer to instance
Class: ‘COTModule’
Function: ‘

NULL pointer to instance
Class: ‘JMPlayerModule’
Function: ‘

@Forge I’ve tried, but it doesn’t work. I would suggest you use DayZ Editor if you want to add/remove buildings or loot spawns.

DayZ Editor and Community Online Tools Should NOT be used together, your game will break. If you want help getting them both working send me a dm.

Can confirm still working now. Only thing to note is that the *.json file referenced in the install instructions is «auto» generated now and is a `hash` of your steam id.

So best to start the server.
Join it and let it create the file for you.
Shut server down.
Go to the players folder as detailed in instructions.
File will be there but look named to be something along lines of «asdvlkjhngaper;-6425368qh3n6089q256yb5q4by5.json

File should now contain a role of «everyone».
Just change that to admin.
Restart your server and your done. All worked fine for me . All functions work well.

I can’t seem to get this working with OmegaManager. I followed the steps prior to using OmegaManager and it worked great. However the Guides for OmegaManager doesn’t seem to be as fourth Coming.

Читайте также:  После замены замка зажигания не работает автозапуск приора

I’ve gotten to creating the Permissions and COT folder in E:\dayz\servers\0\profiles
And creating the Json in Player folder. and the Text file in permissions folder.

I’ve previously used COT with a Bat Script setup and that worked. Can’t seem to find a reasonable guide or information for OmegaManager and the Information in the Mod Description doesn’t seem much different, yet isn’t working.

Let me guess. Anarchy.

They use a mod called «Invisible Clothing».

Источник

Подпишитесь, чтобы загрузить
Community-Online-Tools

There may be some bugs. If you do find some, report them in them on my GitHub here [github.com]

This is the first set of GUI based admin tools created by the developers of DayZ Community Offline Mode. This makes use of a modular design which allows other mods such as DayZ Expansion or DayZ HypeTrain to add their own menu’s for admins to have further control of their servers. Community Online Tools allow you to teleport players, set player health, blood, shock, change the weather of the server, and even spawn in vehicles. Also, this mod allows you to set the aiming mode for players to the old 0.62 system if you, the server admin wishes to use it.

  1. Install the mod using your preferred method for installing mods. I recommend using a server manager such as OmegaManager.

Launch the server once and then after it has fully launched turn it back off.

Locate the profiles folder used for the server. If using OmegaManager this folder would be called ‘profiles’ otherwise you can find what it is called by checking the command line parameter ‘-profiles’ and seeing what that is set to. Once in that folder enter the ‘PermissionsFramework’ folder and then enter the ‘Players’ folder.

Inside that folder create a .json file with your GUID/SteamID. Inside of that JSON file paste the contents of this pastebin.

Congratulations, you have successfully installed COT. You can assign roles to others while in-game.

Webhooks can be configured like the following https://pastebin.com/AR3Bk9E5 where there can be multiple connections. Say you want players to see when the weather is changing but want another channel for every admin action to be logged in or you want this information to be logged across multiple discord servers.

Y — Open the toolbar menu
INSERT — Toggle free camera Note: This teleports your player to the position you looked at when exiting out of it
H — This teleports you to the position you are looking at
END — Toggles Community Online Tools keybindings on/off

— Ability to recolour any menu to a users choice
— Keyframing for the Cinematic Camera
— Create, delete and edit roles within the game

Monetization is allowed on your servers but it would be nice that a small percentage is sent as a donation. This is not enforced but would be greatly appreciated.

Источник

Не работает object spawner dayz

add as attachments or something like this //Light Gunner
itemEnt = player.GetInventory().CreateInInventory(«AthleticShoes_Black»); itemBs = ItemBase.Cast(itemEnt);
pGun = player.GetInventory().CreateInInventory(«MP5K»); itemBs = ItemBase.Cast(itemEnt); // added the gun before any backpacks so attachments would be added to the gun and not in the players inventory
itemEnt = player.GetInventory().CreateInInventory(«MP5_RailHndgrd»); itemBs = ItemBase.Cast(itemEnt); //doing this before adding inventory spaces ensured the attachment was on the gun by default
itemEnt = player.GetInventory().CreateInInventory(«MP5k_StockBttstck»); itemBs = ItemBase.Cast(itemEnt); // same thing with the buttstock for the gun
itemEnt = player.GetInventory().CreateInInventory(«MP5_Compensator»); itemBs = ItemBase.Cast(itemEnt); // and the compensator
itemEnt = player.GetInventory().CreateInInventory(«BoonieHat_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TrackSuitJacket_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TrackSuitPants_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt); // note that when spawnin players with mags, they are full by default
player.SetQuickBarEntityShortcut(itemEnt, 1, true);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt);
player.SetQuickBarEntityShortcut(itemEnt, 2, true);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt);
player.SetQuickBarEntityShortcut(itemEnt, 3, true);
itemEnt = player.GetInventory().CreateInInventory(«Ammo_9x19»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«HighCapacityVest_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TacticalBaconCan_Opened»); itemBs = ItemBase.Cast(itemEnt);

Читайте также:  Катушка для удочки сломалась

player.SetQuickBarEntityShortcut(pGun, 0, true);
break;

What your code look like at the moment?

What your code look like at the moment?

https://pastebin.com/TVe8SjzM
basically it’s just a bunch of
«GetInventory().CreateInInventory(‘»);»
for everything, clothes, items, etc. Before everything I have «player.RemoveAllItems();» to hopefully take everything out. I’ve also removed the tactical shirt. So basically I’m wondering how to add stuff in the jacket and vest, and if I can’t, how can I spawn stuff around the player?
One more question, is there a way to add multiples of something? Like instead of 3 lines putting a pistol mag in the inventory can I do something like «x.quantity(3);»?

Initially looking at this all the items just end up in the inventory correct ??

you also appear to have some excess lines such as:

where if you just removed the rand = Math from the first set of foods you would not need the second set and have it read:

However the above FoodArray will only pick from one of the food items.

Note: i’m only glancing over your init file right now as i’m still working so forgive any formatting or typos i’ve made in my examples.

Edit: altered typo in rndindex definitions.

add as attachments or something like this //Light Gunner
itemEnt = player.GetInventory().CreateInInventory(«AthleticShoes_Black»); itemBs = ItemBase.Cast(itemEnt);
pGun = player.GetInventory().CreateInInventory(«MP5K»); itemBs = ItemBase.Cast(itemEnt); // added the gun before any backpacks so attachments would be added to the gun and not in the players inventory
itemEnt = player.GetInventory().CreateInInventory(«MP5_RailHndgrd»); itemBs = ItemBase.Cast(itemEnt); //doing this before adding inventory spaces ensured the attachment was on the gun by default
itemEnt = player.GetInventory().CreateInInventory(«MP5k_StockBttstck»); itemBs = ItemBase.Cast(itemEnt); // same thing with the buttstock for the gun
itemEnt = player.GetInventory().CreateInInventory(«MP5_Compensator»); itemBs = ItemBase.Cast(itemEnt); // and the compensator
itemEnt = player.GetInventory().CreateInInventory(«BoonieHat_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TrackSuitJacket_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TrackSuitPants_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt); // note that when spawnin players with mags, they are full by default
player.SetQuickBarEntityShortcut(itemEnt, 1, true);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt);
player.SetQuickBarEntityShortcut(itemEnt, 2, true);
itemEnt = player.GetInventory().CreateInInventory(«Mag_MP5_30Rnd»); itemBs = ItemBase.Cast(itemEnt);
player.SetQuickBarEntityShortcut(itemEnt, 3, true);
itemEnt = player.GetInventory().CreateInInventory(«Ammo_9x19»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«HighCapacityVest_Black»); itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory(«TacticalBaconCan_Opened»); itemBs = ItemBase.Cast(itemEnt);

player.SetQuickBarEntityShortcut(pGun, 0, true);
break;

I don’t see where you define pGun🤔🤔🤔🤔

So i’ve taken a more in depth look at your init.c file and this is what i’m spotting.

I first added clothes, backpacks, a vest

you have the right idea with player.RemoveAllItems(); just in the wrong place ( at least i see it as being in the wrong place as you was adding items just to remove them with that ).

If you use it here instead:

That will remove the random generated ones / chosen clothing.

On to the clothing you want, create a line space after removing the clothes and create your outfit in the same way as you are inventory items ( if you want the option of putting specific items into a backpack or something you will need to alter the way you create / add the items ).

Just adding clothing without the option of adding loot to a specific piece of clothing do:

Edit: I can help further if you would like just add me.

So I’ve taken a more in depth look at your init.c file and this is what i’m spotting.

Читайте также:  Не могу настроить gran turismo 4

Thank you Smokey, I have programmed in c for a year or two now and have taken a year of comp sci in college, I just don’t know the classes and how everything is defined in DZ. Everything you’ve said makes sense and I think I have the basic functions down for now. If you know any useful functions, or ones you find yourself using a lot I would appreciate it if you could post them, I might find them useful, and even if I don’t someone else will.

EDIT: another question, can the EntityAI class be used to attach objects to guns, such as
«EntityAI g1 = . («FNX45″);»
«itemEnt = g1. («PistolSuppressor»);»
or is there another way of doing this? Unless you’re on right now I’m about to figure it out for myself but it’s useful to have someone who already knows lol. Thanks again, by the way. You’ve been a great help.

This is my new code, everything is working great! I did need the «remove items» inside the if condition, for some reason when its outside where you suggested it removes all items AFTER they have been placed on the character (I spawned with no items or clothes when using your suggestion, commented the line out and it worked but I had default clothes, so I moved it to the if condition and it worked). The EntityAI does work with guns, belts, everything and it’s great, but if you use it with a magazine in a gun it seems to either despawn it or have no ammo, so that’s staying out for now.

This is my new code, everything is working great! I did need the «remove items» inside the if condition, for some reason when its outside where you suggested it removes all items AFTER they have been placed on the character (I spawned with no items or clothes when using your suggestion, commented the line out and it worked but I had default clothes, so I moved it to the if condition and it worked). The EntityAI does work with guns, belts, everything and it’s great, but if you use it with a magazine in a gun it seems to either despawn it or have no ammo, so that’s staying out for now.

I will have a look at your new file shortly, the weekend is here and my attention can be split though so will take a while haha.

When it comes to adding magazines just adding them as an attachment or in any simple way bugs out the weapon and / or magazine and I suspect you also need to add ammo to the chamber for that weapon ( I was investigating this yesterday but have no solution as of yet ).

EDIT: another question, can the EntityAI class be used to attach objects to guns, such as
«EntityAI g1 = . («FNX45″);»
«itemEnt = g1. («PistolSuppressor»);»
or is there another way of doing this? Unless you’re on right now I’m about to figure it out for myself but it’s useful to have someone who already knows lol. Thanks again, by the way. You’ve been a great help.

What I have been doing is this:

EntityAI G1 = player.GetInventory().CreateInInventory(«»);

When it comes to an attachment that requires another item ( such as a light needing a battery ) create a new class with EntityAI.

Defining a class should allow for attachment of the likes of chemlights and radios to backpacks, granades to vests and even NVGs and lights, with batteries to helmets.

Источник

Оцените статью