Closed gallexme closed 6 years ago
Hey @Arkensor did u know that u could put all mission changes in Arkensor_DayZSP.ChernarusPlus/init.c Add That Function to Init.c
Mission CreateCustomMission(string path) { return new CustomMission(); }
And Extend MissionGameplay with CustomMission
Example:
class CustomMission: MissionGameplay { override void SpawnPlayer() { m_oPlayer = PlayerBase.Cast( GetGame().CreatePlayer( NULL, GetGame().CreateRandomPlayer(), "0 0 0", 0, "NONE") ); GetGame().SelectPlayer( NULL, m_oPlayer ); EntityAI item = m_oPlayer.GetInventory().CreateInInventory( "AviatorGlasses" ); item = m_oPlayer.GetInventory().CreateInInventory( "MilitaryBeret_UN" ); item = m_oPlayer.GetInventory().CreateInInventory( "M65Jacket_Black" ); item = m_oPlayer.GetInventory().CreateInInventory( "PlateCarrierHolster" ); item = m_oPlayer.GetInventory().CreateInInventory( "TacticalGloves_Black" ); item = m_oPlayer.GetInventory().CreateInInventory( "HunterPants_Autumn" ); item = m_oPlayer.GetInventory().CreateInInventory( "MilitaryBoots_Black" ); item = m_oPlayer.GetInventory().CreateInInventory( "AliceBag_Camo" ); // item = m_oPlayer.GetInventory().CreateInInventory( "UMP45" ); // item.GetInventory().CreateAttachment( "Mag_UMP_25Rnd" ); // item.GetInventory().CreateAttachment( "ReflexOptic" ); // item.GetInventory().CreateAttachment( "PistolSuppressor" ); // m_oPlayer.GetInventory().CreateInInventory( "Mag_UMP_25Rnd" ); // m_oPlayer.GetInventory().CreateInInventory( "Mag_UMP_25Rnd" ); // m_oPlayer.GetInventory().CreateInInventory( "Mag_UMP_25Rnd" ); item = m_oPlayer.GetInventory().CreateInInventory( "AKM" ); item.GetInventory().CreateAttachment( "AK74_Hndgrd" ); item.GetInventory().CreateAttachment( "AK_Suppressor" ); item.GetInventory().CreateAttachment( "AK_WoodBttstck" ); item.GetInventory().CreateAttachment( "Mag_AKM_Drum75Rnd" ); m_oPlayer.GetInventory().CreateInInventory( "Mag_AKM_Drum75Rnd" ); m_oPlayer.GetInventory().CreateInInventory( "Mag_AKM_Drum75Rnd" ); m_oPlayer.GetInventory().CreateInInventory( "Mag_AKM_Drum75Rnd" ); m_oPlayer.LocalTakeEntityToHands( item ); m_oPlayer.SetQuickBarEntityShortcut( item, 0, true ); m_oPlayer.SetAllowDamage( false ); // Cherno downtown // vector position = "6623.335938 23.480206 2418.818848"; // vector direction = "0.520912 0.000000 0.853610"; // Cherno outer city // vector position = "6564.447754 110.249420 3403.791748"; // vector direction = "0.614116 0.000000 -0.789216"; // Airfield vector position = "4603.797363 342.474487 10492.90722"; vector direction = "0.893051 0.000000 -0.449954"; m_oPlayer.SetPosition( position ); m_oPlayer.SetDirection( direction ); } }
Hey,
yes I am aware of that, I already work on the mission-based version. Will finish it this weekend.
But thx anyway ;=)
Hey @Arkensor did u know that u could put all mission changes in Arkensor_DayZSP.ChernarusPlus/init.c Add That Function to Init.c
And Extend MissionGameplay with CustomMission
Example: