Forum

> > CS2D > Scripts > Some one fix the script for me
Forums overviewCS2D overview Scripts overviewLog in to reply

English Some one fix the script for me

2 replies
To the start Previous 1 Next To the start

old Some one fix the script for me

Jenko63
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
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
points,reload,sbuild,saytag,supgrade,msg,timer,barc1 = {},{},{},{},{},{},{},{}

parse('mp_building_limit "dispenser" 99999')
parse('mp_building_limit "turret" 99999')
parse('mp_building_limit "supply" 99999')
parse('mp_building_limit "gate field" 99999')
parse('mp_building_limit "wall I" 99999')
parse('mp_building_limit "wall II" 99999')
parse('mp_building_limit "wall III" 99999')
parse('mp_building_limit "barbed wire" 99999')
parse('mp_building_limit "Barricade" 99999')
parse('mp_building_limit "teleporter exit" 99999')
parse('mp_building_limit "teleporter entrance" 99999')

addhook("serveraction","action")
function action(id,action)
if action == 1 then
menu(id,"Main Menu@b,Points Shop|>>,"..msg[id].."")
end
end

addhook("say","say_tag")
function say_tag(id,txt)
if saytag[id] == 1 then
msg("\169000255000"..player(id,"name").."\169255255255 [ Professional ]\169000255000: \169255200000"..txt)
return 1
end
end

addhook("menu","menu0")
function menu0(id,title,but)
if title == "Main Menu" then
if (but==1) then
menu(id,"Points Shop@b,Full Money|3 Points,More Speed|5 Points,Molotov Cocktail|5 Points,M134|7 Points,Medic Armor|7 Points,Super Reload|20 Points,Super Building|25 Points,Special Tag|30 Points,Super Building Upgrade|100 Points")
end
if (but==2) then
menu(id,"Messages@b,I will kill you,,You are annoying,,That's not fair,,I am lagger,,Oh my god")
timer[id] = 1
msg[id] = "(Messages|>>)"
end
end
if title == "Points Shop" then
if (but==1) then
if (player(id,"money")==16000) then
msg2(id,"\169255000000Your money is already full")
pointshow(id)
else
if points[id] >= 3 then
points[id]=points[id]-3
parse("setmoney "..id.." "..player(id,"money")+16000)
msg2(id,"\169000255000Payment successful")
pointshow(id)
else
msg2(id,"\169255000000Your points is not enough")
pointshow(id)
end
end
end
if (but==2) then
if points[id] >= 5 then
points[id]=points[id]-5
parse("speedmod "..id.." 1")
msg2(id,"\169000255000Payment successful")
pointshow(id)
else
msg2(id,"\169255000000Your points is not enough")
pointshow(id)
end
end
if (but==3) then
if points[id] >= 5 then
points[id]=points[id]-5
parse("equip "..id.." 73")
msg2(id,"\169000255000Payment successful")
pointshow(id)
else
msg2(id,"\169255000000Your points is not enough")
pointshow(id)
end
end
if (but==4) then
if points[id] >= 7 then
points[id]=points[id]-7
parse("equip "..id.." 90")
msg2(id,"\169000255000Payment successful")
pointshow(id)
else
msg2(id,"\169255000000Your points is not enough")
pointshow(id)
end
end
if (but==5) then
if points[id] >= 7 then
points[id]=points[id]-7
parse("equip "..id.." 82")
msg2(id,"\169000255000Payment successful")
pointshow(id)
else
msg2(id,"\169255000000Your points is not enough")
pointshow(id)
end
end
if (but==6) then
if points[id] >= 20 and reload[id] == 0 then
points[id]=points[id]-20
reload[id] = 1
msg2(id,"\169000255000Payment successful")
pointshow(id)
else
if reload[id] == 1 then
msg2(id,"\169255000000You already bought Super Reload")
pointshow(id)
else
msg2(id,"\169255000000Your points is not enough")
pointshow(id)
end
end
end
if (but==7) then
if points[id] >= 25 and sbuild[id] == 0 then
points[id]=points[id]-25
sbuild[id] = 1
msg2(id,"\169000255000Payment successful")
pointshow(id)
else
if sbuild[id] == 1 then
msg2(id,"\169255000000You already bought Super Building")
pointshow(id)
else
msg2(id,"\169255000000Your points is not enough")
pointshow(id)
end
end
end
if (but==8) then
if saytag[id] == 1 then
msg2(id,"\169255000000You already bought Special Tag")
pointshow(id)
else
if points[id] >= 30 then
points[id]=points[id]-30
saytag[id] = 1
msg2(id,"\169000255000Payment successful")
pointshow(id)
else
msg2(id,"\169255000000Your points is not enough")
pointshow(id)
end
end
end
if (but==9) then
if supgrade[id] == 1 then 
msg2(id,"\169255000000You already bought Super Upgrading")
pointshow(id)
else
if points[id] >= 100 then
points[id]=points[id]-100
supgrade[id] = 1
msg2(id,"\169000255000Payment successful")
pointshow(id)
else
msg2(id,"\169255000000Your points is not enough")
pointshow(id)
end
end
end
end
end

addhook("objectupgrade","FUpgrade")
function FUpgrade(i,p,g,t)
local t=object(i,"type")
 if t==1 then t=3
 elseif t==3 then t=4
 elseif t==4 then t=5
 elseif t==8 then t=11
 elseif t==11 then t=12
 elseif t==9 then t=15 end
 
 n=player(p,"team")
 x=object(i,"tilex")
 y=object(i,"tiley")
 r=object(i,"rot")
 m=object(i,"mode")
 d=object(i,"player")
 
 if supgrade[p] == 1 then
 parse("killobject "..i)
 parse("spawnobject "..t.." "..x.." "..y.." "..r.." "..m.." "..n.." "..p)
 return 1
end
end

addhook("buildattempt","FUBuild")
function FUBuild(p,t,x,y,i)
if sbuild[p] == 1 then
 if t==20 or t==21 then
  return 0 
 end
 parse('spawnobject '..t..' '..x..' '..y..' 0 0 '..player(p,"team")..' '..p)
 return 1
end
end

addhook("second","second")
function second()
     local playerlist = player(0,"tableliving")
     for _,id in pairs(playerlist) do
	  if timer[id] == 1 then
barc1[id] = barc1[id]-1
	  if barc1[id] == 0 then
msg[id] = "Messages|>>"
timer[id] = 0
barc1[id] = 11
end
end
end
end

addhook("reload","reload0")
function reload0(id,mode)
if reload[id] == 1 then
parse("equip "..id.." "..player(id,"weapontype").."")
parse("setweapon "..id.." "..player(id,"weapontype").."")
	end
end

addhook("join","join")
function join(id)
msg[id] = "Messages|>>"
timer[id] = 0
barc1[id] = 11
points[id] = 0
reload[id] = 0
sbuild[id] = 0
saytag[id] = 0
supgrade[id] = 0
if (player(id,"name")=="test") then
points[id]=points[id]+10000000
pointshow(id)
end
end

function pointshow(id)
parse('hudtxt2 '..id..' 1 "\169000255000Points: \169255255255'..points[id]..'" 7 435')
end

addhook("kill","kill")
function kill(id)
points[id] = points[id]+1
pointshow(id)
end

addhook("spawn","spawn")
function spawn(id)
parse("equip "..id.." 74")
parse("equip "..id.." 58")
parse("equip "..id.." 13")
parse("strip "..id.." 50")
pointshow(id)
end

The script is working good but the
saytag[id]
doesn't work! why?

There is no other say hooks in the script and there is no other say hooks in another lua

why it won't work?

old Re: Some one fix the script for me

Cure Pikachu
User Off Offline

Quote
Is there any instance of the
saytag
array being initialized? In fact, at first glance, I see that a lot of your arrays aren't even initialized.
EDIT: Oh wait I see them now. My bad
edited 3×, last 02.06.18 01:35:07 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview