Spoiler 

spawny={1,2,5,6,7,9,8,11,12,15,13,14,10,22,23}
addhook("serveraction","objectaction")
function objectaction(id,act)
if act==1 then
menu(id,"Spawn Buildings P2,Barricade,Barbed Wire,Wall3,Gate Field,Dispenser,Supply,Single Turret,Dual Turret,Next")
end
end
addhook("menu","objectmenu")
function objectmenu(id,title,buton)
if title=="Spawn building" then
if buton==1 then
menu(id,"'..spawny[1]..',Up,Down,Left,Right,Back")
elseif buton==2 then
menu(id,"'..spawny[2]..',Up,Down,Left,Right,Back")
elseif buton==3 then
menu(id,"'..spawny[3]..',Up,Down,Left,Right,Back")
elseif buton==4 then
menu(id,"'..spawny[4]..',Up,Down,Left,Right,Back")
elseif buton==5 then
menu(id,"'..spawny[5]..',Up,Down,Left,Right,Back")
elseif buton==6 then
menu(id,"'..spawny[6]..',Up,Down,Left,Right,Back")
elseif buton==7 then
menu(id,"'..spawny[7]..',Up,Down,Left,Right,Back")
elseif buton==8 then
menu(id,"'..spawny[8]..',Up,Down,Left,Right,Back")
elseif buton==9 then
menu(id,"Spawn Buildings P2,Triple Turret,Super Supply,Teleporter Entrance,Teleporter Exit,Construction Site,Orange Portal,Blue Portal,Next")
end
end
if title=="Spawn building P2" then
if buton == 1 then
menu(id,"'..spawny[9]..',Up,Down,Left,Right,Back")
elseif buton == 2 then
menu(id,"'..spawny[10]..',Up,Down,Left,Right,Back")
elseif buton == 3 then
menu(id,"'..spawny[11]..',Up,Down,Left,Right,Back")
elseif buton == 4 then
menu(id,"'..spawny[12]..',Up,Down,Left,Right,Back")
elseif buton == 5 then
menu(id,"'..spawny[13]..',Up,Down,Left,Right,Back")
elseif buton == 6 then
menu(id,"'..spawny[14]..',Up,Down,Left,Right,Back")
elseif buton == 7 then
menu(id,"'..spawny[15]..',Up,Down,Left,Right,Back")
elseif buton == 8 then
menu(id,"Spawn Buildings P2,Barricade,Barbed Wire,Wall3,Gate Field,Dispenser,Supply,Single Turret,Dual Turret,Next")
end
end
if title=="''..spawny[id]..'" then
if buton==1 then
parse("spawnobject "..spawny[id].." "..(player(id,"tilex").." "..player(id,"tiley")-1).." 1 1 "..player(id,"team").." "..id)
menu(id,"Barricade,Up,Down,Left,Right,Back")
elseif buton==2 then
parse("spawnobject "..spawny[id].." "..(player(id,"tilex").." "..player(id,"tiley")+1).." 1 1 "..player(id,"team").." "..id)
menu(id,"Barricade,Up,Down,Left,Right,Back")
elseif buton==3 then
parse("spawnobject "..spawny[id].." "..(player(id,"tilex")-1).." "..player(id,"tiley").." 1 1 "..player(id,"team").." "..id)
menu(id,"Barricade,Up,Down,Left,Right,Back")
elseif buton==4 then
parse("spawnobject "..spawny[id].." "..(player(id,"tilex")+1).." "..player(id,"tiley").." 1 1 "..player(id,"team").." "..id)
menu(id,"Barricade,Up,Down,Left,Right,Back")
elseif buton==5 then
menu(id,"Spawn Buildings P2,Triple Turret,Super Supply,Teleporter Entrance,Teleporter Exit,Construction Site,Orange Portal,Blue Portal,Next")
end
end
end
addhook("serveraction","objectaction")
function objectaction(id,act)
if act==1 then
menu(id,"Spawn Buildings P2,Barricade,Barbed Wire,Wall3,Gate Field,Dispenser,Supply,Single Turret,Dual Turret,Next")
end
end
addhook("menu","objectmenu")
function objectmenu(id,title,buton)
if title=="Spawn building" then
if buton==1 then
menu(id,"'..spawny[1]..',Up,Down,Left,Right,Back")
elseif buton==2 then
menu(id,"'..spawny[2]..',Up,Down,Left,Right,Back")
elseif buton==3 then
menu(id,"'..spawny[3]..',Up,Down,Left,Right,Back")
elseif buton==4 then
menu(id,"'..spawny[4]..',Up,Down,Left,Right,Back")
elseif buton==5 then
menu(id,"'..spawny[5]..',Up,Down,Left,Right,Back")
elseif buton==6 then
menu(id,"'..spawny[6]..',Up,Down,Left,Right,Back")
elseif buton==7 then
menu(id,"'..spawny[7]..',Up,Down,Left,Right,Back")
elseif buton==8 then
menu(id,"'..spawny[8]..',Up,Down,Left,Right,Back")
elseif buton==9 then
menu(id,"Spawn Buildings P2,Triple Turret,Super Supply,Teleporter Entrance,Teleporter Exit,Construction Site,Orange Portal,Blue Portal,Next")
end
end
if title=="Spawn building P2" then
if buton == 1 then
menu(id,"'..spawny[9]..',Up,Down,Left,Right,Back")
elseif buton == 2 then
menu(id,"'..spawny[10]..',Up,Down,Left,Right,Back")
elseif buton == 3 then
menu(id,"'..spawny[11]..',Up,Down,Left,Right,Back")
elseif buton == 4 then
menu(id,"'..spawny[12]..',Up,Down,Left,Right,Back")
elseif buton == 5 then
menu(id,"'..spawny[13]..',Up,Down,Left,Right,Back")
elseif buton == 6 then
menu(id,"'..spawny[14]..',Up,Down,Left,Right,Back")
elseif buton == 7 then
menu(id,"'..spawny[15]..',Up,Down,Left,Right,Back")
elseif buton == 8 then
menu(id,"Spawn Buildings P2,Barricade,Barbed Wire,Wall3,Gate Field,Dispenser,Supply,Single Turret,Dual Turret,Next")
end
end
if title=="''..spawny[id]..'" then
if buton==1 then
parse("spawnobject "..spawny[id].." "..(player(id,"tilex").." "..player(id,"tiley")-1).." 1 1 "..player(id,"team").." "..id)
menu(id,"Barricade,Up,Down,Left,Right,Back")
elseif buton==2 then
parse("spawnobject "..spawny[id].." "..(player(id,"tilex").." "..player(id,"tiley")+1).." 1 1 "..player(id,"team").." "..id)
menu(id,"Barricade,Up,Down,Left,Right,Back")
elseif buton==3 then
parse("spawnobject "..spawny[id].." "..(player(id,"tilex")-1).." "..player(id,"tiley").." 1 1 "..player(id,"team").." "..id)
menu(id,"Barricade,Up,Down,Left,Right,Back")
elseif buton==4 then
parse("spawnobject "..spawny[id].." "..(player(id,"tilex")+1).." "..player(id,"tiley").." 1 1 "..player(id,"team").." "..id)
menu(id,"Barricade,Up,Down,Left,Right,Back")
elseif buton==5 then
menu(id,"Spawn Buildings P2,Triple Turret,Super Supply,Teleporter Entrance,Teleporter Exit,Construction Site,Orange Portal,Blue Portal,Next")
end
end
end
It doesnt work for me and I was wondering if anyone could tell me what ive done wrong.
help will be appreciated