Spoiler
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
class=initArray(32)
classes.classmenu(id)
menu(id,"Select your Class,Chainsaw Zombie,Boss Zombie,Boomer Zombie,Builder Zombie")
end
addhook("team","team")
function team(id,team)
if (team>1) then
classmenu(id)
end
end
addhook("serveraction","serveraction")
function serveraction(id)
classmenu(id)
end
addhook("menu","menu")
function menu(id,menu,sel)
if (menu=="Select your Class") then
if (sel>=0 and sel<=6) then
class[id]=sel
if (player(id,"health")>0) then
parse("killplayer "..id)
end
end
end
end
addhook("spawn","sample.classes.spawn")
function sample.classes.spawn(id)
-- Chainsaw Zombie
if (class[id]<=1) then
parse ("setmaxhealth "..id.." 150")
parse ("setarmor "..id.." 100")
parse ("speedmod "..id.." 0")
return "85,86";
end
-- Boss Zombie
if (class[id]==2) then
parse ("setmaxhealth "..id.." 150")
parse ("setarmor "..id.." 250")
parse ("speedmod "..id.." -2")
return "83,86";
end
-- Boomer Zombie
if (class[id]==3) then
parse ("setmaxhealth "..id.." 1")
parse ("setarmor "..id.." 0")
parse ("speedmod "..id.." 1")
return "72,86";
end
-- Builder Zombie
if (class[id]==4) then
parse ("setmaxhealth "..id.." 125")
parse ("setarmor "..id.." 75")
parse ("speedmod "..id.." -2")
return "86,74";
end
addhook("buy","buy")
function buy()
return 1
end
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
class=initArray(32)
classes.classmenu(id)
menu(id,"Select your Class,Chainsaw Zombie,Boss Zombie,Boomer Zombie,Builder Zombie")
end
addhook("team","team")
function team(id,team)
if (team>1) then
classmenu(id)
end
end
addhook("serveraction","serveraction")
function serveraction(id)
classmenu(id)
end
addhook("menu","menu")
function menu(id,menu,sel)
if (menu=="Select your Class") then
if (sel>=0 and sel<=6) then
class[id]=sel
if (player(id,"health")>0) then
parse("killplayer "..id)
end
end
end
end
addhook("spawn","sample.classes.spawn")
function sample.classes.spawn(id)
-- Chainsaw Zombie
if (class[id]<=1) then
parse ("setmaxhealth "..id.." 150")
parse ("setarmor "..id.." 100")
parse ("speedmod "..id.." 0")
return "85,86";
end
-- Boss Zombie
if (class[id]==2) then
parse ("setmaxhealth "..id.." 150")
parse ("setarmor "..id.." 250")
parse ("speedmod "..id.." -2")
return "83,86";
end
-- Boomer Zombie
if (class[id]==3) then
parse ("setmaxhealth "..id.." 1")
parse ("setarmor "..id.." 0")
parse ("speedmod "..id.." 1")
return "72,86";
end
-- Builder Zombie
if (class[id]==4) then
parse ("setmaxhealth "..id.." 125")
parse ("setarmor "..id.." 75")
parse ("speedmod "..id.." -2")
return "86,74";
end
addhook("buy","buy")
function buy()
return 1
end