parse("equip "..p.." 50")
Anyone know why it dosent work?
General
Equip with knife
Equip with knife
1

-----------------------------------------------------
-- Zombe Mod Script by Holloweye --
-----------------------------------------------------
if sample==nil then sample={} end
sample.fast={}
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end
sample.fast.hp=initArray(99)
state = 0
first = 1
tspawmx = 0
tspawny = 0
parse("mp_infammo 1")
parse("mp_autoteambalance 0")
parse("mp_freezetime 0")
--parse("bot_jointeam 1")
--------------------------------------
-- MAKE ZOMBIES --
--------------------------------------
addhook("spawn","sample.fast.spawn")
function sample.fast.spawn(p)
	--msg2(p,"Test: " .. player(p,"team"))
	if (player(p,"team")==1) then
		if(first == 1)then
			first = 0
			tspawnx = player(p,"x")
			tspawny = player(p,"y")
		end
		parse("setmaxhealth "..p.." "..250)
		parse("sethealth "..p.." "..250)
		parse("setmoney "..p.." "..0)
		sample.fast.hp[p]=250
		parse("strip "..p.." "..2)
		parse("strip "..p.." "..55)
		parse("equip "..p.." 50")
	else
		parse("setmoney "..p.." "..15000)
	end
end
addhook("collect","sample.fast.collect")
function sample.fast.collect(p,iid,type,ain,a,mode)
	if (player(p,"team")==1) then
		if(type==50)then
		else
			parse("strip "..p.." "..type)
		end
	end
end
addhook("die","sample.fast.death")
function sample.fast.death(p,killer,weapon,x,y)
if(player(p,"team")==2)then
	local antal = 0
	local i
	for i = 1, 32 do
		if (player(i,"exists")==true and player(i,"team")==2) then
			 antal = antal + 1
		 end
		
	end
	if(antal>1)then
		if(state==0)then
	 local t = "@swap "..p.." t"
		 if t:sub(1, 6) == "@swap " then
	 	local pl = t:sub(7, 8)
	 	local team = t:sub(9)
	 	for word in team:gmatch("[^%s]+") do
	 	 team = word
	 	 break
	 	end
	 	parse("make"..team.." "..pl)
		 end
		 parse("spawnplayer "..p.." "..tspawnx.." "..tspawny)--17/70 - 26/79
		 --parse("equip "..p.." 50")
		end
	end
else
	if(state==0)then
	local t = "@swap "..p.." t"
	 if t:sub(1, 6) == "@swap " then
	local pl = t:sub(7, 8)
	local team = t:sub(9)
	for word in team:gmatch("[^%s]+") do
	 team = word
	 break
	end
	parse("make"..team.." "..pl)
	 end
	parse("spawnplayer "..p.." "..tspawnx.." "..tspawny)--17/70 - 26/79
	--parse("equip "..p.." 50")
	end
end
end
addhook("hit","sample.fast.hit")
function sample.fast.hit(p,source,weapon,hpdmg,apdmg)
	if (player(p,"team")==1) then
		if (sample.fast.hp[p] > 0) then
			if (sample.fast.hp[p] >= hpdmg) then
				sample.fast.hp[p]=sample.fast.hp[p]-hpdmg
				parse("sethealth "..p.." "..250)
			else
				parse("sethealth "..p.." "..player(p,"health")+sample.fast.hp[p])
				sample.fast.hp[p]=0
			end
		end
	end
end
addhook("endround","sample.fast.endround")
function sample.fast.endround(mode)
	state = 1
	local i
	for i = 1, 32 do
		if (player(i,"exists")==true and player(i,"bot")==false and player(i,"team")==1) then
			 --msg2(i,"YES")
			 local t = "@swap "..i.." ct"
			 if t:sub(1, 6) == "@swap " then
			local pl = t:sub(7, 8)
		 	local team = t:sub(9)
		 	for word in team:gmatch("[^%s]+") do
		 	 team = word
			 break
			end
			parse("make"..team.." "..pl)
			 end
		 end
		
	end
	parse("mp_autoteambalance 1")
	--parse("mp_autoteambalance 1")
end
addhook("startround","sample.fast.startround")
function sample.fast.startround(mode)
	state = 0
	parse("mp_autoteambalance 0")
end
1
