English My menu dont work

10 replies
Goto Page
To the start Previous 1 Next To the start
17.05.12 05:19:52 pm
Up
lenormarques
User
Offline Off
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?
L.M.
17.05.12 05:21:33 pm
Up
Apache uwu
User
Offline Off
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?
17.05.12 05:22:53 pm
Up
Yates
Reviewer
Offline Off
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
17.05.12 06:22:16 pm
Up
lenormarques
User
Offline Off
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")
L.M.
17.05.12 07:18:35 pm
Up
krabob
User
Offline Off
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"
People help the people
17.05.12 07:59:38 pm
Up
lenormarques
User
Offline Off
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 ..
L.M.
17.05.12 08:00:15 pm
Up
Suprise
BANNED
Offline Off
Wait a sec. You cant use F6,F7,F8 ingame
18.05.12 12:16:18 am
Up
MikuAuahDark
User
Offline Off
user lenormarques has written:
parse("bind "F5" say "Stop") idk its not working ..
you should use:
Code:
1
parse("bind F5 \"say stop\"")
file cs2d LuaJIT for Dedicated Server (13) JIT POWER! | Know your Lua errors! | Part of LÖVE development team since 11.3
18.05.12 04:09:52 am
Up
Apache uwu
User
Offline Off
Well you can't force players to say something.

You can sim/emu the effect with messages.

Code:
1
2
3
if button==1 then
     msg(player(id,"name")..": stop and drop ur gunz")
end
18.05.12 09:30:11 am
Up
@user krabob:
F2 = SV_ACT_1
F3 = SV_ACT_2
F4 = SV_ACT_3
22.05.12 07:20:04 am
Up
omg
User
Offline Off
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
will code for food
To the start Previous 1 Next To the start