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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
function InitArray(m,val)
array={}
for i=1,m do
array[i]=val
end
return array
end
if(ppl==nil) then ppl={} end
if(ppl.muted) then ppl.muted={} end
addhook("serveraction","help_button")
addhook("join","show")
addhook('say', 'command')
addhook("minute","mtime")
admins = {70919}
moderators = {}
members = {}
vip = {64674,97024,93145}
site = "www.PBS-Servers.servehttp.com"
--------------------------------------
-- ServerAction --
--------------------------------------
function help_button(id,action)
	if action == 3 then
		for _, u in ipairs(admins) do
			if player(id, 'usgn') == u then
				AdminHelp(id)
			end
		end
		
		for _, u in ipairs(moderators) do
			if player(id, 'usgn') == u then
				ModeratorHelp(id)
			end
		end
		for _, u in ipairs(vip) do
			if player(id, 'usgn') == u then
				VIPHelp(id)
			end
		end
	end
end
--------------------------------------
-- Show --
--------------------------------------
function show(id)
	PlayerJoin(id)
	Privileges(id)
	ServerName()
	realtime()
end
function mtime(id)
	realtime()
	advertisment()
end
--------------------------------------
-- Privileges --
--------------------------------------
function Privileges(id)
usgn_id = player(id,"usgn")
privi = "Player"
	for _, u in ipairs(admins) do
	 if player(id,"usgn") == u then
			usgn_id = player(id,"usgn")
			privi = "Administrators"
			end
		end
	for _, u in ipairs(moderators) do
	 if player(id,"usgn") == u then
			usgn_id = player(id,"usgn")
			privi = "Moderators"
			end
		end
	for _, u in ipairs(members) do
	 if player(id,"usgn") == u then
			usgn_id = player(id,"usgn")
			privi = "Members"
			end
		end
	for _, u in ipairs(vip) do
	 if player(id,"usgn") == u then
			usgn_id = player(id,"usgn")
			privi = "V.i.p"
			end
		end
			parse('hudtxt2 '..id..' 10 "©000255000Your Usgn is: '..usgn_id..' Privilege: '..privi..'" 220 450')
	end
--------------------------------------
-- ServerName --
--------------------------------------
function ServerName()
	parse('hudtxt 12 "©255255255'..game("sv_name")..'" 255 20')
	parse('hudtxt 13 "©255255255'..site..'" 245 35')
end
--------------------------------------
-- Time --
--------------------------------------
function realtime()
txt = os.date("©000255000Time: %I:%M %p")
txt2 = os.date("©000255000Date: %A, %d %b %Y")
txt3 = "©000255000(GMT+8:00 Philippines)"
parse('hudtxt 14 "'..txt3..'" 15 110')
parse('hudtxt 15 "'..txt..'" 15 125')
parse('hudtxt 16 "'..txt2..'" 15 140')
end
--------------------------------------
-- Join --
--------------------------------------
function PlayerJoin(p)
	msg2(p,"©005116250Welcome To "..game("sv_name")..", "..player(p,"name").."!")
end
--------------------------------------
-- Ads --
--------------------------------------
function advertisment()
msg("©255100000This is "..game("sv_name").." Server")
msg("©255100000A Philippine Server Powered By: PBS Inc.")
msg("©255100000Were Proud to be Pilipino!")
msg("©255100000"..site)
end
--------------------------------------
-- CommandHook --
--------------------------------------
function command(id,txt)
	if txt:sub(0,1) == '!' then
		cmd=txt:sub(2)
		print('©255255255'..cmd..' executed by '..player(id,'name')..' IP: '..player(id,'ip'))
--------------------------------------
-- AdminCommands --
--------------------------------------
		for _, u in ipairs(admins) do
			if player(id, 'usgn') == u then
			
				if cmd:sub(0,8) == 'teleport' then
				teleport(id,cmd:sub(10,13),cmd:sub(15,18))
				return 1
				end
				if cmd:sub(0,6) == 'encage' then
					encage()
					return 1
				end
				if cmd:sub(0,8) == 'giveaway' then
					giveaway(cmd:sub(10,11),cmd:sub(13))
					return 1
				end
				
				if cmd:sub(0,5) == 'speed' then
					speed(id,cmd:sub(7))
					return 1
				end
				if cmd:sub(0,5) == 'equip' then
					equip(id,cmd:sub(7))
					return 1
				end
				
				if cmd:sub(0,8) == 'allequip' then
					allequip(id)
					return 1
				end
				
				if cmd:sub(0,5) == 'armor' then
					armor(id)
					return 1
				end
				
				if cmd:sub(0,4) == 'slap' then
					slap(cmd:sub(6))
					return 1
				end
				
				if cmd:sub(0,3) == 'ban' then
					ban(cmd:sub(5))
					return 1
				end
				
				if cmd:sub(1,4) == 'kick' then
					kick(cmd:sub(6))
					return 1
				end
				if cmd:sub(0,6) == 'hplist' then
					healthlist(id)
					return 1
				end
				if cmd:sub(0,4) == 'goto' then
					goto(id,cmd:sub(6))
					return 1
				end
				if cmd:sub(0,5) == 'bring' then
					bring(id,cmd:sub(7))
					return 1
				end
				if cmd:sub(0,7) == 'explode' then
					explode(id,cmd:sub(9))
					return 1
				end
				if cmd:sub(0,5) == 'quake' then
					quake(id,cmd:sub(7))
					return 1
				end
			end
		end
		
--------------------------------------
-- ModeratorCommands --
--------------------------------------
		for _, u in ipairs(moderators) do
			if player(id, 'usgn') == u then
			
				if cmd:sub(0,8) == 'teleport' then
				teleport(id,cmd:sub(10,13),cmd:sub(15,18))
				return 1
				end
				
				if cmd:sub(0,5) == 'speed' then
					speed(id,cmd:sub(7))
					return 1
				end
				
				if cmd:sub(0,5) == 'equip' then
					equip(id,cmd:sub(7))
					return 1
				end
				
				if cmd:sub(1,4) == 'kick' then
					kick(cmd:sub(6))
					return 1
				end
			end
		end
--------------------------------------
-- V.I.P Commands --
--------------------------------------
		for _, u in ipairs(vip) do
			if player(id, 'usgn') == u then
				if cmd:sub(0,5) == 'equip' then
					equip(id,cmd:sub(7))
					return 1
				end
			end
		end
	end
	return 1
end
--------------------------------------
-- Commands --
--------------------------------------
function AdminHelp(id)
	msg2(id,"©255255051!giveaway [ITEM] [MSG] -- Gives free items to all players")
	msg2(id,"©255255051!hplist -- Gives you the Health List of the players AOTS")
	msg2(id,"©255255051!speed [Value] -- Gives You a Speed with Value-XX")
	msg2(id,"©255255051!allequip -- Equip all possible weapons to you")
	msg2(id,"©255255051!bringme [ID] -- Bring yourself to Player[ID]")
	msg2(id,"©255255051!quake [LENGTH] -- Make an Haiti earthquake!")
	msg2(id,"©255255051!encage -- Kill all Players inside the cage")
	msg2(id,"©255255051!bring [ID] -- Bring Player[ID] to you")
	msg2(id,"©255255051!explode [DMG] -- Spawn explosion")
	msg2(id,"©255255051!armor -- Equip a Heavy Armor")
	msg2(id,"©255255051!equip [ID] -- Equip a Weapon")
	msg2(id,"©255255051!slap [ID] -- Slap a Player")
	msg2(id,"©255255051!kick [ID] -- Kick a Player")
	msg2(id,"©255255051!ban [ID] -- Ban a Player")
end
function ModeratorHelp(id)
	msg2(id,"©255255051!teleport [X] [Y] -- Teleports You To ..x.. ..y.. On The Map")
	msg2(id,"©255255051!speed [Value] -- Gives You a Speed with Value-XX")
	msg2(id,"©255255051!equip [ID] -- Equip a Weapon")
	msg2(id,"©255255051!kick [ID] -- Kick a Player")
end
function VIPHelp(id)
	msg2(id,"©255255051!speed [Value] -- Gives You a Speed with Value-XX")
end
function teleport(id,loc1,loc2)
	parse('setpos '..id..' '..loc1..' '..loc2)
end
function speed(id,speed)
	parse('speedmod '..id..' '..speed)
end
function equip(id,wepid)
	parse('equip '..id..' '..wepid)
end
	
function allequip(id)
	weapons = {1, 2, 3, 4, 5, 6, 10, 11, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 45, 46, 47, 48, 49, 51, 52, 53, 54, 69, 72, 73, 74, 75, 76, 77, 78, 83, 85, 86, 87, 88}
	for _, wepid in ipairs(weapons) do		
		parse('equip '..id..' '..wepid)
	end
end
	
function armor(id)
	parse('equip '..id..' 81')
end
function slap(id)
	if player(id,"exists") then
	parse('slap '..id)
	end
end
	
function ban(id)
	if player(id,"exists") then
	parse('banip '..player(id,'ip')..' 10')
	end
end
function kick(id)
	if player(id,"exists") then
	parse('kick '..id)
	end
end
function goto(id,target)
	parse('setpos '..id..' '..player(target,"x")..' '..player(target,"y"))
	parse('effect "colorsmoke" '..player(target,"x")..' '..player(target,"y")..' 0 0 000 255 000')
end
function bring(id,target)	
	parse('setpos '..target..' '..player(id,"x")..' '..player(id,"y"))
	parse('effect "colorsmoke" '..player(id,"x")..' '..player(id,"y")..' 0 0 000 255 000')
end
function explode(id,dmg)
	parse('explosion '..player(id,'x')..' '..player(id,'y')..' '..dmg..' '..dmg..' '..id)
end
function quake(id,length)
		if length then
			length = math.min(length*50,250)
			for _, id in ipairs(player(0,'table')) do
				parse('shake '..id..' '..length)
			end
		for i = 1, 6 do
			if math.random(0,1) == 1 then
				parse('sv_sound weapons/explode'..i..'.wav')
			end
		end
	end
end
function healthlist(id)
	for i=1,32 do
		if (player(i,"exists")) then
			hp=player(i,"health")
			if (hp>90) then
				msg2(id,"©000255000"..player(i,"name").." -> HP: "..hp)
			elseif (hp>60) then
				msg2(id,"©255255000"..player(i,"name").." -> HP: "..hp)
			elseif (hp>30) then
				msg2(id,"©255128000"..player(i,"name").." -> HP: "..hp)
			else
				msg2(id,"©255000000"..player(i,"name").." -> HP: "..hp)
			end
		end
	end
	return 2
end
function encage()
	parse("sv_msg ©255000000ENCAGING ALL PLAYERS!!!@C")
	a=player(0,"table")
	for i=1,#a do
		if (player(a[i],"team")>0) then
			if (player(a[i],"health")>0) then
				x=player(a[i],"tilex")
				y=player(a[i],"tiley")
				parse ("spawnobject 3 "..(x-1).." "..(y-1))
				parse ("spawnobject 3 "..(x).." "..(y-1))
				parse ("spawnobject 3 "..(x+1).." "..(y-1))
				parse ("spawnobject 8 "..(x-1).." "..(y))
				parse ("spawnobject 8 "..(x+1).." "..(y))
				parse ("spawnobject 3 "..(x-1).." "..(y+1))
				parse ("spawnobject 3 "..(x).." "..(y+1))
				parse ("spawnobject 3 "..(x+1).." "..(y+1))
			end
		end
	end
	return 2
end
	
function giveaway(item,msg)
	parse("sv_msg ©255000000FREE "..msg.." !!!@C")
	a=player(0,"table")
	for i=1,#a do
		if (player(a[i],"team")>0) then
			if (player(a[i],"health")>0) then
				x=player(a[i],"tilex")
				y=player(a[i],"tiley")
				parse ("spawnitem "..item.." "..(x-1).." "..(y))
			end
		end
	end
	return 2
end
edited 2×, last 25.02.13 06:13:51 pm
joinhook not working
1 
Offline
DC