Forum

> > CS2D > Scripts > About menu
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch About menu

10 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt About menu

Mora
User Off Offline

Zitieren
Hello
I just need know,where i can search it:
i have menu: when i press button,then this button i can press again,only when time out(30 sec)...BUTTON,not MENU!
ex:
Magic <name menu
magic spear <-when press,then block in 30 sec(and time 30,29,28,27 etc)
where i can search it?
Thanks you

sorry my english :<
1× editiert, zuletzt 18.10.13 13:42:27

alt Re: About menu

Rainoth
Moderator Off Offline

Zitieren
Did I understand this correctly :

You press F2-F4/E and you get a menu which does something. You can't open menu again once it's closed, right ?

alt Re: About menu

alex72super
User Off Offline

Zitieren
user Rainoth hat geschrieben
Did I understand this correctly :

You press F2-F4/E and you get a menu which does something. You can't open menu again once it's closed, right ?


He wants a menu,

when you press a button in it it closes for 30 sec. (the button cannot be pressed again for 30 sec.)

alt Re: About menu

Rainoth
Moderator Off Offline

Zitieren
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
a = {}

addhook("join","e")
function e(id)
a[id]=0
end

addhook("serveraction","b")
function b(id)
	if a[id]~=1 then
		menu(id,"potato,supah magic spear and stuff...|15 sec")
	else
		menu(id,"potato,(supah magic spear and stuff...|15 sec)")
	end
end

addhook("menu","c")
function c(id,tit,butt)
	if tit=="potato" then
		if butt==1 then
			a[id]=1
			parse("equip "..id.." 47")
			timer(30000,"parse","lua a["..id.."]=0")
		end
	end
end

They'll be able to open menu but it won't work. Soz I'm doing maths homework and my brain melted so I can't help any better right now.

P.S. Replace "parse("equip" etc. etc. part with whatever your magic spear is.
3× editiert, zuletzt 18.10.13 15:37:00

alt Re: About menu

Mora
User Off Offline

Zitieren
LUA ERROR: [string "a[id]=0"]:1: table index is nil
i need know where you got it.
And one:when i press button,then button block in 30 sec,but not menu.
and button will be like this
menu(id,"Magic,magic spear,blahblah")

i press "magic spear" and menu will be
menu(id,"Magic,(magic spear| =Here timer 30 sec=),blalbla")

alt Re: About menu

Rainoth
Moderator Off Offline

Zitieren
Try again.
And it's not possible to have a changing number to show cooldown. Unless you call a menu every second.

alt Re: About menu

Mora
User Off Offline

Zitieren
eh i wrong...
button block,without timer,just this button i cant press(15sec)...

it just will be
menu(id,"Magic,spear|15 sec,blah")
when press button:
menu(id,"Magic,(spear|15sec),blahblah")
15 sec left... again menu with button:
menu(id,"Magic,spear|15 sec,blah")

IMG:https://i.pixs.ru/storage/6/9/2/1bmp_4596796_9418692.jpg


IMG:https://i.pixs.ru/storage/7/0/3/2bmp_9396218_9418703.jpg
1× editiert, zuletzt 18.10.13 15:17:48

alt Re: About menu

Rainoth
Moderator Off Offline

Zitieren
Changed so it turns off if spear is unavailable. Good ?

alt Re: About menu

Mora
User Off Offline

Zitieren
after pressing the button spear this button is blocked,but the menu can be opened,only to press the button spear press will be possible only after 15 seconds.

:translate: maybe so you can understeand,because all cant understeand my very bad english

alt Re: About menu

Avo
User Off Offline

Zitieren
user Avoie to the rescue!

Code >

alt Re: About menu

Mora
User Off Offline

Zitieren
@user Avo: it can be easy than your code?i will learn it =O.Where you got it?

what about array?where i can got it?


Thank you so much @user Avo: ! you super puper
2× editiert, zuletzt 19.10.13 12:38:21
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht