Spoiler
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
class=initArray(32)
function classmenu(id)
menu(id,"Select your Class,Chainsaw Zombie,Boss Zombie,Boomer Zombie,Builder Zombie")
end
addhook("team","classesteam")
function classesteam(id,team)
if (team==0) then
class[id]=0
end
if (team==1) then
classmenu(id)
end
if (team==2) then
class[id]=0
end
end
addhook("serveraction","classesserveraction")
function classesserveraction(id)
classmenu(id)
end
addhook("menu","classesmenu")
function classesmenu(id,menu,sel)
if (menu=="Select your Class") then
if (sel>=1 and sel<=4) then
class[id]=sel
if (player(id,"health")>0) then
parse("killplayer "..id)
end
end
end
end
addhook("spawn","classesspawn")
function classesspawn(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
end
addhook("buy","classesbuy")
function classesbuy()
return 1
end
addhook("serveraction","_serveraction")
addhook("menu","_menu")
function _serveraction(id,act)
if act==1 then
menu("BUY MENU,Airstrike|$100")
end
end
function _menu(id,title,button)
if title=="BUY MENU" then
if button==1 then
if player(id,"money")>=100 then
parse("equip "..id.." 76")
parse("setmoney "..id.." "..player(id,"money")-100)
else
msg2(id,"Not enough money.")
end
end
end
end
end
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
class=initArray(32)
function classmenu(id)
menu(id,"Select your Class,Chainsaw Zombie,Boss Zombie,Boomer Zombie,Builder Zombie")
end
addhook("team","classesteam")
function classesteam(id,team)
if (team==0) then
class[id]=0
end
if (team==1) then
classmenu(id)
end
if (team==2) then
class[id]=0
end
end
addhook("serveraction","classesserveraction")
function classesserveraction(id)
classmenu(id)
end
addhook("menu","classesmenu")
function classesmenu(id,menu,sel)
if (menu=="Select your Class") then
if (sel>=1 and sel<=4) then
class[id]=sel
if (player(id,"health")>0) then
parse("killplayer "..id)
end
end
end
end
addhook("spawn","classesspawn")
function classesspawn(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
end
addhook("buy","classesbuy")
function classesbuy()
return 1
end
addhook("serveraction","_serveraction")
addhook("menu","_menu")
function _serveraction(id,act)
if act==1 then
menu("BUY MENU,Airstrike|$100")
end
end
function _menu(id,title,button)
if title=="BUY MENU" then
if button==1 then
if player(id,"money")>=100 then
parse("equip "..id.." 76")
parse("setmoney "..id.." "..player(id,"money")-100)
else
msg2(id,"Not enough money.")
end
end
end
end
end