Forum

> > CS2D > Scripts > Script is not work!
Forums overviewCS2D overview Scripts overviewLog in to reply

English Script is not work!

5 replies
To the start Previous 1 Next To the start

old Script is not work!

balance
User Off Offline

Quote
I took this code from Duy and edit again, why not? When I add:
1
menu(id,"Armor Shop,Kevlar|1150$,Kevlar+Helm|3000$,Light Armor|3500$,Tactical Shield|6500$")

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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
addhook("use","usebuttonworkaround")
function usebuttonworkaround(id)
     local x,y=player(id,"tilex"),player(id,"tiley")
     if x==8 and y==8 then
       menu(id,"Handgun Shop,USP|500$,Glock|400$,Deagle|650$,P228|600$,Elite|1000$,Five Seven|750$")
     elseif x==13 and y==38 then
       menu(id,"Sub Machine Gun,TMP|1250$,MP5|1500$,P90|2350$,UMP45|1700$,MAC10|1400$,Primary Ammo|350$")
     elseif x==51 and y==67 then
       menu(id,"Grocery 1,Donuts|250$,Sandwich|500$,Candy|350$,Cow's milk|700$")
     elseif x==21 and y==60 then
       menu(id,"Armor Shop,Kevlar|1150$,Kevlar+Helm|3000$,Light Armor|3500$,Tactical Shield|6500$")
     end
end
      
addhook("menu","buymenu")
function buymenu(id,title,buton)
if title=="Handgun Shop" then
if buton==1 then
     if player(id,"money")>=500 then
          parse("equip "..id.." 1")
          parse("setweapon "..id.." 1")
          msg2(id,"©000255000You successfully bought USP!@C")
          parse("setmoney "..id.." "..(player(id,"money")-500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=400 then
          parse("equip "..id.." 2")
          parse("setweapon "..id.." 2")
          msg2(id,"©000255000You successfully bought Glock!@C")
          parse("setmoney "..id.." "..(player(id,"money")-400))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=650 then
          parse("equip "..id.." 3")
          parse("setweapon "..id.." 3")
          msg2(id,"©000255000You successfully bought Deagle!@C")
          parse("setmoney "..id.." "..(player(id,"money")-650))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=600 then
          parse("equip "..id.." 4")
          parse("setweapon "..id.." 4")
          msg2(id,"©000255000You successfully bought P228!@C")
          parse("setmoney "..id.." "..(player(id,"money")-600))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==5 then
     if player(id,"money")>=1000 then
          parse("equip "..id.." 5")
          parse("setweapon "..id.." 5")
          msg2(id,"©000255000You successfully bought Elite!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1000))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==6 then
     if player(id,"money")>=750 then
          parse("equip "..id.." 6")
          parse("setweapon "..id.." 6")
          msg2(id,"©000255000You successfully bought Five Seven!@C")
          parse("setmoney "..id.." "..(player(id,"money")-750))
     else
          msg2(id,"©255000000You have insufficient funds!@C")
end
end
end
if title=="Sub Machine Gun" then
if buton==1 then
     if player(id,"money")>=1250 then
          parse("equip "..id.." 21")
          parse("setweapon "..id.." 21")
          msg2(id,"©000255000You successfully bought TMP!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1250))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=1500 then
          parse("equip "..id.." 20")
          parse("setweapon "..id.." 20")
          msg2(id,"©000255000You successfully bought MP5!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=2350 then
          parse("equip "..id.." 22")
          parse("setweapon "..id.." 22")
          msg2(id,"©000255000You successfully bought P90!@C")
          parse("setmoney "..id.." "..(player(id,"money")-2350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=1700 then
          parse("equip "..id.." 24")
          parse("setweapon "..id.." 24")
          msg2(id,"©000255000You successfully bought UMP45!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1700))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==5 then
     if player(id,"money")>=1400 then
          parse("equip "..id.." 23")
          parse("setweapon "..id.." 23")
          msg2(id,"©000255000You successfully bought MAC10!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1400))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==6 then
     if player(id,"money")>=350 then
          parse("equip "..id.." 61")
          parse("setweapon "..id.." 61")
          msg2(id,"©000255000You successfully bought Primary Ammo Seven!@C")
          parse("setmoney "..id.." "..(player(id,"money")-350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")
end
end
end

if title=="Grocery 1" then
if buton==1 then
     if player(id,"money")>=250 then
          parse("sethealth "..id.." "..(player(id,"health")+13))
          msg2(id,"©000255000You successfully bought Donuts!@C")
          parse("setmoney "..id.." "..(player(id,"money")-250))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=500 then
          parse("sethealth "..id.." "..(player(id,"health")+30))
          msg2(id,"©000255000You successfully bought Sandwich!@C")
          parse("setmoney "..id.." "..(player(id,"money")-500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=350 then
          parse("sethealth "..id.." "..(player(id,"health")+20))
          msg2(id,"©000255000You successfully bought Candy!@C")
          parse("setmoney "..id.." "..(player(id,"money")-350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=700 then
          parse("sethealth "..id.." "..(player(id,"health")+55))
          msg2(id,"©000255000You successfully bought Cow's Milk!@C")
          parse("setmoney "..id.." "..(player(id,"money")-700))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
end
end

if title=="Armor Shop" then
if buton==1 then
     if player(id,"money")>=1150 then
          parse("equip "..id.." 57")
          parse("setweapon "..id.." 57")
          msg2(id,"©000255000You successfully bought Kevlar!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1150))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
if buton==2 then
     if player(id,"money")>=3000 then
          parse("equip "..id.." 58")
          parse("setweapon "..id.." 58")
          msg2(id,"©000255000You successfully bought Kevlar+Helm!@C")
          parse("setmoney "..id.." "..(player(id,"money")-3000))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
if buton==3 then
     if player(id,"money")>=3500 then
          parse("equip "..id.." 79")
          parse("setweapon "..id.." 79")
          msg2(id,"©000255000You successfully bought Light Armor!@C")
          parse("setmoney "..id.." "..(player(id,"money")-3500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
if buton==4 then
     if player(id,"money")>=6500 then
          parse("equip "..id.." 41")
          parse("setweapon "..id.." 41")
          msg2(id,"©000255000You successfully bought Tactical Shield!@C")
          parse("setmoney "..id.." "..(player(id,"money")-6500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
end
end
end

old Re: Script is not work!

Aidsregen
User Off Offline

Quote
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
addhook("use","usebuttonworkaround")
function usebuttonworkaround(id)
     local x,y=player(id,"tilex"),player(id,"tiley")
     if x==8 and y==8 then
       menu(id,"Handgun Shop,USP|500$,Glock|400$,Deagle|650$,P228|600$,Elite|1000$,Five Seven|750$")
     elseif x==13 and y==38 then
       menu(id,"Sub Machine Gun,TMP|1250$,MP5|1500$,P90|2350$,UMP45|1700$,MAC10|1400$,Primary Ammo|350$")
     elseif x==51 and y==67 then
       menu(id,"Grocery 1,Donuts|250$,Sandwich|500$,Candy|350$,Cow's milk|700$")
     elseif x==21 and y==60 then
       menu(id,"Armor Shop,Kevlar|1150$,Kevlar+Helm|3000$,Light Armor|3500$,Tactical Shield|6500$")
     end
end
      
addhook("menu","buymenu")
function buymenu(id,title,buton)
if title=="Handgun Shop" then
if buton==1 then
     if player(id,"money")>=500 then
          parse("equip "..id.." 1")
          parse("setweapon "..id.." 1")
          msg2(id,"©000255000You successfully bought USP!@C")
          parse("setmoney "..id.." "..(player(id,"money")-500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=400 then
          parse("equip "..id.." 2")
          parse("setweapon "..id.." 2")
          msg2(id,"©000255000You successfully bought Glock!@C")
          parse("setmoney "..id.." "..(player(id,"money")-400))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=650 then
          parse("equip "..id.." 3")
          parse("setweapon "..id.." 3")
          msg2(id,"©000255000You successfully bought Deagle!@C")
          parse("setmoney "..id.." "..(player(id,"money")-650))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=600 then
          parse("equip "..id.." 4")
          parse("setweapon "..id.." 4")
          msg2(id,"©000255000You successfully bought P228!@C")
          parse("setmoney "..id.." "..(player(id,"money")-600))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==5 then
     if player(id,"money")>=1000 then
          parse("equip "..id.." 5")
          parse("setweapon "..id.." 5")
          msg2(id,"©000255000You successfully bought Elite!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1000))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==6 then
     if player(id,"money")>=750 then
          parse("equip "..id.." 6")
          parse("setweapon "..id.." 6")
          msg2(id,"©000255000You successfully bought Five Seven!@C")
          parse("setmoney "..id.." "..(player(id,"money")-750))
     else
          msg2(id,"©255000000You have insufficient funds!@C")
end
end
end
if title=="Sub Machine Gun" then
if buton==1 then
     if player(id,"money")>=1250 then
          parse("equip "..id.." 21")
          parse("setweapon "..id.." 21")
          msg2(id,"©000255000You successfully bought TMP!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1250))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=1500 then
          parse("equip "..id.." 20")
          parse("setweapon "..id.." 20")
          msg2(id,"©000255000You successfully bought MP5!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=2350 then
          parse("equip "..id.." 22")
          parse("setweapon "..id.." 22")
          msg2(id,"©000255000You successfully bought P90!@C")
          parse("setmoney "..id.." "..(player(id,"money")-2350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=1700 then
          parse("equip "..id.." 24")
          parse("setweapon "..id.." 24")
          msg2(id,"©000255000You successfully bought UMP45!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1700))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==5 then
     if player(id,"money")>=1400 then
          parse("equip "..id.." 23")
          parse("setweapon "..id.." 23")
          msg2(id,"©000255000You successfully bought MAC10!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1400))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==6 then
     if player(id,"money")>=350 then
          parse("equip "..id.." 61")
          parse("setweapon "..id.." 61")
          msg2(id,"©000255000You successfully bought Primary Ammo Seven!@C")
          parse("setmoney "..id.." "..(player(id,"money")-350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")
end
end
end

if title=="Grocery 1" then
if buton==1 then
     if player(id,"money")>=250 then
          parse("sethealth "..id.." "..(player(id,"health")+13))
          msg2(id,"©000255000You successfully bought Donuts!@C")
          parse("setmoney "..id.." "..(player(id,"money")-250))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=500 then
          parse("sethealth "..id.." "..(player(id,"health")+30))
          msg2(id,"©000255000You successfully bought Sandwich!@C")
          parse("setmoney "..id.." "..(player(id,"money")-500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=350 then
          parse("sethealth "..id.." "..(player(id,"health")+20))
          msg2(id,"©000255000You successfully bought Candy!@C")
          parse("setmoney "..id.." "..(player(id,"money")-350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=700 then
          parse("sethealth "..id.." "..(player(id,"health")+55))
          msg2(id,"©000255000You successfully bought Cow's Milk!@C")
          parse("setmoney "..id.." "..(player(id,"money")-700))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
end
end

if title=="Armor Shop" then
	if buton==1 then
     		if player(id,"money")>=1150 then
          		parse("equip "..id.." 57")
         		parse("setweapon "..id.." 57")
         		msg2(id,"©000255000You successfully bought Kevlar!@C")
          		parse("setmoney "..id.." "..(player(id,"money")-1150))
     		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
	elseif buton==2 then
    		if player(id,"money")>=3000 then
          		parse("equip "..id.." 58")
         		parse("setweapon "..id.." 58")
          		msg2(id,"©000255000You successfully bought Kevlar+Helm!@C")
          		parse("setmoney "..id.." "..(player(id,"money")-3000))
     		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
	elseif buton==3 then
     		if player(id,"money")>=3500 then
          		parse("equip "..id.." 79")
          		parse("setweapon "..id.." 79")
         		msg2(id,"©000255000You successfully bought Light Armor!@C")
         		parse("setmoney "..id.." "..(player(id,"money")-3500))
    		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
	elseif buton==4 then
     		if player(id,"money")>=6500 then
          		parse("equip "..id.." 41")
          		parse("setweapon "..id.." 41")
          		msg2(id,"©000255000You successfully bought Tactical Shield!@C")
          		parse("setmoney "..id.." "..(player(id,"money")-6500))
     		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
end
end
end

old Re: Script is not work!

Black Wolf
User Off Offline

Quote
user Aidsregen has written
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
addhook("use","usebuttonworkaround")
function usebuttonworkaround(id)
     local x,y=player(id,"tilex"),player(id,"tiley")
     if x==8 and y==8 then
       menu(id,"Handgun Shop,USP|500$,Glock|400$,Deagle|650$,P228|600$,Elite|1000$,Five Seven|750$")
     elseif x==13 and y==38 then
       menu(id,"Sub Machine Gun,TMP|1250$,MP5|1500$,P90|2350$,UMP45|1700$,MAC10|1400$,Primary Ammo|350$")
     elseif x==51 and y==67 then
       menu(id,"Grocery 1,Donuts|250$,Sandwich|500$,Candy|350$,Cow's milk|700$")
     elseif x==21 and y==60 then
       menu(id,"Armor Shop,Kevlar|1150$,Kevlar+Helm|3000$,Light Armor|3500$,Tactical Shield|6500$")
     end
end
      
addhook("menu","buymenu")
function buymenu(id,title,buton)
if title=="Handgun Shop" then
if buton==1 then
     if player(id,"money")>=500 then
          parse("equip "..id.." 1")
          parse("setweapon "..id.." 1")
          msg2(id,"©000255000You successfully bought USP!@C")
          parse("setmoney "..id.." "..(player(id,"money")-500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=400 then
          parse("equip "..id.." 2")
          parse("setweapon "..id.." 2")
          msg2(id,"©000255000You successfully bought Glock!@C")
          parse("setmoney "..id.." "..(player(id,"money")-400))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=650 then
          parse("equip "..id.." 3")
          parse("setweapon "..id.." 3")
          msg2(id,"©000255000You successfully bought Deagle!@C")
          parse("setmoney "..id.." "..(player(id,"money")-650))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=600 then
          parse("equip "..id.." 4")
          parse("setweapon "..id.." 4")
          msg2(id,"©000255000You successfully bought P228!@C")
          parse("setmoney "..id.." "..(player(id,"money")-600))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==5 then
     if player(id,"money")>=1000 then
          parse("equip "..id.." 5")
          parse("setweapon "..id.." 5")
          msg2(id,"©000255000You successfully bought Elite!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1000))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==6 then
     if player(id,"money")>=750 then
          parse("equip "..id.." 6")
          parse("setweapon "..id.." 6")
          msg2(id,"©000255000You successfully bought Five Seven!@C")
          parse("setmoney "..id.." "..(player(id,"money")-750))
     else
          msg2(id,"©255000000You have insufficient funds!@C")
end
end
end
if title=="Sub Machine Gun" then
if buton==1 then
     if player(id,"money")>=1250 then
          parse("equip "..id.." 21")
          parse("setweapon "..id.." 21")
          msg2(id,"©000255000You successfully bought TMP!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1250))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=1500 then
          parse("equip "..id.." 20")
          parse("setweapon "..id.." 20")
          msg2(id,"©000255000You successfully bought MP5!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=2350 then
          parse("equip "..id.." 22")
          parse("setweapon "..id.." 22")
          msg2(id,"©000255000You successfully bought P90!@C")
          parse("setmoney "..id.." "..(player(id,"money")-2350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=1700 then
          parse("equip "..id.." 24")
          parse("setweapon "..id.." 24")
          msg2(id,"©000255000You successfully bought UMP45!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1700))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==5 then
     if player(id,"money")>=1400 then
          parse("equip "..id.." 23")
          parse("setweapon "..id.." 23")
          msg2(id,"©000255000You successfully bought MAC10!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1400))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==6 then
     if player(id,"money")>=350 then
          parse("equip "..id.." 61")
          parse("setweapon "..id.." 61")
          msg2(id,"©000255000You successfully bought Primary Ammo Seven!@C")
          parse("setmoney "..id.." "..(player(id,"money")-350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")
end
end
end

if title=="Grocery 1" then
if buton==1 then
     if player(id,"money")>=250 then
          parse("sethealth "..id.." "..(player(id,"health")+13))
          msg2(id,"©000255000You successfully bought Donuts!@C")
          parse("setmoney "..id.." "..(player(id,"money")-250))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=500 then
          parse("sethealth "..id.." "..(player(id,"health")+30))
          msg2(id,"©000255000You successfully bought Sandwich!@C")
          parse("setmoney "..id.." "..(player(id,"money")-500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=350 then
          parse("sethealth "..id.." "..(player(id,"health")+20))
          msg2(id,"©000255000You successfully bought Candy!@C")
          parse("setmoney "..id.." "..(player(id,"money")-350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=700 then
          parse("sethealth "..id.." "..(player(id,"health")+55))
          msg2(id,"©000255000You successfully bought Cow's Milk!@C")
          parse("setmoney "..id.." "..(player(id,"money")-700))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
end
end

if title=="Armor Shop" then
	if buton==1 then
     		if player(id,"money")>=1150 then
          		parse("equip "..id.." 57")
         		parse("setweapon "..id.." 57")
         		msg2(id,"©000255000You successfully bought Kevlar!@C")
          		parse("setmoney "..id.." "..(player(id,"money")-1150))
     		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
	elseif buton==2 then
    		if player(id,"money")>=3000 then
          		parse("equip "..id.." 58")
         		parse("setweapon "..id.." 58")
          		msg2(id,"©000255000You successfully bought Kevlar+Helm!@C")
          		parse("setmoney "..id.." "..(player(id,"money")-3000))
     		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
	elseif buton==3 then
     		if player(id,"money")>=3500 then
          		parse("equip "..id.." 79")
          		parse("setweapon "..id.." 79")
         		msg2(id,"©000255000You successfully bought Light Armor!@C")
         		parse("setmoney "..id.." "..(player(id,"money")-3500))
    		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
	elseif buton==4 then
     		if player(id,"money")>=6500 then
          		parse("equip "..id.." 41")
          		parse("setweapon "..id.." 41")
          		msg2(id,"©000255000You successfully bought Tactical Shield!@C")
          		parse("setmoney "..id.." "..(player(id,"money")-6500))
     		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
end
end
end

FIXED
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
addhook("use","usebuttonworkaround")
function usebuttonworkaround(id)
     local x,y=player(id,"tilex"),player(id,"tiley")
     if x==8 and y==8 then
       menu(id,"Handgun Shop,USP|500$,Glock|400$,Deagle|650$,P228|600$,Elite|1000$,Five Seven|750$")
     elseif x==13 and y==38 then
       menu(id,"Sub Machine Gun,TMP|1250$,MP5|1500$,P90|2350$,UMP45|1700$,MAC10|1400$,Primary Ammo|350$")
     elseif x==51 and y==67 then
       menu(id,"Grocery 1,Donuts|250$,Sandwich|500$,Candy|350$,Cow's milk|700$")
     elseif x==21 and y==60 then
       menu(id,"Armor Shop,Kevlar|1150$,Kevlar+Helm|3000$,Light Armor|3500$,Tactical Shield|6500$")
     end
end
      
addhook("menu","buymenu")
function buymenu(id,title,buton)
if title=="Handgun Shop" then
if buton==1 then
     if player(id,"money")>=500 then
          parse("equip "..id.." 1")
          parse("setweapon "..id.." 1")
          msg2(id,"©000255000You successfully bought USP!@C")
          parse("setmoney "..id.." "..(player(id,"money")-500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=400 then
          parse("equip "..id.." 2")
          parse("setweapon "..id.." 2")
          msg2(id,"©000255000You successfully bought Glock!@C")
          parse("setmoney "..id.." "..(player(id,"money")-400))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=650 then
          parse("equip "..id.." 3")
          parse("setweapon "..id.." 3")
          msg2(id,"©000255000You successfully bought Deagle!@C")
          parse("setmoney "..id.." "..(player(id,"money")-650))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=600 then
          parse("equip "..id.." 4")
          parse("setweapon "..id.." 4")
          msg2(id,"©000255000You successfully bought P228!@C")
          parse("setmoney "..id.." "..(player(id,"money")-600))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==5 then
     if player(id,"money")>=1000 then
          parse("equip "..id.." 5")
          parse("setweapon "..id.." 5")
          msg2(id,"©000255000You successfully bought Elite!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1000))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==6 then
     if player(id,"money")>=750 then
          parse("equip "..id.." 6")
          parse("setweapon "..id.." 6")
          msg2(id,"©000255000You successfully bought Five Seven!@C")
          parse("setmoney "..id.." "..(player(id,"money")-750))
     else
          msg2(id,"©255000000You have insufficient funds!@C")
end
end
end
if title=="Sub Machine Gun" then
if buton==1 then
     if player(id,"money")>=1250 then
          parse("equip "..id.." 21")
          parse("setweapon "..id.." 21")
          msg2(id,"©000255000You successfully bought TMP!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1250))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=1500 then
          parse("equip "..id.." 20")
          parse("setweapon "..id.." 20")
          msg2(id,"©000255000You successfully bought MP5!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=2350 then
          parse("equip "..id.." 22")
          parse("setweapon "..id.." 22")
          msg2(id,"©000255000You successfully bought P90!@C")
          parse("setmoney "..id.." "..(player(id,"money")-2350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=1700 then
          parse("equip "..id.." 24")
          parse("setweapon "..id.." 24")
          msg2(id,"©000255000You successfully bought UMP45!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1700))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==5 then
     if player(id,"money")>=1400 then
          parse("equip "..id.." 23")
          parse("setweapon "..id.." 23")
          msg2(id,"©000255000You successfully bought MAC10!@C")
          parse("setmoney "..id.." "..(player(id,"money")-1400))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==6 then
     if player(id,"money")>=350 then
          parse("equip "..id.." 61")
          parse("setweapon "..id.." 61")
          msg2(id,"©000255000You successfully bought Primary Ammo Seven!@C")
          parse("setmoney "..id.." "..(player(id,"money")-350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")
end
end
end

if title=="Grocery 1" then
if buton==1 then
     if player(id,"money")>=250 then
          parse("sethealth "..id.." "..(player(id,"health")+13))
          msg2(id,"©000255000You successfully bought Donuts!@C")
          parse("setmoney "..id.." "..(player(id,"money")-250))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==2 then
     if player(id,"money")>=500 then
          parse("sethealth "..id.." "..(player(id,"health")+30))
          msg2(id,"©000255000You successfully bought Sandwich!@C")
          parse("setmoney "..id.." "..(player(id,"money")-500))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==3 then
     if player(id,"money")>=350 then
          parse("sethealth "..id.." "..(player(id,"health")+20))
          msg2(id,"©000255000You successfully bought Candy!@C")
          parse("setmoney "..id.." "..(player(id,"money")-350))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
elseif buton==4 then
     if player(id,"money")>=700 then
          parse("sethealth "..id.." "..(player(id,"health")+55))
          msg2(id,"©000255000You successfully bought Cow's Milk!@C")
          parse("setmoney "..id.." "..(player(id,"money")-700))
     else
          msg2(id,"©255000000You have insufficient funds!@C")

end
end
end

if title=="Armor Shop" then
	if buton==1 then
     		if player(id,"money")>=1150 then
          		parse("equip "..id.." 57")
         		parse("setweapon "..id.." 57")
         		msg2(id,"©000255000You successfully bought Kevlar!@C")
          		parse("setmoney "..id.." "..(player(id,"money")-1150))
     		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
	elseif buton==2 then
    		if player(id,"money")>=3000 then
          		parse("equip "..id.." 58")
         		parse("setweapon "..id.." 58")
          		msg2(id,"©000255000You successfully bought Kevlar+Helm!@C")
          		parse("setmoney "..id.." "..(player(id,"money")-3000))
     		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
	elseif buton==3 then
     		if player(id,"money")>=3500 then
          		parse("equip "..id.." 79")
          		parse("setweapon "..id.." 79")
         		msg2(id,"©000255000You successfully bought Light Armor!@C")
         		parse("setmoney "..id.." "..(player(id,"money")-3500))
    		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
	elseif buton==4 then
     		if player(id,"money")>=6500 then
          		parse("equip "..id.." 41")
          		parse("setweapon "..id.." 41")
          		msg2(id,"©000255000You successfully bought Tactical Shield!@C")
          		parse("setmoney "..id.." "..(player(id,"money")-6500))
     		else
          		msg2(id,"©255000000You have insufficient funds!@C")

		end
end
end
end

old Re: Script is not work!

omg
User Off Offline

Quote
LMFAO

i dont think many people will help u find an error in that much code...not even im that bored right now
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview