Forum

> > CS2D > Scripts > Menu!?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Menu!?

17 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Menu!?

Cons
User Off Offline

Zitieren
Hey guys, can please anyone help me, just show me how to do different Menus For Lua

Thanks

alt Re: Menu!?

Jhony
User Off Offline

Zitieren
user Cons hat geschrieben
Hey guys, can please anyone help me, just show me how to do different Menus For Lua

Thanks


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("serveraction","lolz") -- act
function lolz(id,a) -- fuck yeah
if a == 1 then --f2
menu(id, "Settings,blablabla,blablalbal")
end
end

addhkook("menu","update")
function update(id,tittle,button) -- act == action
if tittle = "Settings" then
if button == 1 then
                              -- your act here
elseif button = 2 then 
                               -- your act here 
end
end

is example

alt Re: Menu!?

Cons
User Off Offline

Zitieren
user Jhony hat geschrieben
user Cons hat geschrieben
Hey guys, can please anyone help me, just show me how to do different Menus For Lua

Thanks


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("serveraction","lolz") -- act
function lolz(id,a) -- fuck yeah
if a == 1 then --f2
menu(id, "Settings,blablabla,blablalbal")
end
end

addhkook("menu","update")
function update(id,tittle,button) -- act == action
if tittle = "Settings" then
if button == 1 then
                              -- your act here
elseif button = 2 then 
                               -- your act here 
end
end

is example


I know how to make simple menu, i wanna make differents style of menus! ty
1× editiert, zuletzt 08.03.18 04:48:14

alt Re: Menu!?

Bowlinghead
User Off Offline

Zitieren
I dont know what user Cons mean.

Do you mean this?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
addhook("serveraction","lolz") -- act
function lolz(id,a) -- fuck yeah
if a == 1 then --f2
menu(id, "Settings,blablabla,blablalbal")
elseif a == 2 then --f3
menu(id,"Bla,bla") -- Note: You need a different name
end
end

addhkook("menu","update")
function update(id,tittle,button) -- act == action
if tittle == "Settings" then
if button == 1 then
-- your act here
elseif button == 2 then
-- your act here
end
elseif tittle == "Bla" then
if button == 1 then
-- your act here
end
end
end
God damn, I hate untabbed codes...
1× editiert, zuletzt 17.03.12 03:54:14

alt Re: Menu!?

Cons
User Off Offline

Zitieren
user Bowlinghead hat geschrieben
I dont know what user Cons mean.

Do you mean this?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
addhook("serveraction","lolz") -- act
function lolz(id,a) -- fuck yeah
if a == 1 then --f2
menu(id, "Settings,blablabla,blablalbal")
elseif a == 2 then --f3
menu(id,"Bla,bla") -- Note: You need a different name
end
end

addhkook("menu","update")
function update(id,tittle,button) -- act == action
if tittle == "Settings" then
if button == 1 then
-- your act here
elseif button == 2 then
-- your act here
end
elseif tittle == "Bla" then
if button == 1 then
-- your act here
end
end
end
God damn, I hate untabbed codes...


No, I just wanna know how to make Different Styles Of Menus!
1× editiert, zuletzt 08.03.18 04:47:29

alt Re: Menu!?

Bowlinghead
User Off Offline

Zitieren
Aaahhhh....
I understand.

You can't make other styles except the big menu.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("serveraction","lolz") -- act
function lolz(id,a) -- fuck yeah
if a == 1 then --f2
menu(id, "Settings@b,blablabla,blablalbal") -- Note
end
end

addhkook("menu","update")
function update(id,tittle,button) -- act == action
if tittle = "Settings" then
if button == 1 then
-- your act here
elseif button = 2 then
-- your act here
end
end

alt Re: Menu!?

Cons
User Off Offline

Zitieren
user Bowlinghead hat geschrieben
Aaahhhh....
I understand.

You can't make other styles except the big menu.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("serveraction","lolz") -- act
function lolz(id,a) -- fuck yeah
if a == 1 then --f2
menu(id, "Settings@b,blablabla,blablalbal") -- Note
end
end

addhkook("menu","update")
function update(id,tittle,button) -- act == action
if tittle = "Settings" then
if button == 1 then
-- your act here
elseif button = 2 then
-- your act here
end
end


Fixed :
Mehr >


Thanks It Really Worked, Does we have any other Style?

alt Re: Menu!?

Cons
User Off Offline

Zitieren
user Alistaire hat geschrieben
user Cons hat geschrieben
Does we have any other Style?


Invisible menu.


Dhaaa... And how to do it?! Nana

alt Re: Menu!?

Alistaire
User Off Offline

Zitieren
menu(id, 'menuname@i,button1|comment,button2,button3)

alt Re: Menu!?

Suprise
BANNED Off Offline

Zitieren
user Alistaire hat geschrieben
menu(id, 'menuname@i,button1|comment,button2,button3)


Wow! I dont saw anything! Idi0t menu the invisible!

alt Re: Menu!?

Cons
User Off Offline

Zitieren
user Alistaire hat geschrieben
menu(id, 'menuname@i,button1|comment,button2,button3)


Fixed:
1
2
3
4
5
6
addhook("serveraction","Oo")
function Oo(id,a)
if a == 1 then
menu(id, "menuname@i,button1|comment,button2,button3") 
end
end

Like, its really Invisible?! Oo I just Cant See Nothing... But When i press F2 I cant change Weapon like when we open a normal menu...

So why we need buton names?
1
button1|comment,button2,button3

Oo

alt Re: Menu!?

Yates
Reviewer Off Offline

Zitieren
He's trolling you, there is no way you can change how the menu looks like (You can only make it bigger with @b) other than in your own settings. Where you can only change the colour.

So stop being idiots, why in the world would DC add an invisible menu!?

alt Re: Menu!?

Alistaire
User Off Offline

Zitieren
user Yates hat geschrieben
why in the world would DC add an invisible menu!?


For passwords and to register when people click a number key.

alt Re: Menu!?

Cons
User Off Offline

Zitieren
user Yates hat geschrieben
He's trolling you, there is no way you can change how the menu looks like (You can only make it bigger with @b) other than in your own settings. Where you can only change the colour.

So stop being idiots, why in the world would DC add an invisible menu!?


Zitat
But When i press F2 I cant change Weapon like when we open a normal menu...


Test it on your server and answer me!

alt Re: Menu!?

Happy eyes
User Off Offline

Zitieren
Invisible menu exists, also bigger menu, menu with disabled buttons and menus with spaces. Check lua command menu
cs2d lua cmd menu

alt Re: Menu!?

Alistaire
User Off Offline

Zitieren
user Happy eyes hat geschrieben
Invisible menu exists, also bigger menu, menu with disabled buttons and menus with spaces. Check lua command menu
cs2d lua cmd menu


Thanks for repeating everything already posted here, mister obvious.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht