Forum

> > CS2D > Scripts > Gun from wall
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Gun from wall

4 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Gun from wall

Jaso
BANNED Off Offline

Zitieren
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

alt Re: Gun from wall

Clean
User Off Offline

Zitieren
@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.

alt Re: Gun from wall

Jaso
BANNED Off Offline

Zitieren
@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.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht