Sancezz063 в стандартном init
void main()
{
Hive ce = CreateHive();
if ( ce )
ce.InitOffline();
Weather weather = g_Game.GetWeather();
weather.GetOvercast().SetLimits( 0.0 , 1.0 );
weather.GetRain().SetLimits( 0.0 , 1.0 );
weather.GetFog().SetLimits( 0.0 , 0.25 );
weather.GetOvercast().SetForecastChangeLimits( 0.5, 0.8 );
weather.GetRain().SetForecastChangeLimits( 0.1, 0.3 );
weather.GetFog().SetForecastChangeLimits( 0.05, 0.10 );
weather.GetOvercast().SetForecastTimeLimits( 3600 , 3600 );
weather.GetRain().SetForecastTimeLimits( 300 , 300 );
weather.GetFog().SetForecastTimeLimits( 3600 , 3600 );
weather.GetOvercast().Set( Math.RandomFloatInclusive(0.0, 0.3), 0, 0);
weather.GetRain().Set( Math.RandomFloatInclusive(0.0, 0.2), 0, 0);
weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.1), 0, 0);
weather.SetWindMaximumSpeed(30);
weather.SetWindFunctionParams(0.1, 1.0, 50);
}
class CustomMission: MissionServer
{
void SetRandomHealth(EntityAI itemEnt)
{
int rndHlt = Math.RandomInt(40,100);
itemEnt.SetHealth("","",rndHlt);
}
override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
{
Entity playerEnt;
playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player
Class.CastTo(m_player, playerEnt);
GetGame().SelectPlayer(identity, m_player);
return m_player;
}
override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
{
/*
player.RemoveAllItems();
EntityAI item = player.GetInventory().CreateInInventory(topsArray.GetRandomElement());
EntityAI item2 = player.GetInventory().CreateInInventory(pantsArray.GetRandomElement());
EntityAI item3 = player.GetInventory().CreateInInventory(shoesArray.GetRandomElement());
*/
EntityAI itemEnt;
ItemBase itemBs;
itemEnt = player.GetInventory().CreateInInventory("Rag");
itemBs = ItemBase.Cast(itemEnt);
itemBs.SetQuantity(4);
SetRandomHealth(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("RoadFlare");
itemBs = ItemBase.Cast(itemEnt);
}
};
Mission CreateCustomMission(string path)
{
return new CustomMission();
}
замени
itemEnt = player.GetInventory().CreateInInventory("Rag");
itemBs = ItemBase.Cast(itemEnt);
itemBs.SetQuantity(4);
SetRandomHealth(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("RoadFlare");
itemBs = ItemBase.Cast(itemEnt);
на
player.RemoveAllItems();
EntityAI item_Inv;
itemEnt = player.GetInventory().CreateInInventory("CombatBoots_Green");
itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("TTSKOPants");
item_Inv = itemEnt.GetInventory().CreateInInventory("BandageDressing");
SetRandomHealth(item_Inv);
itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("QuiltedJacket_Violet");
itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("BoonieHat_Red");
itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("BallisticVest");
itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("SmershBag");
item_Inv = itemEnt.GetInventory().CreateInInventory("Flashlight");
SetRandomHealth(item_Inv);
item_Inv.GetInventory().CreateAttachment( "Battery9V" );
itemBs = ItemBase.Cast(itemEnt);
и все. Тупо и все, и это будет для всех спавнящихся и респавнящихся сразу.