English My buy menu doesn't work

8 replies
Goto Page
To the start Previous 1 Next To the start
02.06.12 10:46:10 pm
Up
Nahuel3d
User
Offline Off
i want to make a menu with some items and if you say !weapons the menu appears but when i launch the game it leaves.
I need help pliz!
sorry for my bad english

here's the script:

Code:
1
2
3
4
addhook("say","command")
function command(id,!weapons)
menu(1,"Custom Buy Menu,Item 1|$5,Item 2|$50,(Item 3|$999999),Item 4|$0")
end


(is my first script for cs2d)
02.06.12 11:23:44 pm
Up
Blau Burger
User
Offline Off
im not scripter but here your go(I think)

Code:
1
2
3
4
5
6
addhook("say","command")
function command(id,txt)
if txt="!weapons" then
menu(id,"Custom Buy Menu,Item 1|$5,Item 2|$50,Item 3|$999999,Item 4|$0")
end
end
o.-
02.06.12 11:28:18 pm
Up
Bolt
User
Offline Off
Code:
1
2
3
4
5
6
addhook("say","command")
function command(id,txt)
     if txt="!weapons" then
          menu(id,"Custom Buy Menu,Item 1|$5,Item 2|$50,Item 3|$999999,Item 4|$0")
     end
end

I'm a scripter and I say it's good.
02.06.12 11:29:40 pm
Up
EP
User
Offline Off
BOLT_PL U FAILED (Expected near = blablabla)
Code:
1
2
3
4
5
6
addhook("say","command")
function command(id,txt)
     if txt=="!weapons" then
          menu(id,"Custom Buy Menu,Item 1|$5,Item 2|$50,Item 3|$999999,Item 4|$0")
     end
end
hehe winner
02.06.12 11:32:18 pm
Up
sheeL
User
Offline Off
user Bolt has written:
Code:
1
2
3
4
5
6
addhook("say","command")
function command(id,txt)
     if txt="!weapons" then
          menu(id,"Custom Buy Menu,Item 1|$5,Item 2|$50,Item 3|$999999,Item 4|$0")
     end
end

I'm a scripter and I say it's good.


what ?

your code, and blaistring and all , is equal...
Que se Realize, oque sempre sonhei, que se Torne verdade, oque Maginei, só então saberei..., que não errei, quanto a ti olhar, eu Amei (8)
02.06.12 11:33:11 pm
Up
EP
User
Offline Off
Code:
1
if txt="!weapons" then

isn't the same of
Code:
1
if txt=="!weapons" then
02.06.12 11:35:40 pm
Up
Bolt
User
Offline Off
Yeah, I copied it Sorry user EP is right
03.06.12 02:45:22 am
Up
Devil-Thanh
User
Offline Off
Code:
1
2
3
4
5
6
addhook("say","command")
function command(id,cmd)
     if cmd=="!weapon" then
          menu(1,"Custom Buy Menu,Item 1|$5,Item 2|$50 (Item3|$999999),Item 4|$0")          
     end
end
03.06.12 10:52:46 am
Up
Bolt
User
Offline Off
@user Devil-Thanh: There is no diffrence between yours and what user EP and I said.
To the start Previous 1 Next To the start