----------------------------
-- zm_DeathStreet --------------
-- Map by : GabPro ---------
----------------------------

-- Activate Script?
active_script=true
-- Survivor Health?
ct_health=100
-- Zombie Health?
tr_health=100
-- Survivor Speed?
ct_speed=10
-- Zombie Speed?
tr_speed=0
-- Settings
addhook("startround","settings")
function settings(mode)
	if active_script then
		parse("mp_building_limit \"Barricade\" 100")
		parse("mp_building_limit \"Barbed Wire\" 10")
		parse("mp_building_limit \"Wall I\" 2")
		parse("mp_building_limit \"Wall II\" 2")
		parse("mp_building_limit \"Wall III\" 2")
		parse("mp_building_limit \"Turret\" 1")
		parse("mp_building_limit \"Dispenser\" 1")
		parse("mp_building_limit \"Supply\" 0")
		parse("mp_building_limit \"Gate field\" 3")
		parse("mp_building_price \"Barricade\" 250")
		parse("mp_building_price \"Barbed Wire\" 250")
		parse("mp_building_price \"Wall I\" 500")
		parse("mp_building_price \"Wall II\" 750")
		parse("mp_building_price \"Wall III\" 1000")
		parse("mp_building_price \"Turret\" 5000")
		parse("mp_building_price \"Dispenser\" 2000")
		parse("mp_building_price \"Gate field\" 250")
	end
end

----------------------------
------ Knife Trigger -------
----------------------------
addhook("trigger","knife_trigger")
function knife_trigger(name,source)
	if active_script then
		if (name == "knife1") then
			parse("spawnitem 50 1 20")
		end
		if (name == "knife2") then
			parse("spawnitem 50 3 20")
		end
		if (name == "knife3") then
			parse("spawnitem 50 7 31")
		end
		if (name == "kev1") then
			parse("spawnitem 57 35 5")
		end
		if (name == "kev2") then
			parse("spawnitem 57 35 6")
		end
		if (name == "kev3") then
			parse("spawnitem 57 35 7")
		end
		if (name == "kev4") then
			parse("spawnitem 57 35 8")
		end
		if (name == "kev5") then
			parse("spawnitem 57 35 9")
		end
		if (name == "kev6") then
			parse("spawnitem 57 35 10")
		end
	end
end

----------------------------
---------- Spawn -----------
----------------------------
addhook("spawn","spawn_zm")
function spawn_zm(id)
	if active_script then
		if player(id,"team")==2 then
			parse("setmaxhealth "..id.." "..ct_health)
			parse("equip "..id.." 74")
			parse("setweapon "..id.." 74")
			parse("strip "..id.." 50")
			parse("speedmod "..id.." "..ct_speed)
		end
		if player(id,"team")==1 then
			parse("setmaxhealth "..id.." "..tr_health)
			parse("speedmod "..id.." "..tr_speed)
		end
	end
end