Jump to content
Sign in to follow this  
nimartin

Set Player spawn

Recommended Posts

Hay guys

New to modding

I have set up a steam ofline server and would like to change the spawn locations so that it is in one area, I'm happy with the coast just want to limit them down to a small space so people are not running for dayz to find each other. any help would be massively appreciated :)

Thanks Guys

Share this post


Link to post
Share on other sites

mpmissions -> dayzOffline.chernarusplus -> cfgplayerspawnpoints.xml

That is the file where you edit the spawn locations.

Share this post


Link to post
Share on other sites

Thanks man,

do you know were I would find a way to add gear to players as they spawn

Share this post


Link to post
Share on other sites

Yes, you would add that in the init.c file. Use the following as an example.

override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
	{
		
		
		
		bool isAdmin = false;
		
		string SteamId_admin1 = "7656145345453455"; //Players STEAM ID
		
		if (player.GetIdentity().GetPlainId() == SteamId_admin1) {
			isAdmin = true;
		} 
		
		if (isAdmin) {
			
			player.RemoveAllItems();
			player.GetInventory().CreateInInventory("TTSKOPants");
			player.GetInventory().CreateInInventory("TTsKOJacket_Camo");
			player.GetInventory().CreateInInventory("CombatBoots_Black");
			player.GetInventory().CreateInInventory("AliceBag_Black");		
			player.GetInventory().CreateInInventory("HuntingKnife");
			player.GetInventory().CreateInInventory("SodaCan_Cola");
			player.GetInventory().CreateInInventory("SodaCan_Cola");
			//player.GetInventory().CreateInInventory("TacticalBaconCan");
			//player.GetInventory().CreateInInventory("TacticalBaconCan");
			//player.GetInventory().CreateInInventory("CanOpener");	
			player.GetInventory().CreateInInventory("UKAssVest_Black");
			player.GetInventory().CreateInInventory("BandageDressing");
			player.GetInventory().CreateInInventory("BandageDressing");
			player.GetInventory().CreateInInventory("BandageDressing");
			player.GetInventory().CreateInInventory("BandageDressing");
			//player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");
			//player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");
			player.GetInventory().CreateInInventory("Syringe");	
			player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
			player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
			//player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
			player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");
			//player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");
			player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
			player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
			player.GetInventory().CreateInInventory("AmmoBox_380_35rnd");
			player.GetInventory().CreateInInventory("AmmoBox_380_35rnd");
			player.GetInventory().CreateInInventory("Hammer");
			player.GetInventory().CreateInInventory("Tomato");
			player.GetInventory().CreateInInventory("Tomato");
			player.GetInventory().CreateInInventory("TacticalBaconCan_Opened");
			player.GetInventory().CreateInInventory("TacticalBaconCan_Opened");
			player.GetInventory().CreateInInventory("NailBox");
			player.GetInventory().CreateInInventory("NailBox");
			player.GetInventory().CreateInInventory("NailBox");
			
			// M4A1 Green
			EntityAI ghillie_m4a1 = player.GetHumanInventory().CreateInInventory("M4A1_Green");
			ghillie_m4a1.GetInventory().CreateAttachment("M4_Suppressor");
			ghillie_m4a1.GetInventory().CreateAttachment("M4_RISHndgrd_Green");
			ghillie_m4a1.GetInventory().CreateAttachment("M4_MPBttstck_Green");
			ghillie_m4a1.GetInventory().CreateAttachment("GhillieAtt_Woodland");
			// Marakov
			EntityAI ghillie_marakov = player.GetHumanInventory().CreateInInventory("MakarovIJ70");
			ghillie_marakov.GetInventory().CreateAttachment("PistolSuppressor");

		
		} else {
		
/*	
			player.RemoveAllItems();

			EntityAI item = player.GetInventory().CreateInInventory(topsArray.GetRandomElement());
			EntityAI item2 = player.GetInventory().CreateInInventory(pantsArray.GetRandomElement());
			EntityAI item3 = player.GetInventory().CreateInInventory(shoesArray.GetRandomElement());
*/

			// Standard player items
			EntityAI itemEnt;
			ItemBase itemBs;
			player.GetInventory().CreateInInventory("ImprovisedBag");
			player.GetInventory().CreateInInventory("HuntingKnife");
			player.GetInventory().CreateInInventory("Hammer");
			player.GetInventory().CreateInInventory("SodaCan_Cola");
			//player.GetInventory().CreateInInventory("TacticalBaconCan");
			player.GetInventory().CreateInInventory("NailBox");
			player.GetInventory().CreateInInventory("NailBox");
			player.GetInventory().CreateInInventory("NailBox");
			player.GetInventory().CreateInInventory("Tomato");
			player.GetInventory().CreateInInventory("Tomato");
			player.GetInventory().CreateInInventory("Tomato");
			player.GetInventory().CreateInInventory("TacticalBaconCan_Opened");
			player.GetInventory().CreateInInventory("TacticalBaconCan_Opened");
			
			itemEnt = player.GetInventory().CreateInInventory("Rag");
			itemBs = ItemBase.Cast(itemEnt);
			itemBs.SetQuantity(6);
			SetRandomHealth(itemEnt);

			itemEnt = player.GetInventory().CreateInInventory("RoadFlare");
			itemBs = ItemBase.Cast(itemEnt);
		}
	}
};

 

Share this post


Link to post
Share on other sites
22 hours ago, kmiles1990 said:

Yes, you would add that in the init.c file. Use the following as an example.


override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
	{
		
		
		
		bool isAdmin = false;
		
		string SteamId_admin1 = "7656145345453455"; //Players STEAM ID
		
		if (player.GetIdentity().GetPlainId() == SteamId_admin1) {
			isAdmin = true;
		} 
		
		if (isAdmin) {
			
			player.RemoveAllItems();
			player.GetInventory().CreateInInventory("TTSKOPants");
			player.GetInventory().CreateInInventory("TTsKOJacket_Camo");
			player.GetInventory().CreateInInventory("CombatBoots_Black");
			player.GetInventory().CreateInInventory("AliceBag_Black");		
			player.GetInventory().CreateInInventory("HuntingKnife");
			player.GetInventory().CreateInInventory("SodaCan_Cola");
			player.GetInventory().CreateInInventory("SodaCan_Cola");
			//player.GetInventory().CreateInInventory("TacticalBaconCan");
			//player.GetInventory().CreateInInventory("TacticalBaconCan");
			//player.GetInventory().CreateInInventory("CanOpener");	
			player.GetInventory().CreateInInventory("UKAssVest_Black");
			player.GetInventory().CreateInInventory("BandageDressing");
			player.GetInventory().CreateInInventory("BandageDressing");
			player.GetInventory().CreateInInventory("BandageDressing");
			player.GetInventory().CreateInInventory("BandageDressing");
			//player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");
			//player.GetInventory().CreateInInventory("AmmoBox_9x19_25rnd");
			player.GetInventory().CreateInInventory("Syringe");	
			player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
			player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
			//player.GetInventory().CreateInInventory("AmmoBox_556x45_20Rnd");
			player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");
			//player.GetInventory().CreateInInventory("Mag_STANAGCoupled_30Rnd");
			player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
			player.GetInventory().CreateInInventory("Mag_IJ70_8Rnd");
			player.GetInventory().CreateInInventory("AmmoBox_380_35rnd");
			player.GetInventory().CreateInInventory("AmmoBox_380_35rnd");
			player.GetInventory().CreateInInventory("Hammer");
			player.GetInventory().CreateInInventory("Tomato");
			player.GetInventory().CreateInInventory("Tomato");
			player.GetInventory().CreateInInventory("TacticalBaconCan_Opened");
			player.GetInventory().CreateInInventory("TacticalBaconCan_Opened");
			player.GetInventory().CreateInInventory("NailBox");
			player.GetInventory().CreateInInventory("NailBox");
			player.GetInventory().CreateInInventory("NailBox");
			
			// M4A1 Green
			EntityAI ghillie_m4a1 = player.GetHumanInventory().CreateInInventory("M4A1_Green");
			ghillie_m4a1.GetInventory().CreateAttachment("M4_Suppressor");
			ghillie_m4a1.GetInventory().CreateAttachment("M4_RISHndgrd_Green");
			ghillie_m4a1.GetInventory().CreateAttachment("M4_MPBttstck_Green");
			ghillie_m4a1.GetInventory().CreateAttachment("GhillieAtt_Woodland");
			// Marakov
			EntityAI ghillie_marakov = player.GetHumanInventory().CreateInInventory("MakarovIJ70");
			ghillie_marakov.GetInventory().CreateAttachment("PistolSuppressor");

		
		} else {
		
/*	
			player.RemoveAllItems();

			EntityAI item = player.GetInventory().CreateInInventory(topsArray.GetRandomElement());
			EntityAI item2 = player.GetInventory().CreateInInventory(pantsArray.GetRandomElement());
			EntityAI item3 = player.GetInventory().CreateInInventory(shoesArray.GetRandomElement());
*/

			// Standard player items
			EntityAI itemEnt;
			ItemBase itemBs;
			player.GetInventory().CreateInInventory("ImprovisedBag");
			player.GetInventory().CreateInInventory("HuntingKnife");
			player.GetInventory().CreateInInventory("Hammer");
			player.GetInventory().CreateInInventory("SodaCan_Cola");
			//player.GetInventory().CreateInInventory("TacticalBaconCan");
			player.GetInventory().CreateInInventory("NailBox");
			player.GetInventory().CreateInInventory("NailBox");
			player.GetInventory().CreateInInventory("NailBox");
			player.GetInventory().CreateInInventory("Tomato");
			player.GetInventory().CreateInInventory("Tomato");
			player.GetInventory().CreateInInventory("Tomato");
			player.GetInventory().CreateInInventory("TacticalBaconCan_Opened");
			player.GetInventory().CreateInInventory("TacticalBaconCan_Opened");
			
			itemEnt = player.GetInventory().CreateInInventory("Rag");
			itemBs = ItemBase.Cast(itemEnt);
			itemBs.SetQuantity(6);
			SetRandomHealth(itemEnt);

			itemEnt = player.GetInventory().CreateInInventory("RoadFlare");
			itemBs = ItemBase.Cast(itemEnt);
		}
	}
};

 

Where did you find all of those functions?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×