Moinsen zusammen,
Versuche schon seit längerem Day Only einzustellen. Klappt irgendwie ned.
Anbei meine Init.c
Regen sollte eigtl auch aus sein..Isser aber ned
Serverzeitfaktor ist auf 3 eingestellt. Serverzeit laut init.c 7 uhr. In wirklichkeit isses aber abends...
Code
void main()
{
//INIT WEATHER BEFORE ECONOMY INIT------------------------
//All to set to null give always sunshine, no fog, and less clouds
Weather weather = g_Game.GetWeather();
weather.MissionWeather(false); // false = use weather controller from Weather.c
weather.GetOvercast().Set( Math.RandomFloatInclusive(0.0, 0.0), 0, 0);
weather.GetRain().Set( 0, 0, 0);
weather.GetFog().Set( Math.RandomFloatInclusive(0.0, 0.0), 0, 0);
//INIT ECONOMY--------------------------------------
Hive ce = CreateHive();
if ( ce )
{
ce.InitOffline();
}
//DATE RESET AFTER ECONOMY INIT-------------------------
int year;
int month;
int day;
int hour;
int minute;
GetGame().GetWorld().GetDate(year, month, day, hour, minute);
if (((month <= 2) && (day < 5)) || ((month >= 11) && (day > 20)))
{
month = 6;
day = 15;
GetGame().GetWorld().SetDate(2020, 6, 12, 7, 0);
}
}
class CustomMission: MissionServer
{
void SetRandomHealth(EntityAI itemEnt)
{
if ( itemEnt )
{
int rndHlt = Math.RandomInt(55,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)
{
//RemoveAllItems
player.RemoveAllItems();
//Give universal gear in inventory
ItemBase.Cast(player.GetInventory().CreateInInventory("UMP45"));
ItemBase.Cast(player.GetInventory().CreateInInventory("Mag_UMP_25Rnd"));
ItemBase.Cast(player.GetInventory().CreateInInventory("Mag_UMP_25Rnd"));
ItemBase.Cast(player.GetInventory().CreateInInventory("CanOpener"));
ItemBase.Cast(player.GetInventory().CreateInInventory("Matchbox"));
ItemBase.Cast(player.GetInventory().CreateInInventory("TaloonBag_Green"));
ItemBase.Cast(player.GetInventory().CreateInInventory("BakedBeansCan"));
ItemBase.Cast(player.GetInventory().CreateInInventory("BakedBeansCan"));
ItemBase.Cast(player.GetInventory().CreateInInventory("BakedBeansCan"));
ItemBase.Cast(player.GetInventory().CreateInInventory("WaterBottle"));
ItemBase.Cast(player.GetInventory().CreateInInventory("CombatKnife"));
ItemBase.Cast(player.GetInventory().CreateInInventory("Balaclava3Holes_Black"));
ItemBase.Cast(player.GetInventory().CreateInInventory("MilitaryBeret_UN"));
ItemBase.Cast(player.GetInventory().CreateInInventory("USMCJacket_Woodland"));
ItemBase.Cast(player.GetInventory().CreateInInventory("USMCPants_Woodland"));
ItemBase.Cast(player.GetInventory().CreateInInventory("MilitaryBoots_Black"));
ItemBase.Cast(player.GetInventory().CreateInInventory("Rag")).SetQuantity(6); //.SetQuantity(x) set the amount of rags
}
};
Mission CreateCustomMission(string path)
{
return new CustomMission();
}
Alles anzeigen