Need help?
Create a topic in the appropriate section
Don't write everything in the chat!Take a look at the marketplace
There you can buy
everything related to game serversDon't want a ban?
Please read our rules
Don't disturb the order!Sell or buy?
Use services of the guarantor
We will make your deal safe



- 0
-
Our picks
Добрый вечер
Буду в вкратце, на смотрелся различных видео и запутался.
Создаю сервер. Отрисовал дополнительные объекты типо тиса и нового алтаря. В Dayz Editor
Как теперь правильно за скриптить кординаты и выставить их на сервер ?
Вы извините я конечно же попытался за скриптить с ютуба взял скрипт
#define DISABLE_PERSISTENCY
#include "$CurrentDir:Missions\\DayZCommunityOffline.ChernarusPlus\\core\\orig1C.c"
//Spawn helper function
void SpawnObject( string type, vector position, vector orientation )
{
auto obj = GetGame().CreateObject( type, position );
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 );
}
Mission CreateCustomMission(string path)
{
if ( GetGame().IsServer() && GetGame().IsMultiplayer() )
return new CommunityOfflineServer();
return new CommunityOfflineClient();
}
void main()
{//orig1C
далее
Json фаил я тоже прописал. но в и итогде выдает ошибку
DESKTOP-VUQEGD6, 09.05 2023 01:04:29
Can't compile mission init script'!
$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c(3): Can't find file '$CurrentDir:Missions//DayZCommunityOffline.ChernarusPlus//orig1C.c'
Runtime mode
CLI params: config serverDZ.cfg port 2302 cpuCount 4 dologs adminlog netlog freezecheck mod
------------------------------------
DESKTOP-VUQEGD6, 09.05 2023 01:04:53
JSON ERROR:
Missing a comma or ']' after an array element.
Function: 'Error'
Stack trace:
scripts/1_Core/proto\endebug.c:92
scripts/3_Game/tools\jsonfileloader.c:29
scripts/3_Game/cfggameplayhandler.c:61
scripts/5_Mission/mission\missionserver.c:78
JM/CF/Scripts/5_Mission/communityframework\mission\missionserver.c:29
TM/Trader/scripts/5_Mission/mission\missionserver.c:60
VPPAdminTools/5_Mission/vppadmintools\missionserver.c:38
мой init.
#define DISABLE_PERSISTENCY
#include "$CurrentDir:Missions\\DayZCommunityOffline.ChernarusPlus\\orig1C.c"
void main()
{
//INIT ECONOMY--------------------------------------
Hive ce = CreateHive();
if ( ce )
ce.InitOffline();
//DATE RESET AFTER ECONOMY INIT-------------------------
int year, month, day, hour, minute;
int reset_month = 9, reset_day = 20;
GetGame().GetWorld().GetDate(year, month, day, hour, minute);
if ((month == reset_month) && (day < reset_day))
{
GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
}
else
{
if ((month == reset_month + 1) && (day > reset_day))
{
GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
}
else
{
if ((month < reset_month) || (month > reset_month + 1))
{
GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
}
}
}
}
{
void SetRandomHealth(EntityAI itemEnt)
{
if ( itemEnt )
{
float rndHlt = Math.RandomFloat( 0.45, 0.65 );
itemEnt.SetHealth01( "", "", rndHlt );
}
}
override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
{
Entity playerEnt;
playerEnt = GetGame().CreatePlayer( identity, characterName, pos, 0, "NONE" );
Class.CastTo( m_player, playerEnt );
GetGame().SelectPlayer( identity, m_player );
return m_player;
}
override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
{
EntityAI itemClothing;
EntityAI itemEnt;
ItemBase itemBs;
float rand;
itemClothing = player.FindAttachmentBySlotName( "Body" );
if ( itemClothing )
{
SetRandomHealth( itemClothing );
itemEnt = itemClothing.GetInventory().CreateInInventory( "BandageDressing" );
if ( Class.CastTo( itemBs, itemEnt ) )
itemBs.SetQuantity( 2 );
string chemlightArray[] = { "Chemlight_White", "Chemlight_Yellow", "Chemlight_Green", "Chemlight_Red" };
int rndIndex = Math.RandomInt( 0, 4 );
itemEnt = itemClothing.GetInventory().CreateInInventory( chemlightArray[rndIndex] );
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 );
}
itemClothing = player.FindAttachmentBySlotName( "Legs" );
if ( itemClothing )
SetRandomHealth( itemClothing );
itemClothing = player.FindAttachmentBySlotName( "Feet" );
}
};
Mission CreateCustomMission(string path)
{
return new CustomMission();
}
Share this post
Link to post
Share on other sites