Forum

> > CS2D > Scripts > Gun from wall
Forums overviewCS2D overview Scripts overviewLog in to reply

English Gun from wall

4 replies
To the start Previous 1 Next To the start

old Gun from wall

Jaso
BANNED Off Offline

Quote
I need an easy gun from wall script so you press a button the button is checking if you have enough money if it is yes you get the gun if there isnt any other weapon that you have else it will say you have already a weapon and nofing happends and if you dont have enough money than it will say you dont have enough money.
I doesnt matter for what weapon you do it just give me an example like for the m3

old Re: Gun from wall

Clean
User Off Offline

Quote
@jaso55

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
addhook("say","wpnmenu")
     function wpnmenu(id,txt)
     if (txt=="!weapons") then
menu(id, "What weapon do you need?, M3|5000$")
end
end

addhook("menu","admmenu")
function admmenu(id,men,sel)
     if men == "What weapon do you need?" then
	 if sel == 1 and player(id,"money") >= 4999 then
parse("setmoney "..id.." "..player(id,"money")-5000)
parse("equip "..id.." 10")
msg2(id,"You now have an M3")
end
end
end

I've tested it, and here are results:
∗ It works

>If you need more, just ask me

Only sorry, i don't know how to do the "When you press on a wall" thing.
But i will try to find our.

old Re: Gun from wall

Jaso
BANNED Off Offline

Quote
@clean
Nice begining but this is not what i want.
It has to come from a use button.
And if i have already a weapon the m3 cant be bought.
That is what i want.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview