So habe es jetzt so gemacht wie du es gesagt hast (hoffe ich).
Aus irgendein Grund Startet mein Server jetzt nicht mehr mit der init.c. Ich würde mal gerne wissen wieso das der Fall ist ich habe doch alles richtig eingetragen?
Code
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.0, 0.2 );
weather.GetRain().SetForecastChangeLimits( 0.0, 0.1 );
weather.GetFog().SetForecastChangeLimits( 0.15, 0.45 );
weather.GetOvercast().SetForecastTimeLimits( 1800 , 1800 );
weather.GetRain().SetForecastTimeLimits( 600 , 600 );
weather.GetFog().SetForecastTimeLimits( 1800 , 1800 );
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(15);
weather.SetWindFunctionParams(0.1, 0.3, 50);
}
class CustomMission: MissionServer
{
void SetRandomHealth(EntityAI itemEnt)
{
int rndHlt = Math.RandomInt(60,100);
itemEnt.SetHealth("","",rndHlt);
}
override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
{
Entity 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)
{
player.RemoveAllItems();
EntityAI itemEnt;
ItemBase itemBs;
switch (Math.RandomInt(0, 9)) {
case 0:
// Soldier
itemEnt = player.GetHumanInventory().CreateInHands("M4A1_Black");
player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("ACOGOptic");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("M4_CQBBttstck");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("M4_PlasticHndgrd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("TTSKOPants");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("TShirt_Green");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("CombatBoots_Black");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("CombatKnife");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("HighCapacityVest_Black");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
break;
case 1:
// Paramedic
itemEnt = player.GetHumanInventory().CreateInHands("AK74");
player.GetInventory().CreateInInventory("Mag_AK74_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_AK74_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_AK74_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_AK74_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("PSO1Optic");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK74_Hndgrd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK74_WoodBttstck");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BDUPants");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("ParamedicJacket_Green");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("SalineBagIV");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BandageDressing");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
break;
case 2:
// Office worker
itemEnt = player.GetHumanInventory().CreateInHands("SKS");
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x39");
ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x39");
ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x39");
ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x39");
ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x39");
ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x39");
ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");
ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");
ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("SKS_Bayonet");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("SlacksPants_Black");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("WoolCoat_Black");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AthleticShoes_Black");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("HighCapacityVest_Olive");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("ThinFramesGlasses");itemBs = ItemBase.Cast(itemEnt);
break;
case 3:
// Biker
itemEnt = player.GetHumanInventory().CreateInHands("AKM");
player.GetInventory().CreateInInventory("Mag_AKM_Drum75Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_AKM_Drum75Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_AKM_Drum75Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK_RailHndgrd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK74_WoodBttstck");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Binoculars");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Jeans_Black");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("RidersJacket_Black");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("MotoHelmet_Red");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("HikingBootsLow_Black");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("ImprovisedBag");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
break;
case 4:
// Hiker
itemEnt = player.GetHumanInventory().CreateInHands("Mosin9130");
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x54");
ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x54");
ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x54");
ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x54");
ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x54");
ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Ammo_762x54");
ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("PUScopeOptic");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mosin_Compensator");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AmmoBox_762x54_20Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("PlateCarrierVest");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("HikingJacket_Red");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("CargoPants_Blue");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("HikingBootsLow_Blue");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("MountainBag_Blue");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("WaterBottle");itemBs = ItemBase.Cast(itemEnt);
break;
case 5:
// Cop
itemEnt = player.GetHumanInventory().CreateInHands("UMP45");
player.GetInventory().CreateInInventory("Mag_UMP_25Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_UMP_25Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_UMP_25Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_UMP_25Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_UMP_25Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("ReflexOptic");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Battery9V");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("PistolSuppressor");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("SmershBag");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("PoliceJacket");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("PolicePants");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("CombatBoots_Grey");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Flashlight");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("PoliceVest");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("WaterBottle");itemBs = ItemBase.Cast(itemEnt);
break;
case 6:
// Lumberjack
itemEnt = player.GetHumanInventory().CreateInHands("SVD");
player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_SVD_10Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("PSO1Optic");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BandageDressing");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("WaterBottle");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Shirt_RedCheck");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Jeans_Blue");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("WorkingBoots_Brown");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Ushanka_Green");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("ImprovisedBag");itemBs = ItemBase.Cast(itemEnt);
break;
case 7:
// Hood
itemEnt = player.GetHumanInventory().CreateInHands("AK101");
player.GetInventory().CreateInInventory("Mag_AK101_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_AK101_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_AK101_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK_RailHndgrd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("KashtanOptic");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK74_WoodBttstck");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("SodaCan_Kvass");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("TrackSuitPants_Black");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("TrackSuitJacket_Black");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AthleticShoes_Black");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("TaloonBag_Green");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("PlateCarrierVest");itemBs = ItemBase.Cast(itemEnt);
break;
case 8:
// Fireman
itemEnt = player.GetHumanInventory().CreateInHands("AKS74U_Black");
player.GetInventory().CreateInInventory("Mag_AK74_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_AK74_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_AK74_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_AK74_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AKS74U_Bttstck");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK_PlasticHndgrd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK_Suppressor");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("FirefightersHelmet_White");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("WorkingBoots_Yellow");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("SmershVest");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("USMCPants_Woodland");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BomberJacket_Blue");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("DesignerGlasses");itemBs = ItemBase.Cast(itemEnt);
break;
}
// Give universal gear
itemEnt = player.GetInventory().CreateInInventory("Rag");
itemBs = ItemBase.Cast(itemEnt);
itemBs.SetQuantity(4);
// SetRandomHealth(itemEnt);
// player.GetInventory().CreateInInventory("HuntingKnife");
}
};
Mission CreateCustomMission(string path)
{
return new CustomMission();
}
Alles anzeigen