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
Постоянная ошибка в краш логе, почитал, что это связано с кастомным сетом, но не могу понять в чем проблема
Приложил init.c
#include "$CurrentDir:mpmissions\regular.namalsk\CustomSpawnPlayerConfig\Script.c" #include "$CurrentDir:mpmissions\regular.namalsk\CustomSpawnPlayerConfig\Sets.c" #include "$CurrentDir:mpmissions\regular.namalsk\spawn_buildings.c" ref CustomSpawnPlayerConfig My_Custom_Spawn_Parameters = new CustomSpawnPlayerConfig(); ref StartSetsPlayersConfig StartSetsPlayers = new StartSetsPlayersConfig(); void main() { CreateHive(); GetHive().InitOffline(); int year, month, day, hour, minute; GetGame().GetWorld().GetDate( year, month, day, hour, minute ); if ( ( month < 11 ) || ( month >= 11 ) ) { year = 2022; month = 11; day = 1; GetGame().GetWorld().SetDate( year, month, day, hour, minute ); } SpawnBering(); SpawnAero(); SpawnSkat(); SpawnTara(); SpawnDomiki(); SpawnSaw(); PrisonMilitary(); //GetCEApi().ExportProxyData( "6500 0 6500", 16000); GetGame().GetCallQueue(CALL_CATEGORY_SYSTEM).CallLater(My_Custom_Spawn_Parameters.Read_Update_Config, 120000, true); }; class CustomMission: MissionServer { override void OnInit() { super.OnInit(); // this piece of code is recommended otherwise event system is switched on automatically and runs from default values // comment this whole block if NOT using Namalsk Survival if ( m_EventManagerServer ) { // enable/disable event system, min time between events, max time between events, max number of events at the same time m_EventManagerServer.OnInitServer( true, 3600, 5400, 1 ); // registering events and their probability m_EventManagerServer.RegisterEvent( Aurora, 0.02 ); m_EventManagerServer.RegisterEvent( Blizzard, 0.02 ); // МЕТЕЛЬ m_EventManagerServer.RegisterEvent( ExtremeCold, 0.02 ); // ЭКСТРЕМАЛЬНЫЙ ХОЛОД m_EventManagerServer.RegisterEvent( Snowfall, 0.02 ); // СНЕЖНАЯ БУРЯ m_EventManagerServer.RegisterEvent( EVRStorm, 0.10 ); // ВЫБРОС m_EventManagerServer.RegisterEvent( HeavyFog, 0.02 ); // СИЛЬНЫЙ ТУМАН } } 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) { pos = My_Custom_Spawn_Parameters.Load_And_Check_Spawnpoints(identity, pos); characterName = My_Custom_Spawn_Parameters.Load_And_Check_SpawnSkin_Player(identity, 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" ); My_Custom_Spawn_Parameters.Load_And_Check_StartLoadout(player); } }; Mission CreateCustomMission(string path) { return new CustomMission(); };
Пожалуйста, Войдите или Зарегистрируйтесь, чтобы увидеть это: Вложение.
Share this post
Link to post
Share on other sites