Forum

> > CS2D > Scripts > lua admin
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch lua admin

2 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt lua admin

Spook MQ Hacker
BANNED Off Offline

Zitieren
guys something wrong with my lua

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
addhook("menu","admmenu")
function admmenu(id,title,buton)
thenames(i)
if title=="Admin Menu" then
if buton==1 then
menu(id,"Spawn Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
end
end
if title=="Spawn Creature" then
if buton==1 then
parse('spawnnpc 1 '..(cx[id]/32)..' '..(cy[id]/32))
menu(id,"Spawn Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
elseif buton==2 then
parse('spawnnpc 2 '..(cx[id]/32)..' '..(cy[id]/32))
menu(id,"Spawn Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
elseif buton==3 then
parse('spawnnpc 3 '..(cx[id]/32)..' '..(cy[id]/32))
menu(id,"Spawn Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
elseif buton==4 then
parse('spawnnpc 4 '..(cx[id]/32)..' '..(cy[id]/32))
menu(id,"Spawn Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
elseif buton==5 then
parse('spawnnpc 5 '..(cx[id]/32)..' '..(cy[id]/32))
menu(id,"Spawn Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
elseif buton==6 then
menu(id,"Admin Menu,Server Settings,Spawn Creature,Spawn Object,Spawn Item,V.I.P,Punish,Give Items,Restart,More -->")
end
end

help?...

alt Re: lua admin

Apache uwu
User Off Offline

Zitieren
You forgot an end at the end. --''

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
addhook("menu","admmenu")
function admmenu(id,title,buton)
	thenames(i)
		if title=="Admin Menu" then
			if buton==1 then
				menu(id,"Spawn Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
			end
		end
		if title=="Spawn Creature" then
			if buton==1 then
				parse('spawnnpc 1 '..(cx[id]/32)..' '..(cy[id]/32))
menu(id,"Spawn 				Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
			elseif buton==2 then
				parse('spawnnpc 2 '..(cx[id]/32)..' '..(cy[id]/32))
				menu(id,"Spawn Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
			elseif buton==3 then
				parse('spawnnpc 3 '..(cx[id]/32)..' '..(cy[id]/32))
				menu(id,"Spawn Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
			elseif buton==4 then
				parse('spawnnpc 4 '..(cx[id]/32)..' '..(cy[id]/32))
				menu(id,"Spawn Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
			elseif buton==5 then
				parse('spawnnpc 5 '..(cx[id]/32)..' '..(cy[id]/32))
				menu(id,"Spawn Creature,Zombie,HeadCrab,Snark,Vortigaunt,Soldier,Back")
			elseif buton==6 then
				menu(id,"Admin Menu,Server Settings,Spawn Creature,Spawn Object,Spawn Item,V.I.P,Punish,Give Items,Restart,More -->")
			end
	end
--missing end
end

Use tabs and you would have seen it quick.

alt Re: lua admin

Spook MQ Hacker
BANNED Off Offline

Zitieren
if i get the

1
2
elseif buton==6 then
                    menu(id,"Admin Menu,Server Settings,Spawn Creature,Spawn Object,Spawn Item,V.I.P,Punish,Give Items,Restart,More -->")

and there is an error

LUA ERROR:sys/lua/CityLife.lua:34: C stack overflow
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht