
I need help with my script (detail).
Undzwar I have a script where it is pressed at a certain position of the button on a shop window appears.
And as far as I have everything (3 selection options).
Merely the problem is it only works the first Buying opportunity!
What is wrong?
Here is the excerpt
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
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
addhook("menu","buymenu") function buymenu(id,title,buton) if title=="What do you want to buy?" then if buton==1 then if (player(id,"money")>=300) then parse("setmoney "..id.." "..player(id,"money")-300) msg('©000128000You Bought A Grenade!') parse('equip '..id..' 51') parse('setweapon '..id..' 51') parse('sv_sound2 '..id..' jonrpg/woosh.wav') elseif buton==2 then if (player(id,"money")>=700) then parse("setmoney "..id.." "..player(id,"money")-700) msg('©000128000You Bought A Grenade!') parse('equip '..id..' 51') parse('setweapon '..id..' 51') parse('sv_sound2 '..id..' jonrpg/woosh.wav') elseif buton==3 then if (player(id,"money")>=1200) then parse("setmoney "..id.." "..player(id,"money")-1200) msg('©000128000You Bought A Grenade!') parse('equip '..id..' 51') parse('setweapon '..id..' 51') parse('sv_sound2 '..id..' jonrpg/woosh.wav') end end end end end