Wo bekomme ich die mod her?
bzw deine mod Teddysammler?
Um schreiben oder kommentieren zu können, benötigen Sie ein Benutzerkonto.
Sie haben schon ein Benutzerkonto? Melden Sie sich hier an.
Jetzt anmeldenHier können Sie ein neues Benutzerkonto erstellen.
Neues Benutzerkonto erstellenWo bekomme ich die mod her?
bzw deine mod Teddysammler?
Also bei mir geht es so:
Einfach unter die Waffe dazu schreiben.
z.B.
Ich weiß ist jetzt nicht das gleiche Thema wollte aber dafür nicht unbedingt ein neues Thema eröffnen. Und zwar wollte ich fragen ob jemand weiß wie ich ein Killfeed hinzufüge habe ein Script im internet gefunden aber das hat aus irgendeinem grund nicht funktioniert. (server hat nicht mehr gestartet) also wenn sich damit jemand auskennt immer her damit
Endlich ich habe es jetzt hinbekommen, am ende wenn man es einmal verstanden hat ist es wirklich nicht schwer!!
Vielen Dank für deine Hilfe hast mir gut geholfen. Schönen Abend noch.
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?
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
Ok ich werde es morgen nach der Arbeit Testen und melde mich dann nochmal ob es funktioniert hat.
Du hast in deinem Beispiel ja switch (Math.RandomInt(0, 9)) was im Grunde deinen Zufallsgenerator darstellt. Dort hast du dann eine Zahl von 0 bis 9, deswegen case 0: bis case 9:. Innerhalb dieser legst du dann das Equippment fest. Beendet wird jedes case mit break;, ansonsten würde es in das Nächste springen.
Genau, Ich habe es jetzt auch mal genau so umgesetzt. Nur aus irgendein Grund Spawnen einfach Keine Magazine mit nur Waffen,Kleidung etc, anscheinend sind die Mags wirklich verbuggt.... Weiss jemand wie es sonst noch gehen könnte das die Magazine mit Spawnen? Trozdem schonmal danke an alle die mir versuchen zu helfen bin echt ein TOTAL anfänger in diesem Bereich.
So Startet der Server erst gar nicht:
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("ACOGOptic");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("M4_CQBBttstck");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("M4_PlasticHndgrd");itemBs = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_STANAGCoupled_30Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_STANAGCoupled_30Rnd");itemAtt = 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("PSO1Optic");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK74_Hndgrd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK74_WoodBttstck");itemBs = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");itemAtt = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("HighCapacityVest_Black");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");
player.GetInventory().CreateInInventory("SKS_Bayonet");itemBs = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AmmoBox_762x39_20Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AmmoBox_762x39_20Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AmmoBox_762x39_20Rnd");itemAtt = 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");
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AKM_Drum75Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AKM_Drum75Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AKM_Drum75Rnd");itemAtt = 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");
player.GetInventory().CreateInInventory("PUScopeOptic");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mosin_Compensator");itemBs = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AmmoBox_762x54_20Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AmmoBox_762x54_20Rnd");itemAtt = 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("ReflexOptic");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Battery9V");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("PistolSuppressor");itemBs = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_UMP_25Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_UMP_25Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_UMP_25Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_UMP_25Rnd");itemAtt = 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("PSO1Optic");itemBs = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_SVD_10Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_SVD_10Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_SVD_10Rnd");itemAtt = 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");
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK101_30Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK101_30Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK101_30Rnd");itemAtt = 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("AKS74U_Bttstck");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK_PlasticHndgrd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK_Suppressor");itemBs = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");itemAtt = 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
So Spawnt man mit Gear aber ohne Magazine (Waffen,Kleidung Spawnt aber nur halt keine MAGAZINE) :
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("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("Mag_STANAGCoupled_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");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("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("Mag_STANAGCoupled_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("HighCapacityVest_Black");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");
player.GetInventory().CreateInInventory("SKS_Bayonet");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");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");
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("ReflexOptic");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Battery9V");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("PistolSuppressor");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("Mag_UMP_25Rnd");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("PSO1Optic");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("Mag_SVD_10Rnd");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("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("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("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
Keine ahnung was ich noch ausprobieren könnte.
Vereinfache es bitte doch mal und teste das hier:
Das funktioniert. Aber ich weiss jetzt halt nicht wie ich mehrere Start Ausrüstungen erstelle die random an die Spieler verteilt werden. Oder wie ich die da hinzufügen soll?
Vereinfache es bitte doch mal und teste das hier:
Ok ich werde es später mal testen!
Was genau hat jetzt nicht funktioniert? Du kannst nicht spawnen? Du bekommst kein Equip oder bist komplett nackt? Ein paar mehr Infos bitte! Und wenn es Fehler gibt, wäre es nicht schlecht diese zu erfahren
Ich kann meinem Server einfach nicht mehr beitreten mit der init.c Datei, mit einer anderen aber schon. Ich weiß ja leider nicht was der Fehler ist.
Ich habe es getestet und wer hätte es gedacht es hat natürlich nicht funktioniert
Falls mir jemand sagen kann was ich falsch gemacht hab nur her damit.
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.GetInventory().CreateInInventory("M9A1_Bayonet");
itemEnt = player.GetHumanInventory().CreateInHands("M4A1_Black");
itemAtt = itemEnt.GetInventory().CreateAttachment("ACOGOptic");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("M4_CQBBttstck");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("M4_PlasticHndgrd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_STANAGCoupled_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_STANAGCoupled_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("M4_Suppressor");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("Mich2001Helmet");
itemAtt = itemEnt.GetInventory().CreateAttachment("NVGoggles");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("UniversalLight");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemEnt = player.GetInventory().CreateInInventory("SmershVest");
itemAtt = itemEnt.GetInventory().CreateAttachment("SmershBag");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("M65Jacket_Olive");
itemEnt = player.GetInventory().CreateInInventory("GorkaPants_Summer");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
itemAtt = itemEnt.GetInventory().CreateAttachment("CombatKnife");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("TacticalGoggles")
itemEnt = player.GetInventory().CreateInInventory("TacticalGloves_Green");
itemEnt = player.GetInventory().CreateInInventory("Balaclava3Holes_Green");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBelt");
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("BandageDressing");
break;
case 1:
// Soldier 1
itemEnt = player.GetInventory().CreateInInventory("AK_Bayonet");
itemEnt = player.GetHumanInventory().CreateInHands("AKM");
itemAtt = itemEnt.GetInventory().CreateAttachment("AK_PlasticBttstck");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AK_RailHndgrd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AKM_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AKM_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AKM_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("PSO11Optic");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AK_Suppressor");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("Mich2001Helmet");
itemAtt = itemEnt.GetInventory().CreateAttachment("NVGoggles");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("UniversalLight");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemEnt = player.GetInventory().CreateInInventory("SmershVest");
itemAtt = itemEnt.GetInventory().CreateAttachment("SmershBag");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("M65Jacket_Olive");
itemEnt = player.GetInventory().CreateInInventory("GorkaPants_Summer");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
itemAtt = itemEnt.GetInventory().CreateAttachment("CombatKnife");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("TacticalGoggles")
itemEnt = player.GetInventory().CreateInInventory("TacticalGloves_Green");
itemEnt = player.GetInventory().CreateInInventory("Balaclava3Holes_Green");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBelt");
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("BandageDressing");
break;
case 2:
// Soldier 2
itemEnt = player.GetHumanInventory().CreateInHands("FAL");
itemAtt = itemEnt.GetInventory().CreateAttachment("Fal_FoldingBttstck");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Fal_OeBttstck");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_FAL_20Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_FAL_20Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_FAL_20Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_FAL_20Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("ACOGOptic");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("ImprovisedSuppressor");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("Mich2001Helmet");
itemAtt = itemEnt.GetInventory().CreateAttachment("NVGoggles");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("UniversalLight");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemEnt = player.GetInventory().CreateInInventory("SmershVest");
itemAtt = itemEnt.GetInventory().CreateAttachment("SmershBag");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("M65Jacket_Olive");
itemEnt = player.GetInventory().CreateInInventory("GorkaPants_Summer");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
itemAtt = itemEnt.GetInventory().CreateAttachment("CombatKnife");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("TacticalGoggles")
itemEnt = player.GetInventory().CreateInInventory("TacticalGloves_Green");
itemEnt = player.GetInventory().CreateInInventory("Balaclava3Holes_Green");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBelt");
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("BandageDressing");
break;
case 3:
// Soldier 3
itemEnt = player.GetHumanInventory().CreateInHands("SVD");
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_SVD_10Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_SVD_10Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_SVD_10Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("PSO1Optic");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("ImprovisedSuppressor");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("Mich2001Helmet");
itemAtt = itemEnt.GetInventory().CreateAttachment("NVGoggles");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("UniversalLight");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemEnt = player.GetInventory().CreateInInventory("SmershVest");
itemAtt = itemEnt.GetInventory().CreateAttachment("SmershBag");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("M65Jacket_Olive");
itemEnt = player.GetInventory().CreateInInventory("GorkaPants_Summer");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
itemAtt = itemEnt.GetInventory().CreateAttachment("CombatKnife");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("TacticalGoggles")
itemEnt = player.GetInventory().CreateInInventory("TacticalGloves_Green");
itemEnt = player.GetInventory().CreateInInventory("Balaclava3Holes_Green");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBelt");
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("BandageDressing");
break;
case 4:
// Soldier 4
itemEnt = player.GetHumanInventory().CreateInHands("Mosin9130");
itemAtt = itemEnt.GetInventory().CreateAttachment("AmmoBox_762x54_20Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AmmoBox_762x54_20Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("PUScopeOptic");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mosin_Compensator");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("Mich2001Helmet");
itemAtt = itemEnt.GetInventory().CreateAttachment("NVGoggles");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("UniversalLight");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemEnt = player.GetInventory().CreateInInventory("SmershVest");
itemAtt = itemEnt.GetInventory().CreateAttachment("SmershBag");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("M65Jacket_Olive");
itemEnt = player.GetInventory().CreateInInventory("GorkaPants_Summer");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
itemAtt = itemEnt.GetInventory().CreateAttachment("CombatKnife");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("TacticalGoggles")
itemEnt = player.GetInventory().CreateInInventory("TacticalGloves_Green");
itemEnt = player.GetInventory().CreateInInventory("Balaclava3Holes_Green");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBelt");
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("BandageDressing");
break;
case 5:
// Soldier 5
itemEnt = player.GetInventory().CreateInInventory("UMP45");
itemAtt = itemEnt.GetInventory().CreateAttachment("PistolSuppressor");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_UMP_25Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_UMP_25Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_UMP_25Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_UMP_25Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("ReflexOptic");
itemAtt = ItemBase.Cast(itemAtt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemEnt = player.GetInventory().CreateInInventory("Mich2001Helmet");
itemAtt = itemEnt.GetInventory().CreateAttachment("NVGoggles");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("UniversalLight");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemEnt = player.GetInventory().CreateInInventory("SmershVest");
itemAtt = itemEnt.GetInventory().CreateAttachment("SmershBag");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("M65Jacket_Olive");
itemEnt = player.GetInventory().CreateInInventory("GorkaPants_Summer");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
itemAtt = itemEnt.GetInventory().CreateAttachment("CombatKnife");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("TacticalGoggles")
itemEnt = player.GetInventory().CreateInInventory("TacticalGloves_Green");
itemEnt = player.GetInventory().CreateInInventory("Balaclava3Holes_Green");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBelt");
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("BandageDressing")
break;
case 6:
// Soldier 6
itemEnt = player.GetHumanInventory().CreateInHands("VSS");
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_VSS_10Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_VSS_10Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_VSS_10Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("PSO11Optic");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemEnt = player.GetInventory().CreateInInventory("Mich2001Helmet");
itemAtt = itemEnt.GetInventory().CreateAttachment("NVGoggles");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("UniversalLight");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemEnt = player.GetInventory().CreateInInventory("SmershVest");
itemAtt = itemEnt.GetInventory().CreateAttachment("SmershBag");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("M65Jacket_Olive");
itemEnt = player.GetInventory().CreateInInventory("GorkaPants_Summer");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
itemAtt = itemEnt.GetInventory().CreateAttachment("CombatKnife");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("TacticalGoggles")
itemEnt = player.GetInventory().CreateInInventory("TacticalGloves_Green");
itemEnt = player.GetInventory().CreateInInventory("Balaclava3Holes_Green");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBelt");
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("BandageDressing")
break;
case 7:
// Soldier 7
itemEnt = player.GetHumanInventory().CreateInHands("AK101");
itemAtt = itemEnt.GetInventory().CreateAttachment("AK_PlasticBttstck");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AK_RailHndgrd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK101_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK101_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK101_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("PSO11Optic");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AK_Suppressor");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("Mich2001Helmet");
itemAtt = itemEnt.GetInventory().CreateAttachment("NVGoggles");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("UniversalLight");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemEnt = player.GetInventory().CreateInInventory("SmershVest");
itemAtt = itemEnt.GetInventory().CreateAttachment("SmershBag");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("M65Jacket_Olive");
itemEnt = player.GetInventory().CreateInInventory("GorkaPants_Summer");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
itemAtt = itemEnt.GetInventory().CreateAttachment("CombatKnife");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("TacticalGoggles")
itemEnt = player.GetInventory().CreateInInventory("TacticalGloves_Green");
itemEnt = player.GetInventory().CreateInInventory("Balaclava3Holes_Green");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBelt");
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("BandageDressing")
break;
case 8:
// Soldier 8
itemEnt = player.GetHumanInventory().CreateInHands("AKS74U_Black");
itemAtt = itemEnt.GetInventory().CreateAttachment("AK_PlasticBttstck");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AK_RailHndgrd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("Mag_AK74_30Rnd");
itemAtt = ItemBase.Cast(itemEnt);
itemAtt = itemEnt.GetInventory().CreateAttachment("AK_Suppressor");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("Mich2001Helmet");
itemAtt = itemEnt.GetInventory().CreateAttachment("NVGoggles");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemAtt = itemEnt.GetInventory().CreateAttachment("UniversalLight");
itemAtt = ItemBase.Cast(itemEnt);
itemEgy = itemAtt.GetInventory().CreateInInventory("Battery9V");
itemEgy = ItemBase.Cast(itemAtt);
itemEnt = player.GetInventory().CreateInInventory("SmershVest");
itemAtt = itemEnt.GetInventory().CreateAttachment("SmershBag");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("M65Jacket_Olive");
itemEnt = player.GetInventory().CreateInInventory("GorkaPants_Summer");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBoots_Black");
itemAtt = itemEnt.GetInventory().CreateAttachment("CombatKnife");
itemAtt = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("TacticalGoggles")
itemEnt = player.GetInventory().CreateInInventory("TacticalGloves_Green");
itemEnt = player.GetInventory().CreateInInventory("Balaclava3Holes_Green");
itemEnt = player.GetInventory().CreateInInventory("MilitaryBelt");
player.GetInventory().CreateInInventory("SodaCan_Cola");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("BakedBeansCan_Opened");itemBs = ItemBase.Cast(itemEnt);
itemEnt = player.GetInventory().CreateInInventory("BandageDressing")
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
Ok ich werde es mir merken.
Vielen Vielen dank für die Hilfe ich werde es direkt versuchen und Testen, Jetzt hoffe ich nur noch das die Magazine nicht verbuggt sind.
Achso Ok. Also wenn ich jetzt eine klasse hinzufügen will kann ich denn Code den du geschickt hast kopieren und bei mir einfügen und nur halt die items verändern oder ist das nicht möglich?
Ok danke schonmal dafür, aber wollte gerade nur zum testen deine init.c Datei ausprobieren nun kann ich nicht mehr meinen Server beitreten.
Ist die init.c vilt schon bissel veraltet das die nicht mehr geht?
Danke erstmal für deine Schnelle Antwort.
Das wäre super wenn du das machen könntest, aber ansonsten ist meine init.c Datei doch richtig oder?
Hallo, und zwar will ich auf meinen Server verschiedene random Ausrüstung an meine Spieler vergeben.
Nun habe ich dies alles soweit in die init.c Datei hinzugefügt nur habe ich jetzt noch das Problem das aus irgendein Grund die Magazine für die Waffen nicht mit Spawnen.
Aber alles andere Waffen, Kleidung, Essen bekommt man nur halt nicht die Magazine.
Hier mal meine init.c : Danke schon mal für die Hilfe.
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("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("Mag_STANAGCoupled_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");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("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("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("HighCapacityVest_Black");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");
player.GetInventory().CreateInInventory("SKS_Bayonet");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AmmoBox_762x39_20Rnd");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("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");
player.GetInventory().CreateInInventory("PUScopeOptic");
player.GetInventory().CreateInInventory("Mosin_Compensator");
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("MP5K");
player.GetInventory().CreateInInventory("ReflexOptic");
player.GetInventory().CreateInInventory("Battery9V");
player.GetInventory().CreateInInventory("MP5_PlasticHndgrd");
player.GetInventory().CreateInInventory("MP5k_StockBttstck");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_MP5_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_MP5_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_MP5_30Rnd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("Mag_MP5_30Rnd");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("PSO1Optic");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("Mag_SVD_10Rnd");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("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("AKS74U_Bttstck");
player.GetInventory().CreateInInventory("AK_PlasticHndgrd");itemBs = ItemBase.Cast(itemEnt);
player.GetInventory().CreateInInventory("AK_Suppressor");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("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