Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

Sign in to follow this  
Mostabdel

Need Help with this script

Recommended Posts

Hi all i have change this script and i need help if it work or no ?

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.5, 0.8 );
	weather.GetRain().SetForecastChangeLimits( 0.1, 0.3 );
	weather.GetFog().SetForecastChangeLimits( 0.05, 0.10 );

	weather.GetOvercast().SetForecastTimeLimits( 3600 , 3600 );
	weather.GetRain().SetForecastTimeLimits( 300 , 300 );
	weather.GetFog().SetForecastTimeLimits( 3600 , 3600 );

	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(30);
	weather.SetWindFunctionParams(0.1, 1.0, 50);
}
class CustomMission: MissionServer
{
	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 OnInit()
	{

		GetGame().GetCallQueue(CALL_CATEGORY_GAMEPLAY).CallLater(NumPLayersOnServer, 300000, true);		// 5 minutes
	}
	
	void NumPLayersOnServer()
	
	{
		ref array<Man> players = new array<Man>;
		GetGame().GetPlayers( players );
		int numPlayers = players.Count();
		
		for ( int i = 0; i < players.Count(); ++i )
		{
			Man player = players.Get(i);
			if( player )
			{
				string messPlayers = "Players on the server: " + numPlayers.ToString();
				Param1<string> m_MessageParam = new Param1<string>(messPlayers); 				
				GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, m_MessageParam, true, player.GetIdentity());
				Param1<string> empty = new Param1<string>(" "); 
				GetGame().RPCSingleParam(player, ERPCs.RPC_USER_ACTION_MESSAGE, empty, true, player.GetIdentity()); 

			}
		}
		
	}
 	void addMags(PlayerBase player, string mag_type, int count)
	{
		if (count < 1)
			return;
 		EntityAI mag;
 		for (int i = 0; i < count; i++) {
			mag = player.GetInventory().CreateInInventory(mag_type);
		}
 		player.SetQuickBarEntityShortcut(mag, 1, true);
	}
 	EntityAI Firefighter_BeigeClass(PlayerBase player)
	{
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("FNX45");
		handgun.GetInventory().CreateAttachment("FNP45_MRDSOptic");
		EntityAI FNP45_MRDSOptic = FNP45_MRDSOptic.GetInventory().CreateAttachment("Battery9V");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_FNX45_15Rnd", 2);
		addMags(player, "Ammo_45ACP", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return handgun;
	}
	EntityAI Firefighter_BeigeClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("FirefighterJacket_Beige");
		jacket.GetInventory().CreateInInventory("TacticalBaconCan");
		jacket.GetInventory().CreateInInventory("Apple");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Pear");
		
		ItemBase pants = player.GetInventory().CreateInInventory("FirefightersPants_Beige");
		pants.GetInventory().CreateInInventory("CombatKnife");
		pants.GetInventory().CreateInInventory("PersonalRadio");
		pants.GetInventory().CreateInInventory("Battery9V");
		
		player.GetInventory().CreateInInventory("WorkingBoots_Yellow");
		player.GetInventory().CreateInInventory("WorkingGloves_Yellow");
		player.GetInventory().CreateInInventory("FirefightersHelmet_Yellow");
		player.GetInventory().CreateInInventory("AviatorGlasses");
		player.GetInventory().CreateInInventory("FirefighterAxe");
		player.GetInventory().CreateInInventory("ChestHolster");
		player.GetInventory().CreateInInventory("SmershBag");
		player.GetInventory().CreateInInventory("Hammer");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("WaterBottle");
		player.GetInventory().CreateInInventory("ChernarusMap");
		player.GetInventory().CreateInInventory("Compass");
		player.GetInventory().CreateInInventory("DuctTape");
		player.GetInventory().CreateInInventory("Matchbox");
		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(3);
		
		return gear;	
	}
 	EntityAI Firefighter_BlackClass(PlayerBase player)
	{
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("FNX45");
		handgun.GetInventory().CreateAttachment("FNP45_MRDSOptic");
		EntityAI FNP45_MRDSOptic = FNP45_MRDSOptic.GetInventory().CreateAttachment("Battery9V");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_FNX45_15Rnd", 2);
		addMags(player, "Ammo_45ACP", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return handgun;
	}
	EntityAI Firefighter_BlackClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("FirefighterJacket_Black");
		jacket.GetInventory().CreateInInventory("Pear");
		jacket.GetInventory().CreateInInventory("Pear");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Plum");
		
		ItemBase pants = player.GetInventory().CreateInInventory("FirefightersPants_Black");
		pants.GetInventory().CreateInInventory("CombatKnife");
		pants.GetInventory().CreateInInventory("PersonalRadio");
		pants.GetInventory().CreateInInventory("Battery9V");
		
		player.GetInventory().CreateInInventory("Wellies_Black");
		player.GetInventory().CreateInInventory("WorkingGloves_Black");
		player.GetInventory().CreateInInventory("FirefightersHelmet_Red");
		player.GetInventory().CreateInInventory("AviatorGlasses");
		player.GetInventory().CreateInInventory("Balaclava3Holes_Black");
		player.GetInventory().CreateInInventory("FirefighterAxe_Black");
		player.GetInventory().CreateInInventory("SmershBag");
		player.GetInventory().CreateInInventory("ChestHolster");
		player.GetInventory().CreateInInventory("Hammer");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("WaterBottle");
		player.GetInventory().CreateInInventory("ChernarusMap");
		player.GetInventory().CreateInInventory("Compass");
		player.GetInventory().CreateInInventory("DuctTape");
		player.GetInventory().CreateInInventory("Matchbox");
		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(3);
		
		return gear;	
	}	
 	EntityAI ParamedicClass(PlayerBase player)
	{
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("CZ75");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_CZ75_15Rnd", 2);
		addMags(player, "Ammo_9x19", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return handgun;
	}
	EntityAI ParamedicClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("ParamedicJacket_Blue");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Pear");
		jacket.GetInventory().CreateInInventory("CharcoalTablets");
		jacket.GetInventory().CreateInInventory("PainkillerTablets");
		
		ItemBase pants = player.GetInventory().CreateInInventory("ParamedicPants_Blue");
		pants.GetInventory().CreateInInventory("PersonalRadio");
		pants.GetInventory().CreateInInventory("Battery9V");

		player.GetInventory().CreateInInventory("HikingBootsLow_Blue");
		player.GetInventory().CreateInInventory("SurgicalGloves_LightBlue");
		player.GetInventory().CreateInInventory("Thermometer");
		player.GetInventory().CreateInInventory("AviatorGlasses");
		player.GetInventory().CreateInInventory("SurgicalMask");
		player.GetInventory().CreateInInventory("Morphine");
		player.GetInventory().CreateInInventory("SmershBag");
		player.GetInventory().CreateInInventory("ChestHolster");
		player.GetInventory().CreateInInventory("VitaminBottle");
		player.GetInventory().CreateInInventory("Epinephrine");
		player.GetInventory().CreateInInventory("TetracyclineAntibiotics");
		player.GetInventory().CreateInInventory("WaterBottle");
		player.GetInventory().CreateInInventory("SalineBagIV");
		player.GetInventory().CreateInInventory("ChernarusMap");
		player.GetInventory().CreateInInventory("Compass");
		player.GetInventory().CreateInInventory("DuctTape");
		player.GetInventory().CreateInInventory("Matchbox");
		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(6);
		
		return gear;	
	}
 	EntityAI Jumpsuit_BlueClass(PlayerBase player)
	{
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("MakarovIJ70");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_IJ70_8Rnd", 2);
		addMags(player, "Ammo_380", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return handgun;	
	}
	EntityAI Jumpsuit_BlueClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("JumpsuitJacket_Blue");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Pear");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Pear");
		
		ItemBase pants = player.GetInventory().CreateInInventory("JumpsuitPants_Blue");
		pants.GetInventory().CreateInInventory("PersonalRadio");
		pants.GetInventory().CreateInInventory("Battery9V");

		
		player.GetInventory().CreateInInventory("HikingBootsLow_Blue");
		player.GetInventory().CreateInInventory("SurgicalGloves_LightBlue");
		player.GetInventory().CreateInInventory("DarkMotoHelmet_Blue");
		player.GetInventory().CreateInInventory("SportGlasses_Blue");
		player.GetInventory().CreateInInventory("Balaclava3Holes_Blue");
		player.GetInventory().CreateInInventory("WoodAxe");
		player.GetInventory().CreateInInventory("SmershBag");
		player.GetInventory().CreateInInventory("ChestHolster");
		player.GetInventory().CreateInInventory("Hammer");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("WaterBottle");
		player.GetInventory().CreateInInventory("ChernarusMap");
		player.GetInventory().CreateInInventory("Compass");
		player.GetInventory().CreateInInventory("DuctTape");
		player.GetInventory().CreateInInventory("Matchbox");
		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(3);
		
		return gear;	
	}	
 	EntityAI Jumpsuit_GrayClass(PlayerBase player)
	{
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("FNX45");
		handgun.GetInventory().CreateAttachment("FNP45_MRDSOptic");
		EntityAI FNP45_MRDSOptic = FNP45_MRDSOptic.GetInventory().CreateAttachment("Battery9V");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_FNX45_15Rnd", 2);
		addMags(player, "Ammo_45ACP", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return handgun;
	}
	EntityAI Jumpsuit_GrayClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("JumpsuitJacket_Gray");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Pear");
		jacket.GetInventory().CreateInInventory("Pear");
		
		ItemBase pants = player.GetInventory().CreateInInventory("JumpsuitPants_Grey");
		pants.GetInventory().CreateInInventory("CombatKnife");
		pants.GetInventory().CreateInInventory("PersonalRadio");
		pants.GetInventory().CreateInInventory("Battery9V");
		
		player.GetInventory().CreateInInventory("Sneakers_Gray");
		player.GetInventory().CreateInInventory("DesignerGlasses");
		player.GetInventory().CreateInInventory("DarkMotoHelmet_Grey");
		player.GetInventory().CreateInInventory("PeachesCan");
		player.GetInventory().CreateInInventory("NBCGlovesGray");
		player.GetInventory().CreateInInventory("WoodAxe");
		player.GetInventory().CreateInInventory("SmershBag");
		player.GetInventory().CreateInInventory("ChestHolster");
		player.GetInventory().CreateInInventory("Hammer");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("WaterBottle");
		player.GetInventory().CreateInInventory("ChernarusMap");
		player.GetInventory().CreateInInventory("Compass");
		player.GetInventory().CreateInInventory("DuctTape");
		player.GetInventory().CreateInInventory("Matchbox");
		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(3);
		
		return gear;	
	}
 	EntityAI Jumpsuit_GreenClass(PlayerBase player)
	{
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("CZ75");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_CZ75_15Rnd", 2);
		addMags(player, "Ammo_9x19", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return handgun;	
	}	
	EntityAI Jumpsuit_GreenClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("JumpsuitJacket_Green");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Pear");
		jacket.GetInventory().CreateInInventory("Pear");
		
		ItemBase pants = player.GetInventory().CreateInInventory("JumpsuitPants_Green");
		pants.GetInventory().CreateInInventory("CombatKnife");
		pants.GetInventory().CreateInInventory("PersonalRadio");
		pants.GetInventory().CreateInInventory("Battery9V");
		
		player.GetInventory().CreateInInventory("Sneakers_Green");
		player.GetInventory().CreateInInventory("SportGlasses_Green");
		player.GetInventory().CreateInInventory("DarkMotoHelmet_Green");
		player.GetInventory().CreateInInventory("PeachesCan");
		player.GetInventory().CreateInInventory("SurgicalGloves_Green");
		player.GetInventory().CreateInInventory("WoodAxe");
		player.GetInventory().CreateInInventory("SmershBag");
		player.GetInventory().CreateInInventory("ChestHolster");
		player.GetInventory().CreateInInventory("Hammer");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("WaterBottle");
		player.GetInventory().CreateInInventory("ChernarusMap");
		player.GetInventory().CreateInInventory("Compass");
		player.GetInventory().CreateInInventory("DuctTape");
		player.GetInventory().CreateInInventory("Matchbox");
		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(3);
		
		
		return gear;	
	}
	EntityAI Jumpsuit_RedClass(PlayerBase player)
	{
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("MakarovIJ70");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_IJ70_8Rnd", 2);
		addMags(player, "Ammo_380", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return handgun;		
	}
	EntityAI Jumpsuit_RedClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("JumpsuitJacket_Red");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Pear");
		jacket.GetInventory().CreateInInventory("Pear");
		
		ItemBase pants = player.GetInventory().CreateInInventory("JumpsuitPants_Red");
		pants.GetInventory().CreateInInventory("CombatKnife");
		pants.GetInventory().CreateInInventory("PersonalRadio");
		pants.GetInventory().CreateInInventory("Battery9V");
		
		player.GetInventory().CreateInInventory("Sneakers_Red");
		player.GetInventory().CreateInInventory("SportGlasses_Orange");
		player.GetInventory().CreateInInventory("DarkMotoHelmet_Red");
		player.GetInventory().CreateInInventory("PeachesCan");
		player.GetInventory().CreateInInventory("Bandana_Redpattern");
		player.GetInventory().CreateInInventory("WoodAxe");
		player.GetInventory().CreateInInventory("SmershBag");
		player.GetInventory().CreateInInventory("ChestHolster");
		player.GetInventory().CreateInInventory("Hammer");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("WaterBottle");
		player.GetInventory().CreateInInventory("ChernarusMap");
		player.GetInventory().CreateInInventory("Compass");
		player.GetInventory().CreateInInventory("DuctTape");
		player.GetInventory().CreateInInventory("Matchbox");
		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(3);
		
		return gear;	
	}
	
	EntityAI NBCGrayClass(PlayerBase player)
	{
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("CZ75");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_CZ75_15Rnd", 2);
		addMags(player, "Ammo_9x19", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return handgun;
	}
	EntityAI NBCGrayClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("NBCJacketGray");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Pear");
		jacket.GetInventory().CreateInInventory("Pear");
		
		ItemBase pants = player.GetInventory().CreateInInventory("NBCPantsGray");
		pants.GetInventory().CreateInInventory("CombatKnife");
		pants.GetInventory().CreateInInventory("PersonalRadio");
		pants.GetInventory().CreateInInventory("Battery9V");
		
		player.GetInventory().CreateInInventory("NBCBootsGray");
		player.GetInventory().CreateInInventory("AviatorGlasses");
		player.GetInventory().CreateInInventory("NBCHoodGray");
		player.GetInventory().CreateInInventory("PeachesCan");
		player.GetInventory().CreateInInventory("NBCGlovesGray");
		player.GetInventory().CreateInInventory("GP5GasMask");
		player.GetInventory().CreateInInventory("WoodAxe");
		player.GetInventory().CreateInInventory("SmershBag");
		player.GetInventory().CreateInInventory("ChestHolster");
		player.GetInventory().CreateInInventory("Hammer");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("WaterBottle");
		player.GetInventory().CreateInInventory("ChernarusMap");
		player.GetInventory().CreateInInventory("Compass");
		player.GetInventory().CreateInInventory("DuctTape");
		player.GetInventory().CreateInInventory("Matchbox");
		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(3);
		
		return gear;	
	}
	EntityAI PrisonClass(PlayerBase player)
	{
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("MakarovIJ70");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_IJ70_8Rnd", 2);
		addMags(player, "Ammo_380", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return handgun;
	}
	EntityAI PrisonClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("PrisonUniformJacket");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Pear");
		jacket.GetInventory().CreateInInventory("Pear");
			
		ItemBase pants = player.GetInventory().CreateInInventory("PrisonUniformPants");
		pants.GetInventory().CreateInInventory("CombatKnife");
		
		player.GetInventory().CreateInInventory("PrisonerCap");
		player.GetInventory().CreateInInventory("PersonalRadio");
		player.GetInventory().CreateInInventory("Battery9V");
		player.GetInventory().CreateInInventory("ChestHolster");

		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(2);
		
		return gear;	
	}
	EntityAI BlackClass(PlayerBase player)
	{
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("FNX45");
		handgun.GetInventory().CreateAttachment("FNP45_MRDSOptic");
		EntityAI FNP45_MRDSOptic = FNP45_MRDSOptic.GetInventory().CreateAttachment("Battery9V");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_FNX45_15Rnd", 2);
		addMags(player, "Ammo_45ACP", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return handgun;
	}
	EntityAI BlackClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("RidersJacket_Black");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Apple");
		jacket.GetInventory().CreateInInventory("Apple");
		
		ItemBase pants = player.GetInventory().CreateInInventory("SlacksPants_Black");
		pants.GetInventory().CreateInInventory("Pear");
		pants.GetInventory().CreateInInventory("Pear");
		
		player.GetInventory().CreateInInventory("CowboyHat_black");
		player.GetInventory().CreateInInventory("SportGlasses_Black");
		player.GetInventory().CreateInInventory("DressShoes_Black");
		player.GetInventory().CreateInInventory("WorkingGloves_Black");
		player.GetInventory().CreateInInventory("Bandana_Blackpattern");
		player.GetInventory().CreateInInventory("ChestHolster");
		player.GetInventory().CreateInInventory("DryBag_Black");
		player.GetInventory().CreateInInventory("PeachesCan");
		player.GetInventory().CreateInInventory("WoodAxe");
		player.GetInventory().CreateInInventory("Hammer");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("WaterBottle");
		player.GetInventory().CreateInInventory("ChernarusMap");
		player.GetInventory().CreateInInventory("Compass");
		player.GetInventory().CreateInInventory("DuctTape");
		player.GetInventory().CreateInInventory("Matchbox");
		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(3);
		
		return gear;	
	}
	EntityAI LeatherNaturalClass(PlayerBase player)
	{
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("CZ75");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_CZ75_15Rnd", 2);
		addMags(player, "Ammo_9x19", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return handgun;
	}
	EntityAI LeatherNaturalClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("LeatherJacket_Natural");
		jacket.GetInventory().CreateInInventory("TacticalBaconCan");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Apple");
		jacket.GetInventory().CreateInInventory("Apple");
		
		ItemBase pants = player.GetInventory().CreateInInventory("LeatherPants_Natural");
		pants.GetInventory().CreateInInventory("CombatKnife");
		pants.GetInventory().CreateInInventory("PersonalRadio");
		pants.GetInventory().CreateInInventory("Battery9V");
		
		player.GetInventory().CreateInInventory("LeatherHat_Natural");
		player.GetInventory().CreateInInventory("ThinFramesGlasses");
		player.GetInventory().CreateInInventory("LeatherShoes_Natural");
		player.GetInventory().CreateInInventory("LeatherGloves_Natural");
		player.GetInventory().CreateInInventory("Balaclava3Holes_Beige");
		player.GetInventory().CreateInInventory("LeatherSack_Natural");
		player.GetInventory().CreateInInventory("ChestHolster");
		player.GetInventory().CreateInInventory("PeachesCan");
		player.GetInventory().CreateInInventory("WoodAxe");
		player.GetInventory().CreateInInventory("Hammer");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("NailBox");
		player.GetInventory().CreateInInventory("WaterBottle");
		player.GetInventory().CreateInInventory("ChernarusMap");
		player.GetInventory().CreateInInventory("Compass");
		player.GetInventory().CreateInInventory("DuctTape");
		player.GetInventory().CreateInInventory("Matchbox");
		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(3);
		
		return gear;	
	}
	EntityAI PoliceClass(PlayerBase player)
	{
		EntityAI gun = player.GetHumanInventory().CreateInHands("CZ61");
		gun.GetInventory().CreateAttachment("Suppressor_East");
		addMags(player, "Mag_CZ61_20Rnd", 2);
		addMags(player, "AmmoBox_380_35rnd", 2);
		EntityAI handgun = player.GetHumanInventory().CreateInInventory("FNX45");
		handgun.GetInventory().CreateAttachment("FNP45_MRDSOptic");
		EntityAI FNP45_MRDSOptic = FNP45_MRDSOptic.GetInventory().CreateAttachment("Battery9V");
		handgun.GetInventory().CreateAttachment("PistolSuppressor");
		addMags(player, "Mag_FNX45_15Rnd", 2);
		addMags(player, "Ammo_45ACP", 1);
		player.SetQuickBarEntityShortcut(handgun, 1, true);
 		return gun;
	}
	EntityAI PoliceClassgear(PlayerBase player)
	{
		EntityAI gear;
		
		ItemBase jacket = player.GetInventory().CreateInInventory("PoliceJacket");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Plum");
		jacket.GetInventory().CreateInInventory("Apple");
		jacket.GetInventory().CreateInInventory("Apple");
				
		ItemBase pants = player.GetInventory().CreateInInventory("PolicePants");
		pants.GetInventory().CreateInInventory("PersonalRadio");
		pants.GetInventory().CreateInInventory("Battery9V");
		
		player.GetInventory().CreateInInventory("PoliceCap");
		player.GetInventory().CreateInInventory("AviatorGlasses");
		player.GetInventory().CreateInInventory("SurgicalGloves_Blue");
		player.GetInventory().CreateInInventory("DressShoes_Black");
		player.GetInventory().CreateInInventory("TaloonBag_Blue");
		player.GetInventory().CreateInInventory("PoliceVest");
		player.GetInventory().CreateInInventory("PeachesCan");
		player.GetInventory().CreateInInventory("ChestHolster");
		player.GetInventory().CreateInInventory("WoodAxe");
		player.GetInventory().CreateInInventory("HandcuffKeys");
		player.GetInventory().CreateInInventory("Handcuffs");
		player.GetInventory().CreateInInventory("Handcuffs");
		player.GetInventory().CreateInInventory("WaterBottle");
		player.GetInventory().CreateInInventory("ChernarusMap");
		player.GetInventory().CreateInInventory("Compass");
		player.GetInventory().CreateInInventory("DuctTape");
		player.GetInventory().CreateInInventory("Matchbox");
		
		itemEnt = player.GetInventory().CreateInInventory("Rag");
		itemBs = ItemBase.Cast(itemEnt);
		itemBs.SetQuantity(3);
		
		return gear;	
	}
 	override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
	{
		player.RemoveAllItems();
		
		EntityAI gear;
		EntityAI primary;
		//EntityAI axe = player.GetInventory().CreateInInventory("Morphine");
 		switch (Math.RandomInt(0, 12)) {
			case 0: primary = Firefighter_BeigeClass(player); 
			           gear = Firefighter_BeigeClassgear(player); break;
			case 1: primary = Firefighter_BlackClass(player);
			           gear = Firefighter_BlackClassgear(player); break;
			case 2: primary = ParamedicClass(player);
			           gear = ParamedicClassgear(player); break;
			case 3: primary = Jumpsuit_BlueClass(player);
					   gear = Jumpsuit_BlueClassgear(player); break;
			case 4: primary = Jumpsuit_GrayClass(player);
			           gear = Jumpsuit_GrayClassgear(player); break;
			case 5: primary = Jumpsuit_GreenClass(player);
			           gear = Jumpsuit_GreenClassgear(player); break;
			case 6: primary = Jumpsuit_RedClass(player);
			           gear = Jumpsuit_RedClassgear(player); break;
		    case 7: primary = NBCGrayClass(player); 
			           gear = NBCGrayClassgear(player); break;
		    case 8: primary = PrisonClass(player); 
			           gear = PrisonClassgear(player); break;
			case 9: primary = BlackClass(player); 
			           gear = BlackClassgear(player); break;
		    case 10: primary = LeatherNaturalClass(player); 
			           gear = LeatherNaturalClassgear(player); break;
			case 11: primary = PoliceClass(player); 
			           gear = PoliceClassgear(player); break;
		}
 		player.LocalTakeEntityToHands(primary);
		player.SetQuickBarEntityShortcut(primary, 0, true);
	}

 

Share this post


Link to post
Share on other sites

no the server dont start 

Share this post


Link to post
Share on other sites
1 hour ago, Mostabdel said:

no the server dont start 

any screenshots with errors?

Share this post


Link to post
Share on other sites
Sign in to follow this  

×