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
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
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
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
---------------------------------------- -- Classes Script by Karim Patron -- -- 27.07.2013 -- -- Adds Player Classes to your server -- ---------------------------------------- ownerusgn = {113769} adminusgn = {115795} if sample==nil then sample={} end sample.classes={} ------------------- --Server Settings-- ------------------- parse("sv_friendlyfire 0") parse("sv_lan 0") parse("mp_infammo 0") parse("mp_dispenser_money 500") parse("sv_maxplayers 32") parse("mp_dispenser_health 10") parse('mp_building_limit "dispenser" 10') parse('mp_building_limit "supply" 10') parse('mp_building_limit "gate field" 30') parse('mp_building_limit "turret" 20') parse('mp_building_limit "teleporter entrance" 5') parse('mp_building_limit "teleporter exit" 5') parse("sv_gm 0") parse("mp_startmoney 5000") parse("mp_teleportreload 3") parse('mp_supply_items "47,90,91,72,73,76,83,45"') parse("mp_antispeeder 0") parse("sv_fow 0") parse("mp_c4timer 45") parse("mp_roundtime 5 ") parse('mp_wpndmg "gutbomb" 10000') parse('mp_wpndmg "claw" 10000') ----------------------- -- INITIAL SETUP -- ----------------------- function initArray(m) local array = {} for i = 1, m do array[i]=0 end return array end sample.classes.class=initArray(32) sel_class=initArray(32) function sample.classes.classmenu(id, act) if act == 1 then menu(id,"Server Classes (Page 1/3),Random|Random Class,Zombie,Soldier,Pyro,Ghost,Heavy Killer,Super Killer,Destroyer,---> Next Page|(Page 2)") end if (title=="Server Classes (Page 1/3)") then if (sel>=1 and sel<=9) then sample.classes.class[id]=sel elseif (sel==9) then menu(id,"Server Classes (Page 2/3),Builder,Trapper,Grenadier,Runner,Team Helper,Explosion Maker,Pro Sniper,---> Next Page|(Page 3),<--- Previous Page|(Page 1)") end end if (title=="Server Classes (Page 2/3)") then if (sel>=1 and sel<=9) then sample.classes.class[id]=sel+9 elseif (sel==8) then menu(id,"Server Classes (Page 3/3),SWAT,1 Shoot Kill,Strong/Fat,Toxic Healer,Owner Class|Only For Owners,Admin Class|Only For Admins,No Class|Normal (Knife),<--- Previous Page|(Page 2)") elseif (sel==9) then menu(id,"Server Classes (Page 1/3),Random|Random Class,Zombie,Soldier,Pyro,Ghost,Heavy Killer,Super Killer,Destroyer,---> Next Page") end end if (title=="Server Classes (Page 3/3)") then if (sel>=1 and sel<=9) then sample.classes.class[id]=sel+18 elseif (sel==8) then menu(id,"Server Classes (Page 2/3),Builder,Trapper,Grenadier,Runner,Team Helper,Explosion Maker,Pro Sniper,---> Next Page|(Page 3),<--- Previous Page|(Page 1)") end end end ----------------------- -- TEAM -> CLASS -- ----------------------- addhook("team","sample.classes.team") function sample.classes.team(id,team) if (team>0) then sample.classes.classmenu(id) end end ----------------------- -- SERVERACTION -- ----------------------- addhook("serveraction","sample.classes.serveraction") function sample.classes.serveraction(id,act) sample.classes.classmenu(id,act) end ----------------------- -- CLASS SELECTION -- ----------------------- addhook("menu","sample.classes.menu") function sample.classes.menu(id,title,sel) if (title=="Server Classes (Page 1/3)") then if (sel>=1 and sel<=9) then sample.classes.menu[id]=sel elseif (sel==9) then menu(id,"Server Classes (Page 2/3),Builder,Trapper,Grenadier,Runner,Team Helper,Explosion Maker,Pro Sniper,---> Next Page|(Page 3),<--- Previous Page|(Page 1)") end end if (title=="Server Classes (Page 2/3)") then if (sel>=1 and sel<=9) then sample.classes.menu[id]=sel+9 elseif (sel==8) then menu(id,"Server Classes (Page 3/3),SWAT,1 Shoot Kill,Strong/Fat,Toxic Healer,Owner Class|Only For Owners,Admin Class|Only For Admins,No Class|Normal (Knife),<--- Previous Page|(Page 2)") elseif (sel==9) then menu(id,"Server Classes (Page 1/3),Random|Random Class,Zombie,Soldier,Pyro,Ghost,Heavy Killer,Super Killer,Destroyer,---> Next Page") end end if (title=="Server Classes (Page 3/3)") then if (sel>=1 and sel<=8) then sample.classes.menu[id]=sel+18 elseif (sel==8) then menu(id,"Server Classes (Page 2/3),Builder,Trapper,Grenadier,Runner,Team Helper,Explosion Maker,Pro Sniper,---> Next Page|(Page 3),<--- Previous Page|(Page 1)") end end end ----------------------- -- SPAWN -- ----------------------- addhook("spawn","class_spawn") function class_spawn(id) if sample.classes.class[id]==0 then sample.classes.class[id]=math.random(1,22) end if (sample.classes.class[id]==9) then sample.classes.class[id] = math.random(1,22) end if (sample.classes.class[id]==17) then sample.classes.class[id] = math.random(1,22) end if (sample.classes.class[id]==18) then sample.classes.class[id] = math.random(1,22) end sel_class[id]=sample.classes.class[id] --For Bots parse ("strip "..id.." 0") if (player(id,'bot')) then sample.classes.class[id] = math.random(1,22) if (sample.classes.class[id]==9) then sample.classes.class[id] = math.random(1,22) end if (sample.classes.class[id]==17) then sample.classes.class[id] = math.random(1,22) end if (sample.classes.class[id]==18) then sample.classes.class[id] = math.random(1,22) end end -- Random parse ("strip "..id.." 0") if (sample.classes.class[id]==1) then msg2(id,"©000255000You Selected A Random Class!") sample.classes.class[id] = math.random(1,22) if (sample.classes.class[id]==9) then sample.classes.class[id] = math.random(1,22) end if (sample.classes.class[id]==17) then sample.classes.class[id] = math.random(1,22) end if (sample.classes.class[id]==18) then sample.classes.class[id] = math.random(1,22) end end -- Zombie if (sample.classes.class[id]==2) then msg2(id,"©000255000You Selected The Zombie Class!") parse ("setmaxhealth "..id.." 250") parse ("speedmod "..id.." -10") parse ("equip "..id.." 78") parse ("equip "..id.." 86") parse ("equip "..id.." 59") end -- Soldier if (sample.classes.class[id]==3) then msg2(id,"©000255000You Selected The Soldier Class!") parse ("setmaxhealth "..id.." 90") parse ("speedmod "..id.." -1") parse ("equip "..id.." 51") parse ("equip "..id.." 6") parse ("equip "..id.." 40") parse ("equip "..id.." 80") end -- Pyro if (sample.classes.class[id]==4) then msg2(id,"©000255000You Selected The Pyro Class!") parse ("setmaxhealth "..id.." 120") parse ("speedmod "..id.." -2") parse ("equip "..id.." 46") parse ("equip "..id.." 5") parse ("equip "..id.." 73") parse ("equip "..id.." 51") end -- Ghost if (sample.classes.class[id]==5) then msg2(id,"©000255000You Selected The Ghost Class!") parse ("setmaxhealth "..id.." 70") parse ("speedmod "..id.." 5") parse ("equip "..id.." 10") parse ("equip "..id.." 84") parse ("equip "..id.." 1") parse ("equip "..id.." 52") parse ("equip "..id.." 54") end -- Heavy Killer if (sample.classes.class[id]==6) then msg2(id,"©000255000You Selected The Heavy Killer Class!") parse ("setmaxhealth "..id.." 40") parse ("speedmod "..id.." -2") parse ("equip "..id.." 22") parse ("equip "..id.." 51") parse ("equip "..id.." 52") parse ("equip "..id.." 53") parse ("equip "..id.." 3") parse ("equip "..id.." 81") end -- Super Killer if (sample.classes.class[id]==7) then msg2(id,"©000255000You Selected The Super Killer Class!") parse ("setmaxhealth "..id.." 20") parse ("speedmod "..id.." -2") parse ("equip "..id.." 24") parse ("equip "..id.." 83") parse ("equip "..id.." 51") parse ("equip "..id.." 52") parse ("equip "..id.." 53") parse ("equip "..id.." 3") end -- Destroyer if (sample.classes.class[id]==8) then msg2(id,"©000255000You Selected The Destroyer Class!") parse ("setmaxhealth "..id.." 75") parse ("speedmod "..id.." 0") parse ("equip "..id.." 90") parse ("equip "..id.." 85") parse ("equip "..id.." 69") parse ("equip "..id.." 76") parse ("equip "..id.." 2") end -- Builder if (sample.classes.class[id]==10) then msg2(id,"©000255000You Selected The Builder Class!") parse ("setmaxhealth "..id.." 70") parse ("speedmod "..id.." 5") parse ("equip "..id.." 74") parse ("equip "..id.." 4") parse ("equip "..id.." 21") parse ("equip "..id.." 51") end -- Trapper if (sample.classes.class[id]==11) then msg2(id,"©000255000You Selected The Trapper Class!") parse ("setmaxhealth "..id.." 70") parse ("speedmod "..id.." 0") parse ("equip "..id.." 77") parse ("equip "..id.." 87") parse ("equip "..id.." 88") parse ("equip "..id.." 89") parse ("equip "..id.." 53") end -- Grenadier if (sample.classes.class[id]==12) then msg2(id,"©000255000You Selected The Grenadier Class!") parse ("setmaxhealth "..id.." 130") parse ("speedmod "..id.." -4") parse ("equip "..id.." 51") parse ("equip "..id.." 52") parse ("equip "..id.." 53") parse ("equip "..id.." 72") parse ("equip "..id.." 73") parse ("equip "..id.." 76") end -- Runner if (sample.classes.class[id]==13) then msg2(id,"©000255000You Selected The Runner Class!") parse ("setmaxhealth "..id.." 30") parse ("speedmod "..id.." 30") parse ("equip "..id.." 3") parse ("equip "..id.." 51") parse ("equip "..id.." 91") end -- Team Helper if (sample.classes.class[id]==14) then msg2(id,"©000255000You Selected The Team Helper Class!") msg2(id,"©255255255Say !bandage To Drop Bandages (Costs 50 HP)") msg2(id,"©255255255Say !primary-ammo To Drop Primary Ammos (Costs 50 HP)") msg2(id,"©255255255Say !secondary-ammo To Drop Secondary Ammos (Costs 20 HP)") parse ("setmaxhealth "..id.." 200") parse ("speedmod "..id.." 0") parse ("equip "..id.." 2") end -- Explosion Maker if (sample.classes.class[id]==15) then msg2(id,"©000255000You Selected The Explosion Maker Class!") parse ("setmaxhealth "..id.." 60") parse ("speedmod "..id.." 0") parse ("equip "..id.." 48") parse ("equip "..id.." 89") parse ("equip "..id.." 49") parse ("equip "..id.." 75") end -- Pro Sniper if (sample.classes.class[id]==16) then msg2(id,"©000255000You Selected The Pro Sniper Class!") parse ("setmaxhealth "..id.." 150") parse ("speedmod "..id.." -3") parse ("equip "..id.." 35") parse ("equip "..id.." 34") parse ("equip "..id.." 53") parse ("equip "..id.." 52") parse ("equip "..id.." 1") end -- SWAT if (sample.classes.class[id]==19) then msg2(id,"©000255000You Selected The SWAT Class!") parse ("setmaxhealth "..id.." 60") parse ("speedmod "..id.." 5") parse ("equip "..id.." 39") parse ("setarmor "..id.." 100") parse ("equip "..id.." 41") parse ("equip "..id.." 73") parse ("equip "..id.." 2") end -- 1 Shoot Kill if (sample.classes.class[id]==20) then msg2(id,"©000255000You Selected The 1 Shoot Kill Class!") parse ("setmaxhealth "..id.." 3") parse ("speedmod "..id.." 25") parse ("equip "..id.." 45") parse ("equip "..id.." 47") parse ("equip "..id.." 83") end -- Strong/Fat if (sample.classes.class[id]==21) then msg2(id,"©000255000You Selected The Strong/Fat Class!") parse ("setmaxhealth "..id.." 175") parse ("speedmod "..id.." -10") parse ("equip "..id.." 32") parse ("equip "..id.." 79") parse ("equip "..id.." 51") parse ("equip "..id.." 4") end -- Toxic Healer if (sample.classes.class[id]==22) then msg2(id,"©000255000You Selected The Toxic Healer Class!") parse ("setmaxhealth "..id.." 65") parse ("speedmod "..id.." 5") parse ("equip "..id.." 36") parse ("equip "..id.." 82") parse ("equip "..id.." 2") parse ("equip "..id.." 72") parse ("equip "..id.." 60") end -- Owner Class if (sample.classes.class[id]==23) then if (player(id,'usgn')==ownerusgn) then msg2(id,"©000255000You Selected The Owner Class!") parse ("equip "..id.." 74") parse ("setmaxhealth "..id.." 250") parse ("speedmod "..id.." 100") parse ("equip "..id.." 3") parse ("equip "..id.." 45") parse ("equip "..id.." 83") parse ("equip "..id.." 69") parse ("equip "..id.." 88") parse ("equip "..id.." 85") parse ("equip "..id.." 77") parse ("equip "..id.." 87") parse ("equip "..id.." 89") parse ("equip "..id.." 54") parse ("equip "..id.." 75") end else msg2(id,"©255000000You Are Not An Owner") sel_class[id] = math.random(1,22) if (sel_class[id]==9) then sel_class[id] = math.random(1,22) end if (sel_class[id]==17) then sel_class[id] = math.random(1,22) end if (sel_class[id]==18) then sel_class[id] = math.random(1,22) end end -- Admin Class if (sample.classes.class[id]==24) then if (player(id,'usgn')==adminusgn) then msg2(id,"©000255000You Selected The Admin Class!") parse ("equip "..id.." 74") parse ("setmaxhealth "..id.." 200") parse ("speedmod "..id.." 50") parse ("equip "..id.." 5") parse ("equip "..id.." 47") parse ("equip "..id.." 81") parse ("equip "..id.." 41") parse ("equip "..id.." 75") parse ("equip "..id.." 91") parse ("equip "..id.." 89") end else sel_class[id] = math.random(1,22) if (sel_class[id]==9) then sel_class[id] = math.random(1,22) end if (sel_class[id]==17) then sel_class[id] = math.random(1,22) end if (sel_class[id]==18) then sel_class[id] = math.random(1,22) end end -- No Class if (sample.classes.class[id]==25) then msg2(id,"©000255000You Will Have Only Knife When You Respawn !") parse ("setmaxhealth "..id.." 100") parse ("speedmod "..id.." 0") parse ("equip "..id.." 50") end end ----------------------- -- NO BUYING -- ----------------------- addhook("buy","sample.classes.buy") function sample.classes.buy() return 1 end ----------------------- -- NO COLLECTING -- ----------------------- addhook("walkover","sample.classes.walkover") function sample.classes.walkover(id,iid,type) if (type>=61 and type<=68) then return 0 end return 1 end ----------------------- -- NO DROPPING -- ----------------------- addhook("drop","sample.classes.drop") function sample.classes.drop() return 1 end ----------------------- -- NO DEAD DROPPING -- ----------------------- addhook("die","sample.classes.die") function sample.classes.die() return 1 end ------------------------------- --Remove Weapons on round end-- ------------------------------- addhook("endround","rem_wep") function rem_wep() for i = 1,32 do if player(i,"exists") then parse('strip '..i..' 0') parse ("setarmor "..i.." 0") end end end ------------------------------------ --Special Skills in "Zombie" Class-- ------------------------------------ addhook("second","skills") function skills() for hp = 1,32 do if (sel_class[id]==2) then parse("sethealth "..id.." "..player(hp,"health") +3) end end end ------------------------------------------ --Special Skills in "Team Helper" class-- ------------------------------------------ addhook("say","say_drop") function say_drop(id,txt) if (sel_class[id]==14) then if (txt=="!bandage") then parse("spawnitem 65 "..player(id,"tilex").." "..player(id,"tiley").."") parse("sethealth "..id.." "..player(id,"health")-50) end end end addhook("say","say_drop_2") function say_drop_2(id,txt) if (sel_class[id]==14) then if (txt=="!primary-ammo") then parse("spawnitem 61 "..player(id,"tilex").." "..player(id,"tiley").."") parse("sethealth "..id.." "..player(id,"health")-50) end end end addhook("say","say_drop_3") function say_drop_3(id,txt) if (sel_class[id]==14) then if (txt=="!secondary-ammo") then parse("spawnitem 62 "..player(id,"tilex").." "..player(id,"tiley").."") parse("sethealth "..id.." "..player(id,"health")-20) end end end addhook("second","skills") function skills() for _, hp in ipairs(player(0,"tableliving")) do if (sel_class[hp]==14) then parse("sethealth "..hp.." "..player(hp,"health") +2) end end end -------------------- --exploding flares-- -------------------- dmgx = 1000 sizex = 250 addhook("projectile","explosivex") function explosivex(id,weapon,x,y) if (weapon==54) then parse("explosion "..x.." "..y.." "..sizex.." "..dmgx.." "..id) end end ----------------------- --exploding Snowballs-- ----------------------- dmgy = 50 sizey = 50 addhook("projectile","explosivey") function explosivey(id,weapon,x,y) if (weapon==75) then parse("explosion "..x.." "..y.." "..sizey.." "..dmgy.." "..id) end end ------------------- --gut bomb effect-- ------------------- addhook("projectile","npcyx") function npcyx(id,weapon,x,y) if weapon == 86 then parse("spawnnpc 1 "..math.floor(x/32).." "..math.floor(y/32).." "..player(id,"rot")) end end
thanks