Forum

> > CS2D > Scripts > My menu dont work
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch My menu dont work

10 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt My menu dont work

lenormarques
User Off Offline

Zitieren
When you open menu (F2) see CT Binds and TR Binds
If you press CT Binds Will Bind the keys F5 F6 F7 with:
Drop Your Guns or Die
If you press TR binds will bind the same keys with:
Dont Shoot i Surrender

How i can do that?

i tryed edit the Weaponsbuy:

I need some help with that:

addhook("serveraction","buyweapons")
function buyweapons(id,act)
if act==1 then
menu(id,"Bind Menu,CTs Binds,TRs Binds")
end
end
addhook("menu","bindmenu")
function bindmenu(id,title,buton)
if title=="Buy" then
if buton==1 then
menu(id,"CTs Binds")
elseif buton==2 then
menu(id,"TRs Binds")
end
end

And how to Bind the Keys F5 F6 F7?

alt Re: My menu dont work

Apache uwu
User Off Offline

Zitieren
Sorry I don't completely understand.

When a terrorist presses F2 --> does he say "Don't shoot I surrender"?

Same with ct --> "Drop your guns or die!"

So It's kinda like server sided binds?

alt Re: My menu dont work

Yates
Reviewer Off Offline

Zitieren
I assume "Bind menu" opens yet buttons do not work. That's because the title is wrong, and fyi. You can't bind F4 and above.

Edit: Oh, sorry. I meant you cannot use as serveraction >F4. But binding is possible.
1× editiert, zuletzt 17.05.12 18:44:15

alt Re: My menu dont work

lenormarques
User Off Offline

Zitieren
For Bind F4 F5 F6 use: {/bind "F6" " command message }


i will try do here (its for cZ server idea)




addhook("menu","bindmenu")
function bindmenu(id,title,buton)
if title=="Bind Menu" then
if buton==1 then
menu(id,"CTs Binds,Enable,Disable")
     elseif buton==2 then
menu(id,"TRs Binds,Enable,Disable")

alt Re: My menu dont work

krabob
User Off Offline

Zitieren
I don't really understand you but do you mean hwo to set binds to press serveractions?

bind F6 "serveraction1"
bind F7 "serveraction2"
bind F8 "serveraction3"

alt Re: My menu dont work

lenormarques
User Off Offline

Zitieren
i tryied but i cant do it.. look:



addhook("serveraction","binder")
function binder(id,act)
if act==1 then
menu(id,"Bind Menu,CT Fast Bind,TR Fast Bind,,,,,,,CZ2D")
     end
end
addhook("menu","bindmenu")
function bindmenu(id,title,buton)
if title=="Bind Menu" then
if buton==1 then
     parse("say Drop all Weapons Or Die! Do It NOW! ")
     elseif buton==2 then
     parse("say I Surrender! Dont Shoot!,I will DROP! ")
     elseif buton==9 then
          msg2(id,"©255255255www.cz2dgaming.com@C")
          msg2(id,"©255255255Thanks For Playing the cZ Prison!@C")
end
end
end

if title=="Bind Menu" then
if buton==1 then
     parse("say <<<< here should be "Bind" but it dont work or im using wrong command?

parse("bind "F5" say "Stop") idk its not working ..

alt Re: My menu dont work

Apache uwu
User Off Offline

Zitieren
Well you can't force players to say something.

You can sim/emu the effect with messages.

1
2
3
if button==1 then
	msg(player(id,"name")..": stop and drop ur gunz")
end

alt Re: My menu dont work

omg
User Off Offline

Zitieren
i dont think its possible to do this because lua only runs server sided...its impossible to make ppl say stuff or bind stuff for them unless they do it themselves
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht