/
Zombie_AL
8490 lines (7909 loc) · 308 KB
/
Zombie_AL
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
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
This version of Zombie Apocalypse is created and developed by Fahadking07.
You are not allowed to re-release it with out getting my permission.
Feel free to suggest me for new updates at fahadking07@outlook.com
Latest Updates:
- Login Bug Fixed
- New awesome looking textdraws
- Some bugs fixed
- Maps bug fixed
For any Help and Support regarding hosting, scripting, etc contact me at
- Samp Forum or fahadking07@outlook
And expect more for its future version. I will be making it the best :D
*/
native WP_Hash(buffer[], len, const str[]);
#include <a_samp>
#include <zcmd>
#include <sscanf2>
#include <foreach>
#include <YSI\y_ini>
#include <KickBan>
// Defines
#define function%0(%1) forward%0(%1);public%0(%1)
#define NON_IMMUNE 69,14,261,2,107,11,125,6,299,43,124,12,13,280,230,274,27,25,95,260,149,29,161,76,23,115,287,67,200
#define MAX_MAPTIME 250
#define MAX_RESTART_TIME 10000
#define MAX_MAPUPDATE_TIME 1450
#define MAX_SHOW_CP_TIME 1000
#define MAX_END_TIME 60000
#define MAX_BALANCERUPDATE_TIME 6000
#define MAX_MAP_FILES 19
#define SCM SendClientMessage
#define SCMTA SendClientMessageToAll
#define Grey 0xC0C0C0FF // Defining the color 'Grey'
// Reaction Test Script
#define Loop(%0,%1) for(new %0 = 0; %0 != %1; %0++)
#define PURPLE 0xAFAFAFAA // Don't care this is Grey
#define GREEN 0x33CCFFAA // Don't care this is Light Blue
#define TIME 180000 //180000
// Reaction Test Script
new String[128], Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS], vWorld[MAX_PLAYERS], Inter[MAX_PLAYERS];
new IsSpecing[MAX_PLAYERS], Name[MAX_PLAYER_NAME], IsBeingSpeced[MAX_PLAYERS],spectatorid[MAX_PLAYERS];
#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define PATH "/ZMA/Users/%s.ini"
#define NAME ".:|| ZOMBIE APOCALYPSE ||:. New Classes!"
#define SCRIPT "v0.3"
#define SCRIPTER "Fahadking07"
#define SITE "Ux-Gaming.Net"
#define chat "{FFFFFF}»"
#define PLAYER_MUTE_TIME_MINUTES (2)
#define DIALOG_REGISTER 0
#define DIALOG_LOGIN 1
#define DIALOG_RADIO 2
#define DIALOG_KICK 3
#define DIALOG_TOP 4
#define DIALOG_WARN 5
#define DIALOG_BANNED 6
#define DIALOG_CMDS 7
#define DIALOG_HELP 8
#define DIALOG_HOWTOXP 9
#define DIALOG_ACMDS 10
#define DIALOG_RULES 11
#define DIALOG_CLASS 12
#define DIALOG_CLASS2 13
#define DIALOG_CLASS_2 14
#define DIALOG_CLASS_2_2 15
#define DIALOG_CLASS_3 16
#define DIALOG_CLASS_3_3 17
#define DIALOG_ADMINS 18
#define DIALOG_VIPS 19
#define DIALOG_REPORT 20
#define DIALOG_REPORT_2 21
#define DIALOG_SHOUT 22
#define DIALOG_VIPINFO 23
#define DIALOG_VIP 24
#define DIALOG_VIP_CLASS 25
#define DIALOG_COINS 26
#define DIALOG_BUY_WEAPONS 27
#define DIALOG_BUY_CLASSES 28
#define DIALOG_XP 30
#define DIALOG_RADIO_1 31
#define TEAM_ZOMBIE 0
#define TEAM_HUMAN 1
#define ENDCHAT_01 0
#define COLOR_HUMAN 0x33CCFFAA
#define COLOR_ZOMBIE 0x9ACD3244
#define COLOR_ADUTY 0xFF0000AA
#define COLOR_GREY 0xAFAFAFAA
#define ROSA 0xFF66FFAA
#define BLU_CHIARO 0x00BFFFAA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_LIME 0x10F441AA
#define COLOR_MAGENTA 0xFF00FFFF
#define COLOR_NAVY 0x000080AA
#define COLOR_AQUA 0xFF000000
#define COLOR_CRIMSON 0xDC143CAA
#define COLOR_FLBLUE 0x6495EDAA
#define COLOR_BISQUE 0xFFE4C4AA
#define COLOR_BLACK 0x000000AA
#define COLOR_CHARTREUSE 0x7FFF00AA
#define COLOR_BROWN 0xA52A2AAA
#define COLOR_CORAL 0xFF7F50AA
#define COLOR_GOLD 0xB8860BAA
#define COLOR_GREENYELLOW 0xADFF2FAA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_IVORY 0xFFFF82AA
#define COLOR_LAWNGREEN 0x7CFC00AA
#define COLOR_SEAGREEN 0x20B2AAAA
#define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
#define COLOR_MIDNIGHTBLUE 0X191970AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OLIVE 0x808000AA
#define COLOR_ORANGERED 0xFF4500AA
#define COLOR_PINK 0xFFC0CBAA // - Light light pink
#define COLOR_SPRINGGREEN 0x00FF7FAA
#define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
#define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
#define COLOR_MEDIUMAQUA 0x83BFBFAA
#define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
// Human Classes (New Classes were ADDED)
#define CIVILIAN 1501
#define POLICEMAN 1502
#define MEDIC 1503
#define SCOUT 1504
#define HEAVYMEDIC 1505
#define FARMER 1506
#define ENGINEER 1507
#define SWAT 1508
#define HEAVYSHOTGUN 1509
#define ADVANCEDMEDIC 1510
#define ADVANCEDENGINEER 1511
#define FEDERALAGENT 1512
#define KICKBACK 1513
#define ADVANCEDSCOUT 1514
#define COWBOY 1515
#define ASSASSIN 1516
#define TRAPMASTER 1517
#define VIPENGINEER 1518
#define VIPMEDIC 1519
#define VIPSCOUT 1520
#define E_ENGINEER 1521
#define SOLDIER 1522
#define DOCTOR 1523
#define FBI 1524
#define SCIENTIST 1525
#define EXPERIENCEDSCOUT 1526
#define PIMP 1527
#define WEAPONSDEALER 1528
#define SMOKEUP 1529
#define SHOTGUNSPECIAL 1530
#define BOXER 1231
#define BOMBER 1232
#define MASTER 1233
#define GHOST 1234
#define BUDDY 1235
#define AKICK 1236
#define TECG 1237
#define BULL 1238
#define HITMAN 1239
// Zombie Classes (New classes)
#define STANDARDZOMBIE 2501
#define MUTATEDZOMBIE 2502
#define FASTZOMBIE 2503
#define REAPERZOMBIE 2504
#define WITCHZOMBIE 2505
#define BOOMERZOMBIE 2506
#define STOMPERZOMBIE 2507
#define SCREAMERZOMBIE 2508
#define FIREBREATHER 2509
#define ADVANCEDMUTATED 2510
#define HEAVYSCREAMER 2511
#define FLESHEATER 2512
#define ADVANCEDWITCH 2513
#define ADVANCEDBOOMER 2514
#define NEMESIS 2515
#define ADVSTOMPER 2516
#define ADVSCREAMER 2517
#define HZOMBIE 2518
#define SLENDER 2519
#define KZOM 2520
#define GZOM 2521
#define DSNIPE 2522
#define COL_WHITE "{FFFFFF}"
#define COL_GREY "{C3C3C3}"
#define COL_GREEN "{37DB45}"
#define COL_RED "{FF3333}"
#define COL_YELLOW "{F3FF02}"
#define COL_ORANGE "{F9B857}"
#define COL_BLUE "{0049FF}"
#define COL_PINK "{FF00EA}"
#define COL_LIGHTBLUE "{00C0FF}"
#define COL_LGREEN "{C9FFAB}"
forward NoSpawnKill(playerid);
// Variables
new time;
new mapvar;
new balvar;
new mapid;
new gateobj;
new playerOnline;
new playersAliveCount;
new DocShield;
new Trap;
new meatDrops[MAX_PLAYERS];
new ammoDrops[MAX_PLAYERS];
new LastMapStarted = -1;
new PlayerPressedJump[MAX_PLAYERS];
new playedtimer[MAX_PLAYERS];
new team[MAX_PLAYERS];
new c4Obj[MAX_PLAYERS];
new smokemachine[MAX_PLAYERS];
new PlayerShotPlayer[MAX_PLAYERS][MAX_PLAYERS];
new Text:EventText;
new Text:CurrentMap;
new Text:remadeText;
new Text:remadeText2;
new Text:AliveInfo;
new Text:AliveInfo2;
new Text:ChatMsg;
new Text:TimeLeft;
new Text:XP;
new Text:Infected[MAX_PLAYERS];
new Text:iKilled[MAX_PLAYERS];
new Text:myXP[MAX_PLAYERS];
new Text:ServerIntroOne[MAX_PLAYERS];
new Text:ServerIntroTwo[MAX_PLAYERS];
new shoutstring[256];
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw7;
new Text:Textdraw8;
new Text:Textdraw9;
enum mapinfo
{
MapName[128],
FSMapName[128],
Float:HumanSpawnX,
Float:HumanSpawnY,
Float:HumanSpawnZ,
Float:HumanSpawn2X,
Float:HumanSpawn2Y,
Float:HumanSpawn2Z,
Float:ZombieSpawnX,
Float:ZombieSpawnY,
Float:ZombieSpawnZ,
Float:GateX,
Float:GateY,
Float:GateZ,
Float:GaterX,
Float:GaterY,
Float:GaterZ,
Float:CPx,
Float:CPy,
Float:CPz,
GateID,
MoveGate,
AllowWater,
Interior,
Weather,
Time,
EvacType,
IsStarted,
XPType,
};
new Map[mapinfo];
enum playerinfo
{
pPassword[129],
pXP,
ReadCmds,
pKills,
pDeaths,
pRank,
pEvac,
pAdminLevel,
pAdminDuty,
pBanned,
gLeader,
gMember,
pVipLevel,
pHour,
pMin,
pSec,
pMapsPlayed,
pCoins,
pLogged,
pWarnings,
FirstPS,
pPM,
IsPlayerMuted,
Killstreak,
pHumanClass,
pZombieClass,
IsPlayerInfected,
IsPlayerInfectedTimer,
Boxes,
BoxesAdvanced,
SkinChanges,
ArmourChanges,
C4,
traps,
pVipKickBack,
pVipFlash,
pVipBoxes,
pLadders,
pFakeKills,
pAmmoBoxes,
pKickBackCoin,
pDamageShotgunCoin,
pDamageDeagleCoin,
pDamageMP5Coin,
pDoctorShield,
pRenamed,
pTrapMasterTrap,
pScientistCure,
Frozen
};
new pInfo[MAX_PLAYERS][playerinfo];
enum aname
{
HighJumpScout,
HighJumpZombie,
StomperPushing,
WitchAttack,
ScreamerZombieAb,
ScreamerZombieAb2,
InfectionNormal,
InfectionMutated,
ShoutCooldown,
HealCoolDown,
FireBreatherCooldown,
NemesisCooldown,
AdvancedMutatedCooldown,
WitchAttack2,
InfectionFleshEater
}
new Abilitys[MAX_PLAYERS][aname];
new randomMessages[][] =
{
""chat""COL_BLUE" [Info] "COL_WHITE"Earn XP by killing the enemy team or using your ability and donating for double XP!",
""chat""COL_BLUE" [Help] "COL_WHITE"Are you lost are you new? try out the command '/help' and /vinfo",
""chat""COL_BLUE" [Help] "COL_WHITE"Got bugged? Cant move a single cm? try out /rbug",
//""chat""COL_BLUE" [Wass up] "COL_WHITE"Good news We are offering free vip level 1 now!! For more info type /vhelp and /vinfo",
""chat""COL_RED" [Note] "COL_WHITE"Remember to report hackers and rule breakers with /report <id> <reason>",
""chat""COL_BLUE" [Help] "COL_WHITE"Remember to read the rules to prevent you from getting banned /rules",
""chat""COL_BLUE" [Info] "COL_WHITE"Remember to use /ss command to save your stats to avoid losing XP",
""chat""COL_BLUE" [Help] "COL_WHITE"Got bugged? Cant move a single cm? try out /rbug",
//""chat""COL_BLUE" [Wass up] "COL_WHITE"Good news We are offering free vip level 1 now!! For more info type /vhelp and /vinfo",
""chat""COL_BLUE" [Help] "COL_WHITE"Having problem with objects ? Try out /robj to remove them (only for humans)",
""chat""COL_RED" [Note] "COL_WHITE"Do NOT attack your team mates or you will be punished!",
""chat""COL_RED" [Note] "COL_WHITE"Report hackers and rule breakers with /report <id> <reason> , DO NOT SAY IT IN MAIN CHAT",
//""chat""COL_BLUE" [Wass up] "COL_WHITE"Good news We are offering free vip level 1 now!! For more info type /vhelp",
""chat""COL_LGREEN" [Updates] "COL_WHITE"Wanna know whats new? Why not? Try out /updates",
""chat""COL_BLUE" [Info] "COL_WHITE"Always respect other players if you want to be hero in front of them",
""chat""COL_BLUE" [Help] "COL_WHITE"Need help? Try out /help",
""chat""COL_BLUE" [Help] "COL_WHITE"Having problem with objects ? Try out /robj to remove them (only for humans)",
//""chat""COL_BLUE" [Wass up] "COL_WHITE"Good news We are offering free vip level 1 now!! For more info type /vhelp and /vinfo",
""chat""COL_ORANGE" [Help Us] "COL_WHITE"If you find a bug please report it on our forum "COL_ORANGE" Ux-Gaming.Net",
""chat""COL_LGREEN" [BUY] "COL_WHITE"You can buy weapons, classes, objects,etc "COL_WHITE" ' /buy ' command",
""chat""COL_BLUE" [Help] "COL_WHITE"Got bugged? Cant move a single cm? try out /rbug",
""chat""COL_YELLOW" [Whats New] "COL_WHITE"We did an aditional class menu "COL_WHITE" ' /class2 ' "COL_WHITE" make sure you check it out!",
""chat""COL_BLUE" [Help] "COL_WHITE"Having problem with objects ? Try out /robj to remove them (only for humans)",
//""chat""COL_BLUE" [Whats up] "COL_WHITE"Good news We are offering free vip level 1 now!! For more info type /vhelp",
""chat""COL_RED" [Note] "COL_WHITE"Do NOT spawn kill zombies, else you will be punished and even banned if you keep doing it!",
""chat""COL_BLUE" [Info] "COL_WHITE"Earn xp and unlock new classes. Try out /class2!!",
""chat""COL_BLUE" [Help] "COL_WHITE"Got bugged? Cant move a single cm? try out /rbug",
""chat""COL_ORANGE" [Help Us] "COL_WHITE"We are looking for scripters and mappers! Please Apply in our forum: Ux-Gaming.Net",
""chat""COL_BLUE" [Help] "COL_WHITE"Need help? try out /help or ask any online admin",
//""chat""COL_BLUE" [Wass up] "COL_WHITE"Good news We are offering free vip level 1 now!! For more info type /vhelp and /vinfo",
""chat""COL_YELLOW" [Note] "COL_WHITE"Remember to use /ss command to save your stats to avoid losing XP"
};
forward load_Map_basic(Mapid, name[], value[]);
forward LoadUser_data(playerid,name[],value[]);
forward TimeOnServer(playerid);
forward Float:GetDistanceBetweenPlayers(p1,p2);
forward GetClosestPlayer(p1);
forward RandomZombie();
main()
{
print("\n----------------------------------");
print(""NAME" Loaded with version of "SCRIPT"");
print("----------------------------------\n");
}
function StartMap()
{
ClearChat();
foreach(Player,i)
{
SetCameraBehindPlayer(i);
ClearAnimations(i);
HumanSetup(i);
SpawnPlayer(i);
CurePlayer(i);
SetPlayerDrunkLevel(i,0);
DisablePlayerCheckpoint(i);
pInfo[i][Boxes] = 2;
pInfo[i][BoxesAdvanced] = 10;
pInfo[i][SkinChanges] = 2;
pInfo[i][ArmourChanges] = 2;
pInfo[i][pVipBoxes] = 35;
pInfo[i][pLadders] = 2;
pInfo[i][pFakeKills] = 0;
pInfo[i][pAmmoBoxes] = 10;
pInfo[i][C4] = 4;
pInfo[i][pTrapMasterTrap] = 1;
pInfo[i][pScientistCure] = 1;
pInfo[i][pDoctorShield] = 1;
pInfo[i][pMapsPlayed]++;
TextDrawHideForPlayer(i, ServerIntroOne[i]);
TextDrawHideForPlayer(i, ServerIntroTwo[i]);
DestroyPickup(meatDrops[i]);
DestroyPickup(ammoDrops[i]);
DestroyObject(DocShield);
DestroyObject(Trap);
TogglePlayerControllable(i,1);
}
time = MAX_MAPTIME;
SetWeather(Map[Weather]);
SetWorldTime(Map[Time]);
UpdateMapName();
SendClientMessageToAll(-1,""chat""COL_LGREEN" [Clear]"COL_WHITE" Chat Cleared "COL_YELLOW"[Reason: Next Map]");
SendClientMessageToAll(-1,""chat""COL_RED" [Info]"COL_WHITE" These maps are created by 07 Mappers");
SetTimer("RandomZombie",1000,false);
gateobj = CreateObject(Map[GateID],Map[GateX],Map[GateY],Map[GateZ],Map[GaterX],Map[GaterY],Map[GaterZ],500.0);
mapvar = SetTimer("OnMapUpdate",MAX_MAPUPDATE_TIME,true);
balvar = SetTimer("OnMapBalance",MAX_BALANCERUPDATE_TIME,true);
return 1;
}
function EndMap()
{
ClearObjects();
DestroyAllVehicle();
UnloadFilterScript(Map[FSMapName]);
LoadMap(LoadNewMap());
LoadFilterScript(Map[FSMapName]);
SetTimer("StartMap",MAX_RESTART_TIME,false);
GameTextForAll("~n~~n~~n~~n~~n~~g~Loading~w~ next map",3500,5);
foreach(Player,i)
{
ChangeCameraView(i);
TogglePlayerControllable(i,0);
TextDrawShowForPlayer(i, ServerIntroOne[i]);
TextDrawShowForPlayer(i, ServerIntroTwo[i]);
if(pInfo[i][pAdminDuty] == 1)
{
pInfo[i][pAdminDuty] = 0;
}
}
SendClientMessageToAll(-1,""chat""COL_YELLOW" Creating Map Objects. Plz wait...");
return 1;
}
function OnMapUpdate()
{
time -= 1;
new str[64];
format(str,sizeof(str),"~r~%d",time);
TextDrawSetString(TimeLeft,str);
if(time <= 0) TextDrawSetString(TimeLeft,"~y~Evac"),KillTimer(mapvar),KillTimer(balvar),SetTimer("ShowCheckpoint",MAX_SHOW_CP_TIME,false);
return 1;
}
function ShowCheckpoint()
{
CreateEvacMaps();
MoveObject(gateobj,Map[GateX],Map[GateY],Map[MoveGate],3.0);
foreach(Player,i) SetPlayerCheckpoint(i,Map[CPx],Map[CPy],Map[CPz],6.0);
SetTimer("EndMap",MAX_END_TIME,false);
return 1;
}
function OnMapBalance()
{
if(playerOnline >= 2)
{
if(GetTeamPlayersAlive(TEAM_HUMAN) == 0)
{
KillTimer(balvar);
KillTimer(mapvar);
TextDrawSetString(TimeLeft,"~r~Zombies Rocked!!!");
SetTimer("EndMap",4000,false); // Cannot use MAX_END_TIME Because of MAX_END_TIME is set to 1 minute not 4 seconds *NOTE TO ME*
foreach(Player,i)
{
if(team[i] == TEAM_ZOMBIE)
{
pInfo[i][pXP] += 30;
GivePlayerXP(i,30);
}
}
}
}
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
if(team[playerid] == TEAM_HUMAN)
{
new string[256];
if(Map[EvacType] == 1)
{
SetPlayerInterior(playerid,0);
SetPlayerPos(playerid,-1408.2051,-970.8841,198.9738);
format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to evacuation point and has received 1 coin!",PlayerName(playerid));
SendClientMessageToAll(-1,string);
DisablePlayerCheckpoint(playerid);
CurePlayer(playerid);
GivePlayerXP(playerid,50);
pInfo[playerid][pEvac]++;
pInfo[playerid][pCoins]++;
SetPlayerColor(playerid,COLOR_YELLOW);
}
if(Map[EvacType] == 2)
{
SetPlayerPos(playerid,3024.4983,447.9744,14.7813);
SetPlayerInterior(playerid,0);
format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to the water evacuation point and has received 1 coin!",PlayerName(playerid));
SendClientMessageToAll(-1,string);
DisablePlayerCheckpoint(playerid);
CurePlayer(playerid);
GivePlayerXP(playerid,50);
pInfo[playerid][pEvac]++;
pInfo[playerid][pCoins]++;
SetPlayerColor(playerid,COLOR_YELLOW);
}
if(Map[EvacType] == 3)
{
SetPlayerPos(playerid,285.5,2510.30004882817,121.5);
SetPlayerInterior(playerid,0);
format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to the helicopter evacuation point and has received 1 coin!",PlayerName(playerid));
SendClientMessageToAll(-1,string);
DisablePlayerCheckpoint(playerid);
CurePlayer(playerid);
GivePlayerXP(playerid,50);
pInfo[playerid][pEvac]++;
pInfo[playerid][pCoins]++;
SetPlayerColor(playerid,COLOR_YELLOW);
}
if(Map[EvacType] == 4)
{
SetPlayerPos(playerid,1456.3000488281,-1126,427.10000610352);///By Fahad
SetPlayerInterior(playerid,0);
format(string,sizeof(string), ""chat""COL_LIGHTBLUE" %s made it to the Parachute evacuation point and has received 1 coin!",PlayerName(playerid));
SendClientMessageToAll(-1,string);
DisablePlayerCheckpoint(playerid);
CurePlayer(playerid);
GivePlayerXP(playerid,50);
pInfo[playerid][pEvac]++;
pInfo[playerid][pCoins]++;
GivePlayerWeapon(playerid,46,1);
SetPlayerColor(playerid,COLOR_YELLOW);
}
}
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
new string[256];
DestroyPickup(meatDrops[playerid]);
if(team[playerid] == TEAM_ZOMBIE)
{
if(pInfo[playerid][pZombieClass] == BOOMERZOMBIE) { SetPlayerHealth(playerid,50); }
else { SetPlayerHealth(playerid,100.0); }
}
if(team[playerid] == TEAM_HUMAN)
{
if(pInfo[playerid][pHumanClass] == ENGINEER || pInfo[playerid][pHumanClass] == ADVANCEDENGINEER || pInfo[playerid][pHumanClass] == VIPENGINEER || pInfo[playerid][pHumanClass] == E_ENGINEER || pInfo[playerid][pHumanClass] == TRAPMASTER || pInfo[playerid][pHumanClass] == BOMBER)
{
switch(pInfo[playerid][pHumanClass])
{
case ENGINEER: pInfo[playerid][Boxes]++,GameTextForPlayer(playerid,"~g~Found~w~: 1 Box",4000,5),DestroyPickup(meatDrops[playerid]);
case ADVANCEDENGINEER: pInfo[playerid][BoxesAdvanced] += 2,GameTextForPlayer(playerid,"~g~Found~w~: 2 Boxes",4000,5),DestroyPickup(meatDrops[playerid]);
case VIPENGINEER: pInfo[playerid][pVipBoxes] += 3,GameTextForPlayer(playerid,"~g~Found~w~: 3 Boxes",4000,5),DestroyPickup(meatDrops[playerid]);
case E_ENGINEER: pInfo[playerid][pLadders] += 1,GameTextForPlayer(playerid,"~g~Found~w~: 1 Ladders",4000,5),DestroyPickup(meatDrops[playerid]);
case TRAPMASTER: pInfo[playerid][pTrapMasterTrap] += 1,GameTextForPlayer(playerid,"~g~Found~w~: 1 trap",4000,5),DestroyPickup(meatDrops[playerid]);
case BOMBER: pInfo[playerid][pXP] += 10,GameTextForPlayer(playerid,"~g~Found~w~: 10 xp",4000,5),DestroyPickup(meatDrops[playerid]);
}
}
else
{
if(pInfo[playerid][IsPlayerInfected] == 0)
{
new slot, weap, ammo;
for ( slot = 0; slot < 14; slot++ )
{
GetPlayerWeaponData(playerid,slot,weap,ammo);
if(IsValidWeapon(weap))
{
new randomselect = random(2);
switch(randomselect)
{
case 0:
{
new randomammo = random(50);
GivePlayerWeapon(playerid,weap,randomammo);
format(string,sizeof(string),"~g~Found~w~: %d ammo",randomammo);
GameTextForPlayer(playerid,string,4000,5);
DestroyPickup(meatDrops[playerid]);
}
case 1:
{
new randomxp = random(35);
format(string,sizeof(string),"~g~Found~w~: %d XP",randomxp);
GameTextForPlayer(playerid,string,4000,5);
pInfo[playerid][pXP] += randomxp;
DestroyPickup(meatDrops[playerid]);
}
}
}
}
}
}
}
return 1;
}
public OnGameModeInit()
{
UsePlayerPedAnims();
SetGameModeText("Zombie Survival "SCRIPT"");
SendRconCommand("weburl "SITE"");
SetTimer("PayDay", 1200000, true);
AddPlayerClass(181, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AllowInteriorWeapons(1);
DisableInteriorEnterExits();
SetTimer("RandomMessages",50000,true);
SetTimer("OnServerUpdate", 1000, true);
SetTeamCount(2);
Map[IsStarted] = 0;
Map[XPType] = 0;
mapid = 0;
SetWorldTime(0);
SetWeather(12);
DefaultTextdraws();
SetTimer("HG",1000,1);
return 1;
}
function OnServerUpdate()
{
foreach(Player, i)
{
if(GetPlayerMoney(i) >= 1) return ResetPlayerMoney(i);
SetPlayerScore(i,pInfo[i][pXP]);
UpdateXPTextdraw(i);
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
{
new Admin[24] = "Anti-cheat";
new reason3[128] = "Jetpack";
BanPlayer(i,reason3,Admin);
}
new Float:armor;
GetPlayerArmour(i,armor);
if(armor >= 96)
{
new Admin[24] = "Anti-cheat";
new reason3[128] = "Armour Hack (Exceeded over 96f)";
BanPlayer(i,reason3,Admin);
}
if(team[i] == TEAM_ZOMBIE)
{
switch(GetPlayerWeapon(i))
{
case 2,3,4,5,6,7,8,10,11,12,13,14,15,16,17,18,22,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,41,42,43,44,45,46:
{
ResetPlayerWeapons(i);
GivePlayerWeapon(i,9,1);
}
}
}
if(team[i] == TEAM_ZOMBIE)
{
if(armor > 0.0)
{
SetPlayerArmour(i,0.0);
}
}
if(IsPlayerInAnyVehicle(i))
{
if(pInfo[i][pAdminLevel] == 0)
{
Kick(i);
}
}
if(pInfo[i][pVipFlash] == 1)
{
switch(random(5))
{
case 0: SetPlayerColor(i,COLOR_BLUE);
case 1: SetPlayerColor(i,COLOR_YELLOW);
case 2: SetPlayerColor(i,COLOR_RED);
case 3: SetPlayerColor(i,COLOR_PINK);
case 4: SetPlayerColor(i,COLOR_ORANGE);
}
}
DoctorShield();
TrapMasterTrap();
UpdateAliveInfo();
UpdateAliveInfo2();
}
return 1;
}
public OnGameModeExit()
{
TextDrawHideForAll(TimeLeft);
TextDrawDestroy(TimeLeft);
TextDrawDestroy(Textdraw0);
TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw4);
TextDrawHideForAll(Textdraw4);
TextDrawDestroy(Textdraw5);
TextDrawHideForAll(Textdraw5);
TextDrawDestroy(Textdraw7);
TextDrawHideForAll(Textdraw7);
TextDrawDestroy(Textdraw8);
TextDrawHideForAll(Textdraw8);
TextDrawDestroy(Textdraw9);
TextDrawHideForAll(Textdraw9);
TextDrawDestroy(Textdraw1);
TextDrawDestroy(Textdraw2);
TextDrawHideForAll(Textdraw2);
TextDrawHideForAll(Textdraw1);
TextDrawHideForAll(AliveInfo);
TextDrawDestroy(AliveInfo);
TextDrawHideForAll(AliveInfo2);
TextDrawDestroy(AliveInfo2);
TextDrawHideForAll(remadeText);
TextDrawDestroy(remadeText);
TextDrawHideForAll(remadeText2);
TextDrawDestroy(remadeText2);
TextDrawHideForAll(CurrentMap);
TextDrawHideForAll(ChatMsg);
TextDrawDestroy(CurrentMap);
TextDrawHideForAll(XP);
TextDrawDestroy(XP);
TextDrawHideForAll(EventText);
TextDrawDestroy(EventText);
for(new i; i < MAX_PLAYERS; i ++)
{
TextDrawHideForAll(Infected[i]);
TextDrawHideForAll(iKilled[i]);
TextDrawDestroy(iKilled[i]);
TextDrawHideForAll(myXP[i]);
TextDrawDestroy(myXP[i]);
TextDrawHideForAll(ServerIntroOne[i]);
TextDrawDestroy(ServerIntroOne[i]);
TextDrawHideForAll(ServerIntroTwo[i]);
TextDrawDestroy(ServerIntroTwo[i]);
}
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid, 661.6200,-820.1381,86.5092);
SetPlayerFacingAngle(playerid, 227.2857);
SetPlayerCameraLookAt(playerid, 661.6200,-820.1381,86.5092);
SetPlayerCameraPos(playerid, 673.1569,-826.9614,80.5580);
CreateObject(2780,658.29999,-814.70001,85.6,0.0,0.0,0.0);
RemoveBuildingForPlayer(playerid, 705, 658.20313, -818.14062, 85.13281, 0.0);
SetPlayerWeather(playerid, 7);
SetPlayerTime(playerid, 0, 0);
if(classid == 0)
{
SetPlayerTeam(playerid,TEAM_ZOMBIE);
team[playerid] = TEAM_ZOMBIE;
}
return 1;
}
public OnPlayerRequestSpawn(playerid) //7:1
{
if(pInfo[playerid][pLogged] == 0 && pInfo[playerid][pAdminLevel] >= 1)
{
SendClientMessage(playerid,COLOR_RED,"You must be logged in.");
Kick(playerid);
}
if(pInfo[playerid][pLogged] == 0)
{
new string[128];
GameTextForPlayer(playerid,"~r~YOU MUST LOGIN TO PLAY",1000,4);
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
format(string,sizeof(string),""chat" Welcome back %s",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,""chat" Our system have detected your username registered please login","Login","Quit");
}
else
{
format(string,sizeof(string),""chat" Hello %s to "NAME"",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,string,""chat" Welcome to "NAME" you'll be forced to register please click register!","Register","Quit");
}
}
return 1;
}
public OnPlayerConnect(playerid)
{
if(pInfo[playerid][pAdminDuty] == 1)
{
pInfo[playerid][pAdminDuty] = 0;
}
PlayerPressedJump[playerid] = 0;
playerOnline++;
ResetVars(playerid);
ConnectVars(playerid);
new string[128];
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_data", .bExtra = true, .extra = playerid);
format(string,sizeof(string),""chat" Welcome back %s",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,string,""chat" Our system have detected your username registered please login","Login","Quit");
}
else
{
format(string,sizeof(string),""chat" Hello %s",PlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_PASSWORD,string,""chat" Welcome to "NAME" you'll be forced to register please click register!","Register","Quit");
}
new c2string[128], playerip[16];
GetPlayerIp(playerid, playerip, sizeof(playerip));
format(c2string, sizeof(c2string), ""chat" Player %s[%d] has joined the server "COL_RED"(IP: %s)", PlayerName(playerid), playerid, playerip);
SendMessageToAllAdmins(c2string, -1);
if(pInfo[playerid][pAdminLevel] <= 0)
{
new c2string2[128];
format(c2string2, sizeof(c2string2), ""chat"Player %s[%d] has joined the server", PlayerName(playerid), playerid);
SendClientMessageToAll(COLOR_WHITE, c2string2);
}
if(pInfo[playerid][pBanned] >= 1)
{
new constring[128];
GetPlayerIp(playerid, playerip, sizeof(playerip));
format(constring, sizeof(constring), ""chat" %s You are banned from the server, please make an unban appeal to www.SA-ZM.com", PlayerName(playerid));
SendClientMessage(playerid,-1,constring);
Kick(playerid);
}
return 1;
}
forward PressJump(playerid);
public PressJump(playerid)
{
PlayerPressedJump[playerid] = 0; // Reset the variable
ClearAnimations(playerid);
return 1;
}
forward PayDay();
public PayDay()
{
foreach(Player, i)
{
GivePlayerXP(i, 1000);
GameTextForPlayer(i, "it's ~r~PayDay!!! ~w~you received ~r~1000xp ~w~and ~r~Enjoy", 2000, 5);
}
return 1;
}
forward PressJumpReset(playerid);
public PressJumpReset(playerid)
{
PlayerPressedJump[playerid] = 0; // Reset the variable
return 1;
}
forward HG();
public HG()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i, 7, Map[ZombieSpawnX], Map[ZombieSpawnY], Map[ZombieSpawnZ]))
{
if(GetPlayerTeam(i) == TEAM_ZOMBIE) return 0;
else
{
GameTextForPlayer(i,"~W~Be careful you are in\n~r~Zombie Spawn Area!!", 1000, 5);
}
}
}
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new constring[128];
format(constring, sizeof(constring), ""chat""COL_ORANGE"[Left] "COL_WHITE"%s has left the server :(", PlayerName(playerid));
SendClientMessageToAll(-1,constring);
if(pInfo[playerid][pLogged] == 1) { SaveStats(playerid); } else return 0;
ResetVars(playerid);
playersAliveCount--;
playerOnline--;
if(playerOnline == 0) return SendRconCommand("mapname > Loading <"),KillTimer(mapvar),KillTimer(balvar),Map[IsStarted] = 0;
return 1;
}
public OnPlayerSpawn(playerid)
{
if(IsSpecing[playerid] == 1)
{
SetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);// Remember earlier we stored the positions in these variables, now we're gonna get them from the variables.
SetPlayerInterior(playerid,Inter[playerid]);//Setting the player's interior to when they typed '/spec'
SetPlayerVirtualWorld(playerid,vWorld[playerid]);//Setting the player's virtual world to when they typed '/spec'
IsSpecing[playerid] = 0;//Just saying you're free to use '/spec' again YAY :D
IsBeingSpeced[spectatorid[playerid]] = 0;//Just saying that the player who was being spectated, is not free from your stalking >:D7
SetWeather(Map[Weather]);
SetWorldTime(Map[Time]);
if(team[playerid] == TEAM_HUMAN)
{
HumanSetup(playerid);
SpawnPlayer(playerid);
}
else if(team[playerid] == TEAM_ZOMBIE)
{
ZombieSetup(playerid);
SpawnPlayer(playerid);
}
}
else
{