Forum

> > CS2D > Scripts > *Fixed*
Forums overviewCS2D overview Scripts overviewLog in to reply

English *Fixed*

17 replies
To the start Previous 1 Next To the start

old *Fixed*

Jynxxx
User Off Offline

Quote
Fixed trash this found my problem
edited 2×, last 23.12.11 07:27:25 pm

old Re: *Fixed*

Jynxxx
User Off Offline

Quote
it's there
1
2
3
elseif button == 3 then
	menu(id,"Special Stuff,Super Armor|450Pts.,Laser|600Pts.,Medic Armor|350Pts.,Tactical Shield|125Pts.,Stealth Suit|250Pts.,Back")
          end
and here is what it suppose to do

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
if title=="Special Stuff" then
		if button == 1 then
			if player(id,"money")>=450 then
				equip(id,83)
				parse("setmoney "..id.." "..(player(id,"money")-450))
			end
		elseif button == 2 then
			if player(id,"money")>=600 then
				equip(id,45)
				parse("setmoney "..id.." "..(player(id,"money")-600))
			end
		elseif button == 3 then
			if player(id,"money")>=350 then
				equip(id,82)
				parse("setmoney "..id.." "..(player(id,"money")-350))
			end
		elseif button == 4 then
			if player(id,"money")>=125 then
				equip(id,41)
				parse("setmoney "..id.." "..(player(id,"money")-125))
			end
		elseif button == 5 then
			if player(id,"money")>=250 then
				equip(id,84)
				parse("setmoney "..id.." "..(player(id,"money")-250))
			end
		elseif button == 6 then
			shopmenu(id)
			end
		end
	end
end

old Re: *Fixed*

Jynxxx
User Off Offline

Quote
i don't understand why isn't it working everything is put right.

old Re: *Fixed*

Dovahkin
User Off Offline

Quote
Dude i suggest using the Next >>> Special to make it not harder -- EXAMPLE :
1
2
3
elseif button == 2 then
						menu(id,"troll")
					  end


See?

old Re: *Fixed*

Jynxxx
User Off Offline

Quote
what your saying i should change my shopmenu(id) function to
1
2
3
function shopmenu(id)
	menu(id,"Shop,Weapons,Equipment,Next")
end

old Meaning?

Dovahkin
User Off Offline

Quote
No , Why do you even have that shopmenu(id) , Whats the meaning of that anyways?

old Re: *Fixed*

Jynxxx
User Off Offline

Quote
a faster function instead of always writing
1
menu(id,"Shop,Weapons,Equipment,Special")
when someone presses back, It makes no difference anyways

old Re: *Fixed*

Dovahkin
User Off Offline

Quote
i totally agree with DannyDeth your just wasting function calls -.- , Just use the
1
addhook("serveraction","nico")
its more faster in that ways -.-

old Re: *Fixed*

Jynxxx
User Off Offline

Quote
It doesn't matter it works. I just need to know why the menu wont buy anything.

But Five i want people to walk to the use button and press it instead of buying it quickly, to make it harder.

old Re: *Fixed*

Dovahkin
User Off Offline

Quote
Well its right....... but the hooks change dude it doesn't affect the menu is the coding in the button is wrong.

old Re: *Fixed*

Jynxxx
User Off Offline

Quote
Your probably right. But i can't find no mistakes

old Re: *Fixed*

Jynxxx
User Off Offline

Quote
sure Five PM what type of Lua we should make. Just gotta finish this one.
Anyone know the problem?
edited 1×, last 23.12.11 07:07:09 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview