timer1 = 15
addhook("join","join")
function join()
parse("sv_gamemode 4")
end

addhook("spawn","spawn")
function spawn(id)
if player(id,"team")==1 then
parse("speedmod "..id.." -10")
parse("setmaxhealth "..id.." 80")
else
parse("setmaxhealth "..id.." 100")
end
end

addhook("second","second")
function second()
if timer1>=1 then
timer1=timer1-1
if timer1==1 then
timer1=15
for i = 1, 50 do
local d = 1
while d==1 do
local a = math.random(0,60)
local b = math.random(0,81)
local c = math.random(0,360)
if tile(a,b,"walkable") then
d = 0
parse("spawnnpc 1 "..a.." "..b.." "..c)
end
end
end
end
end
end

addhook("objectkill","objectkill")
function objectkill(o,i)
if (object(o,"typename")=='NPC') then
parse("setscore "..i.." "..player(i,"score")+1)
parse("setmoney "..i.." "..player(i,"money")+300)
parse('sv_sound "player/zm_die.wav"')

end
end

addhook("die","die")
function die(victim,killer,weapon,x,y)
if player(killer,"team")==player(victim,"team") then
else
if player(victim,"team")~=1 then
parse("maket "..victim)
end
end
end
