Forum

> > CS2D > Scripts > My menu dont work
Forums overviewCS2D overview Scripts overviewLog in to reply

English My menu dont work

10 replies
To the start Previous 1 Next To the start

old My menu dont work

lenormarques
User Off Offline

Quote
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?

old Re: My menu dont work

Apache uwu
User Off Offline

Quote
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?

old Re: My menu dont work

Yates
Reviewer Off Offline

Quote
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.
edited 1×, last 17.05.12 06:44:15 pm

old Re: My menu dont work

lenormarques
User Off Offline

Quote
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")

old Re: My menu dont work

krabob
User Off Offline

Quote
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"

old Re: My menu dont work

lenormarques
User Off Offline

Quote
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 ..

old Re: My menu dont work

Apache uwu
User Off Offline

Quote
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

old Re: My menu dont work

omg
User Off Offline

Quote
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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview