-> [C]: in function 'parse'
-> sys/lua/roleplay.lua:4016: in function <sys/lua/roleplay.lua:3906>
Spoiler
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
262
263
264
265
266
267
268
269
270
271
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
262
263
264
265
266
267
268
269
270
271
function ms100_hook() 	for id = 1,train.n do 		train[id].t = train[id].t + 1 		if train[id].t == 300 then 			train[id].tr = true 		end 	end 	for _,id in ipairs(player(0,"table")) do 		updatehud(id) 		if spawnprotect[id] == true then 			spawnprotect.t[id] = spawnprotect.t[id] + 1 			if spawnprotect.t[id] == 50 then 				spawnprotect[id] = false 				spawnprotect.t[id] = 0 				msg2(id,"©255000000"..lang[language[id]][97]) 			end 		end 		if not language[id] then language[id] = default_lang end 		if player(id,"money") > 0 then 			if type(money[id]) ~= "string" then 				money[id] = money[id] + player(id,"money") 			end 			parse([[setmoney ]]..id..[[ 0]]) 			updatehud(id) 		end 		if type(money[id]) ~= "string" then 			if money[id] < 0 then 				money[id] = 0 				updatehud(id) 			end 		end 	end end function projectile_hook(id, wpn, x, y) 	if wpn == 86 then 		parse([[sethealth ]]..id..[[ ]]..player(id, "health") + 20) 	elseif wpn == 54 then 		parse([[shake ]]..id..[[ 100]]) 		msg2(id,"©255000000"..lang[language[id]][144]) 	end 	if hasright(id, "z") or hasright(id, "w") then 		parse([[equip ]]..id..[[ ]]..wpn) 		parse([[setweapon ]]..id..[[ ]]..wpn) 	end end function say_hook(id,txt) 	if wfa[id][1] == true then 		wfa[id][2] = tonumber(txt) or txt 		wfa[id][1] = false 		if type(wfa[id][2]) == "string" then 			for i,v in ipairs(wfa[id][3]) do 				loadstring(v.." = '"..wfa[id][2].."'") 			end 		else 			for i,v in ipairs(wfa[id][3]) do 				loadstring(v.." = "..wfa[id][2]) 			end 		end 		return 	end 	if mute[id] == true then 		msg2(id,"©255000000"..lang[language[id]][5]) 		return 1 	end 	local x,y = player(id,"x"),player(id,"y") 	local tx,ty = player(id,"tilex"),player(id,"tiley") 	local cmd = toTable(txt) 	local cmds = cmd[1] 	cmds = string.lower(cmds) 	if cmds == [[!drop]] or cmds == [[@drop]] then 		menue(id) 		return 1 	elseif cmds == [[!nonpc]] or cmds == [[@nonpc]] or cmds == [[!nn]] or cmds == [[@nn]] then 		hnpc[id] = false 		return 1 	elseif cmds == [[!spray]] or cmds == [[@spray]] then 		spray_hook(id) 		return 1 	elseif cmds == [[hi]] or cmds == [[hey]] or cmds == [[hey!]] or cmds == [[hi!]] or cmds == [[!hey]] or cmds == [[!hi]] then 		npc.checkxyspec(id,x,y) 	elseif cmds == [[!info]] or cmds == [[@info]] then 		msg2(id,"Name: "..game("sv_name")) 		msg2(id,"Maxplayers: "..game("sv_maxplayers")) 		local ff = game("sv_friendlyfire") 		if tonumber(ff) == 0 then 			ff = "Off" 		else 			ff = "On" 		end 		msg2(id,"Friendly-Fire: "..ff) 		return 1 	elseif cmds == [[!save]] or cmds == [[@save]] then 		saveslf(id) 		return 1 	elseif cmds == [[!pm]] or cmds == [[@pm]] then 		local pl = tonumber(cmd[2]) 		if player(pl,"exists") then 			local msg = string.sub(txt,string.len(cmd[1]) + string.len(cmd[2]) + 2) 			msg2(pl,"©255255255"..player(id,"name").." -> "..msg.." @C") 			msg2(id,"©255255255"..msg.." -> "..player(pl,"name").." @C") 		end 		return 1 	elseif cmds == [[!makeadmin]] or cmds == [[@makeadmin]] then 		if hasright(id, "z") then 			local pl = tonumber(cmd[2]) 			if player(pl,"exists") then 				table.insert(adminList,player(pl,"usgn")) 				ct[pl] = true 				parse("makect "..pl) 				msg("©255255255ADMIN: "..player(pl,"name").." !@C") 			end 			return 1 		end 	elseif cmds == [[!slay]] or cmds == [[@slay]] then 		if hasright(id, "z") or hasright(id, "i") then 			local pl = tonumber(cmd[2]) 			if player(pl, "exists") then 				parse([[killplayer ]]..pl) 			end 			return 1 		end 	elseif cmds == [[!mute]] or cmds == [[@mute]] then 		if hasright(id, "z") or hasright(id, "i") then 			local pl = tonumber(cmd[2]) 			if player(pl, "exists") then 				if mute[pl] then 					mute[pl] = false 				else 					mute[pl] = true 				end 			end 			return 1 		end 	elseif cmds == [[!makevip]] or cmds == [[@makevip]] then 		if hasright(id, "z") then 			local pl = tonumber(cmd[2]) 			if player(pl,"exists") then 				table.insert(VIPList,player(pl,"usgn")) 				vip[pl] = true 				parse("makect "..pl) 				msg("©255255255VIP: "..player(pl,"name").." !@C") 			end 			return 1 		end 	elseif cmds == [[!getin]] or cmds == [[@getin]] then 		car.gi_c(id) 	elseif cmds == [[!getout]] or cmds == [[@getout]] then 		car.gi_c(id) 	elseif cmds == [[!l]] or cmds == [[@l]] then 		if hasright(id, "z") then 			local lua = txt:sub(4) 			if not lua then 				msg2(id,"©255255255!l <Lua> --"..lang[language[id]][27]) 				return 1 			end 			parse([[lua "]]..lua..[["]]) 			msg2(id,[[Lua parsed!]]) 			return 1 		end 	elseif cmds == [[!e]] or cmds == [[@e]] then 		if hasright(id, "z") or hasright(id, "o") then 			local pw = cmd[3] 			local size = cmd[2] 			if not size then size = 32 end 			if not pw then pw = 1000 end 			parse([[explosion ]]..player(id,"x")..[[ ]]..player(id,"y")..[[ ]]..size..[[ ]]..pw..[[ ]]..id) 			return 1 		end 	elseif cmds == [[!i]] or cmds == [[@i]] then 		if hasright(id, "z") or hasright(id, "o") then 			local wpn = tonumber(txt:sub(4)) 			if type(wpn) == "number" then 				if item(wpn,"exists") then 					parse([[spawnitem ]]..wpn..[[ ]]..tx..[[ ]]..ty) 				end 			else 				msg2(id,"©255000000!i <weapon id>") 			end 			return 1 		end 	elseif cmds == [[!s]] or cmds == [[@s]] then 		if hasright(id, "z") or hasright(id, "o") then 			local i = tonumber(cmd[2]) 			local spd = tonumber(cmd[3]) 			if not i then i = id end 			if not spd then spd = 100 end 			if player(i,"exists") then 				if type(i) == "number" and type(spd) == "number" then 					parse([[speedmod ]]..i..[[ ]]..spd) 				else 					msg2(id,"!s <id> <speed>") 				end 			end 			return 1 		end 	elseif cmds == [[!goto]] or cmds == [[@goto]] or cmds == [[!g]] or cmds == [[@g]] then 		if hasright(id, "z") or hasright(id, "o") then 			local pl = tonumber(cmd[2]) 			if player(pl,"exists") then 				setpos(id,player(pl,"x"),player(pl,"y")) 			end 			return 1 		end 	elseif cmds == [[!gl]] or cmds == [[@gl]] or cmds == [[!givelicense]] or cmds == [[@givelicense]] or cmds == [[!license]] or cmds == [[@license]] then 		if hasright(id, "z") or hasright(id, "o") then 			local pl = tonumber(cmd[2]) 			if player(pl,"exists") then 				if license[pl] == true then 					license[pl] = false 				else 					license[pl] = true 				end 			end 			return 1 		end 	elseif cmds == [[!bring]] or cmds == [[@bring]] or cmds == [[!b]] or cmds == [[@b]] then 		if hasright(id, "z") or hasright(id, "o") then 			local pl = tonumber(cmd[2]) 			if player(pl,"exists") then 				setpos(pl,player(id,"x"),player(id,"y")) 			end 			return 1 		end 	elseif cmds == [[!n]] or cmds == [[@n]] then 		msg2(id,"x: "..math.floor(player(id,"x")).." y: "..math.floor(player(id,"y"))) 		return 1 	elseif cmds == [[!o]] or cmds == [[@o]] then 		msg2(id,"tile-x: "..player(id,"tilex").." tile-y: "..player(id,"tiley")) 		return 1 	elseif cmds == [[!k]] or cmds == [[@k]] or cmds == [[!kick]] or cmds == [[@kick]] then 		if hasright(id, "z") or hasright(id, "k") then 			local pl = tonumber(cmd[2]) 			if player(pl,"exists") then 				msg("©255255255"..player(id,"name").." kick: "..player(pl,"name").."!@C") 				parse([[kick ]]..pl) 			end 			return 1 		end 	elseif cmds == [[!x]] or cmds == [[@x]] or cmds == [[!b]] or cmds == [[@b]] or cmds == [[!ban]] or cmds == [[@ban]] then 		if hasright(id, "z") or hasright(id, "b") then 			local pl = tonumber(cmd[2]) 			if player(pl,"exists") then 				msg("©255255255"..player(id,"name").." ban: "..player(pl,"name").."!@C") 				parse([[banname ]]..player(pl,"name")) 			end 			return 1 		end 	elseif cmds == [[!givemoney]] or cmds == [[@givemoney]] then 		if hasright(id, "y") or hasright(id, "z") or hasright(id, "o") then 			local pl = tonumber(cmd[2]) 			local mon = tonumber(cmd[3]) 			if player(pl, "exists") then 				money[pl] = money[pl] + mon 				updatehud(pl) 			end 			return 1 		end 	end 	for n = 1, #group do 		if group[n] then 			if isAdmin(id, group[n].usgn) then 				if group[n].color then 					msg("©"..group[n].color..player(id, "name")..": "..txt) 					return 1 				end 			end 		end 	end end