-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdbz.pwn
6533 lines (6313 loc) · 293 KB
/
dbz.pwn
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
/*
############ ############\ ############ ##################\ ### DB
###\\\\\\\\\###\ ###\\\\\\\##\ ###\\\\\\\\\###\ ###\ ###\ ###\ ###\ DB
###\ ###\ #########\ ###### ###\ ###\ ###\ ###\ ###\ \\\ DB
###\ ###\ ###\\\\\\\##\ \\\\\\ ###\ ###\ ###\ ###\ ###\ ### DB
########### \\\ ############\ ########### \\\ ###\ ###\ ###\ ###\ DB
\\\\\\\\\\\\\ \\\\\\\\\\\\ \\\\\\\\\\\\\ \\\ \\\ \\\ \\\ DB
*/
/////// Updated to 0.3z by Sasino97, but still needs a lot of translation
/////// Edit this as you want but please keep my name in it :(
//-=-=-=-=-=INCLUDES=-=-=-=-=-
#include a_samp.inc //Credits to SA-MP Development Team
#include <YSI\y_ini>
#include progress.inc //Credits to Toribio
#include <Saiyans>
#include <videl>
#include <zcmd>
#include <TimeStampToDate>
#include <sscanf2>
#include <foreach>
//-=-=-=-=-=DEFINES=-=-=-=-=-
#define SCM SendClientMessage
#define website "1v1-dm.webs.com"
#define support_email "dm1vs1@outlook.com"
#define TOP_ADMIN_LEVEL 10
#define Admin_list 2015
#define VIP_list 2016
//---Define the colors----//
#define COLOR_RED 0xFF0000AA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_BLUE 0x0000BB00
#define COLOR_BLACK 0x000000FF
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_ADMIN 0x24FF0AB9
#define COLOR_ALPHA 0xABCDEF02
#define COLOR_PINK 0xFF66FFAA
#define COLOR_VIOLET 0x9955DEEE
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_KICK/BAN 0xFF00FFAA
#define COLOR_HOTPINK 0xFF69B4FF
#define COLOR_BROWN 0xA52A2AFF
#define COLOR_CYAN 0x00FFFFFF
#define COLOR_MAROON 0x800000FF
//----------Sounds---------//
#define SOUND_CEILING_VENT_LAND 1002
#define SOUND_BONNET_DENT 1009
#define SOUND_CRANE_MOVE_START 1020
#define SOUND_CRANE_MOVE_STOP 1021
#define SOUND_CRANE_EXIT 1022
#define SOUND_WHEEL_OF_FORTUNE_CLACKER 1027
#define SOUND_SHUTTER_DOOR_START 1035
#define SOUND_SHUTTER_DOOR_STOP 1036
#define SOUND_PARACHUTE_OPEN 1039
#define SOUND_AMMUNATION_BUY_WEAPON 1052
#define SOUND_AMMUNATION_BUY_WEAPON_DENIED 1053
#define SOUND_SHOP_BUY 1054
#define SOUND_SHOP_BUY_DENIED 1055
#define SOUND_RACE_321 1056
#define SOUND_RACE_GO 1057
#define SOUND_PART_MISSION_COMPLETE 1058
#define SOUND_GOGO_TRACK_START 1062 //music
#define SOUND_GOGO_TRACK_STOP 1063 //music
#define SOUND_DUAL_TRACK_START 1068 //music
#define SOUND_DUAL_TRACK_STOP 1069 //music
#define SOUND_BEE_TRACK_START 1076 //music
#define SOUND_BEE_TRACK_STOP 1077 //music
#define SOUND_ROULETTE_ADD_CASH 1083
#define SOUND_ROULETTE_REMOVE_CASH 1084
#define SOUND_ROULETTE_NO_CASH 1085
#define SOUND_BIKE_PACKER_CLUNK 1095
#define SOUND_AWARD_TRACK_START 1097 //music
#define SOUND_AWARD_TRACK_STOP 1098 //music
#define SOUND_MESH_GATE_OPEN_START 1100
#define SOUND_MESH_GATE_OPEN_STOP 1101
#define SOUND_PUNCH_PED 1130
#define SOUND_AMMUNATION_GUN_COLLISION 1131
#define SOUND_CAMERA_SHOT 1132
#define SOUND_BUY_CAR_MOD 1133
#define SOUND_BUY_CAR_RESPRAY 1134
#define SOUND_BASEBALL_BAT_HIT_PED 1135
#define SOUND_STAMP_PED 1136
#define SOUND_CHECKPOINT_AMBER 1137
#define SOUND_CHECKPOINT_GREEN 1138
#define SOUND_CHECKPOINT_RED 1139
#define SOUND_CAR_SMASH_CAR 1140
#define SOUND_CAR_SMASH_GATE 1141
#define SOUND_OTB_TRACK_START 1142
#define SOUND_OTB_TRACK_STOP 1143
#define SOUND_PED_HIT_WATER_SPLASH 1144
#define SOUND_RESTAURANT_TRAY_COLLISION 1145
#define SOUND_SWEETS_HORN 1147
#define SOUND_MAGNET_VEHICLE_COLLISION 1148
#define SOUND_PROPERTY_PURCHASED 1149
#define SOUND_PICKUP_STANDARD 1150
#define SOUND_GARAGE_DOOR_START 1153
#define SOUND_GARAGE_DOOR_STOP 1154
#define SOUND_PED_COLLAPSE 1163
#define SOUND_SHUTTER_DOOR_SLOW_START 1165
#define SOUND_SHUTTER_DOOR_SLOW_STOP 1166
#define SOUND_RESTAURANT_CJ_PUKE 1169
#define SOUND_DRIVING_AWARD_TRACK_START 1183 //music
#define SOUND_DRIVING_AWARD_TRACK_STOP 1184
#define SOUND_BIKE_AWARD_TRACK_START 1185 //music
#define SOUND_BIKE_AWARD_TRACK_STOP 1186
#define SOUND_PILOT_AWARD_TRACK_START 1187 //music
#define SOUND_PILOT_AWARD_TRACK_STOP 1188
#define SOUND_SLAP 1190
//Define short characters names
#define GOKU0 124
#define GOKU1 247
#define GOKU2 100
#define GOKU3 248
#define VEGETA0 96
#define VEGETA1 291
#define VEGETAS 72
#define VEGETA2 147
#define TRUNKS0 217
#define TRUNKS1 101
#define TRUNKSS 97
#define GOHAN0 176
#define GOHAN1 177
#define GOHAN2 154
#define VEGEKU0 46
#define VEGEKU1 223
#define GOGETA 98
#define SATAN 241 // In american version it's name is "Hercule"
#define VIDEL 56
#define CRILIN 121
#define YAMCHA 204
#define TENSHINSHAN 81 // In american version it's name is "Tien"
#define GELO 1
#define Andriod16 181
#define Andriod17 128
#define Andriod18 91
#define Andriod19 29
//Define short names attacks
#define NORMAL_ATTACK_SCRIPT 0
#define KAMEHAMEHA 1
#define KAMEHAMEHA_FURIA 2
#define SUPER_KAMEHAMEHA 3
#define KAMEHAMEHA_MAX 4
#define CANNONE_ESPLOSIVO 5
#define BIG_BANG_ATTACK 6
#define LAMPO_FINALE 7
#define MASENKO 8
#define attack_BRUCIANTE 9
#define DISTRUTTORE_LETALE 10
#define ARTIGLIO_DEL_LUPO 11
#define TRIPLO_RAGGIO 12
#define RAGGIO_ENERGETICO 13
#define SFERE_ENERGETICHE 14
#define LANCIARAZZI 15
#define IL_CAMPIONE 16
#define GRAN_BOMBA_Ki 17
#define KAMEHAMEHA_FINALE 18
#define KAMEHAMEHA_BIG_BANG 19
#define SUPER_MASENKO 20
//Define battleground
#define BATTLEGROUND_Abandoned_Village 0
#define BATTLEGROUND_Tenkaichi_tournament 1
#define BATTLEGROUND_UNDERWATER 2
#define BATTLEGROUND_Skyscraper 3
#define BATTLEGROUND_BRIDGE 4
#define BATTLEGROUND_space_Training 5
#define BATTLEGROUND_AREA51 6
#define BATTLEGROUND_CASINO 7
#define BATTLEGROUND_SALONE 8
//Define interiors
#define INTERIOR_OUTSIDE 0
#define INTERIOR_SALONE 3
#define INTERIOR_prison 6
//Define renaming keys
#define TASTO_CLICK_SINISTRO 4
#define TASTO_CLICK_CENTRALE 512
#define TASTO_CLICK_DESTRO 128
#define TASTO_TAB 1
#define TASTO_C 2
#define TASTO_SPAZIO 8
#define TASTO_INVIO 16
#define TASTO_MAIUSC 32
#define TASTO_ALT 1024
#define TASTO_SU 131072
#define TASTO_GIU 262144
#define TASTO_DESTRA 65536
#define TASTO_SINISTRA 32768
//Define Admin Levels
#define GIOCATORE 0
#define Moderator 1
#define ADMINSECONDARIO 2
#define ADMIN 3
#define OWNER 4
//Define Dialogs
#define DIALOGUE_Rules 0
#define DIALOGUE_SPAWN 1
#define DIALOGUE_SHENRON 2
#define DIALOGUE_PERSONALIZE 3
#define DIALOGUE_attack 4
#define DIALOGUE_attack2 5
#define DIALOGUE_style 6
#define DIALOGUE_PIU_Ki 7
#define DIALOGUE_PIU_speed 8
#define DIALOGUE_PIU_HEALTH 9
#define DIALOGUE_Ki_SIZE 10
#define DIALOGUE_Ki_SIZE2 11
#define DIALOGUE_SAVE_MATCH 12
#define DIALOGUE_BETTING 13
#define DIALOGUE_BETTING2 14
#define DIALOGUE_KILL 15
#define DIALOGUE_SAVERE 16
//Define dialog text
#define TEXT_DIALOGUE_MENU "Change your fighting style\nChange your special attack\nChange your speed\nChange your max ki intensity\nChange your defense\nIncrease your ki effects\nDecrease your ki effects"
#define TEXT_DIALOGUE_attack1 "Kamehameha - 30 DP\nFurious Kamehameha - 40 DP\nSuper Kamehameha - 50 DP\nMaximum Intensity Kamehameha - 60 DP\nExplosive Cannon - 30 DP\nBig Bang Attack - 40 DP\nFinal Flash - 50 DP\nMasenko - 20 DP\nSuper Masenko - 40 DP\nBurning Attack - 30 DP\nMore..."
#define TEXT_DIALOGUE_attack2 "Finish Buster - 40 DP\nWolf Fang Fist - 45 DP\nTriple Ray - 45 DP\nEnergy Beam - 30 DP\nEnergy Sphere - 50 DP\nIncorporated Rocket Launcher - 50 DP\nThe Champion - 10 DP\nGreat Ki Bomb - 15 DP\nFinal Kamehameha - 80 DP\nBig Bang Kamehameha - 100 DP\n"
#define TEXT_DIALOGUE_speed "10 meters per press - 25 DP\n20 meters per press - 50 DP\n30 meters per press - 75 DP\n40 meters per press - 100 DP\n50 meters per press - 125 DP\n60 meters per press - 150 DP\n70 meters per press - 175 DP\n80 meters per press - 200 DP"
#define TEXT_DIALOGUE_style "Z warriors's style - 20 DP\nWeak warriors's style - 10 DP\nStrong cyborg's style - 25 DP\nWeak cyborg's style - 15 DP"
#define TEXT_DIALOGUE_Ki "100 Units - 10 DP\n125 Units - 35 DP\n150 Units - 60 DP\n200 Units - 110 DP\n225 Units - 135 DP\n250 Units - 160 DP\n300 Units - 210 DP\n350 Units - 260 DP\n400 Units - 310 DP\n500 Units - 410 DP"
#define TEXT_DIALOGUE_HEALTH "100 HP - 10 DP\n150 HP - 25 DP\n200 HP - 50 DP\n250 HP - 75 DP\n300 HP - 100 DP\n350 HP - 125 DP\n400 HP - 150 DP\n450 HP - 175 DP\n500 HP - 200 DP"
#define TEXT_DIALOGUE_SIZE "Do you want to increase your ki effects of 0.5 for 20 DPs?"
#define TEXT_DIALOGUE_SIZE2 "Do you want to decrease your ki effects of 0.5 for 20 DPs?"
#define SECONDARY_DIALOG_TEXT "Dragonball Z DeathMatch 4.0z by Sasino97"
//Undefines
#undef MAX_PLAYERS
#undef MAX_PLAYER_NAME
//Define Maximum
#define MAX_PLAYERS 100
#define MAX_PLAYER_NAME 20
#define MAX_SKINS 299
#define MAX_PLAYER_NAME 20
#define MAX_VOTES 3
//other
#define NO_Ki_MESSAGE "~r~Your ~b~ki energy level ~r~is low! Use ~b~MMB to charge!" //Message that is displayed if you do not have enough Ki
#define NO_PUNTI_MESSAGE "You don't have enough DPs to buy this object!" //Message that is displayed if you do not have enough Dragon Points
#define ERROR_MESSAGE "Unknown Command - Type /cmds to see a list of available commands" //Message that appears if you're not an admin
#define null -1
#define prisonX 263.0
#define prisonY 77.0
#define prisonZ 1001.0
#pragma tabsize 0
//-=-=-=-=-=CALLBACK DECLARATIONS=-=-=-=-=-
forward Unfreeze(playerid);
forward loading25(playerid);
forward loading50(playerid);
forward loading100(playerid);
forward OnPlayerFinishCombo(playerid);
//forward OnPlayerUpdateKi(playerid);
forward OnPlayerEnterAnyVehicle(playerid);
forward OnPlayerExitAnyVehicle(playerid);
forward chargeKi(playerid);
forward Pushing_Forward(playerid);
forward Pushing_Forward_short(playerid);
forward pushing_on(playerid);
forward pushing_on_short(playerid);
forward push_down(playerid);
forward push_down_short(playerid);
//-=-=-=-=-=NEW VARIABLES AND ARRAYS=-=-=-=-=-
//With MAX_PLAYERS
new muted[MAX_PLAYERS];
new Combo[MAX_PLAYERS];
new Text:TdCombo[MAX_PLAYERS];
new Text3D:Name3DText[MAX_PLAYERS];
new VoteKick[MAX_PLAYERS];
new AdminLevel[MAX_PLAYERS];
new TickCount[MAX_PLAYERS];
new betPlayer[MAX_PLAYERS];
new betMoney[MAX_PLAYERS];
new Bar:BarraKi[MAX_PLAYERS];
new ComboTick[MAX_PLAYERS];
new ComboTimer[MAX_PLAYERS];
//new TimerUpdate[MAX_PLAYERS];
new KiTimer[MAX_PLAYERS];
//new Pushing_ForwardTimer[MAX_PLAYERS];
//new Pushing_ForwardTimer2[MAX_PLAYERS];
//new push_downTimer[MAX_PLAYERS];
//new push_downTimer2[MAX_PLAYERS];
//new pushing_onTimer[MAX_PLAYERS];
//new pushing_onTimer2[MAX_PLAYERS];
new Text:written_Toolbar1[MAX_PLAYERS];
new Text:written_Toolbar2[MAX_PLAYERS];
new Text:written_Toolbar3[MAX_PLAYERS];
new FLY_ON[MAX_PLAYERS];
new ban1[MAX_PLAYERS];
new failattemps[MAX_PLAYERS];
new warns[MAX_PLAYERS];
//With Float:
new Float:Randomspace_Training[2][3] =
{
{-68.4304,-17.8501,3.1171},//Space Training
{-53.8105,16.1618,3.1171}
};
new Float:RandomAbandoned_Village[2][3] =
{
{-562.7196,-189.0080,78.4062},//Abandoned_Village
{-529.9219,-189.8709,78.4062}
};
new Float:RandomSkyscraper[2][3] =
{
{1529.3504,-1359.3781,329.4609},//Skyscraper
{1557.7271,-1352.8771,329.4609}
};
new Float:RandomTenkaichi_tournament[2][3] =
{
{397.3382,-2070.2937,13.8998},//Tenkaichi_tournament
{372.9983,-2069.4833,13.9451}
};
new Float:RandomBRIDGE[2][3] =
{
{-1251.3450,768.4552,34.5781},//BRIDGE
{-1205.4771,801.5731,34.5781}
};
new Float:RandomUnderwater[2][3] =
{
{-2665.1315,1908.1401,-37.8794},//Under the sea
{-2708.8198,1904.1984,-37.2827}
};
new Float:RandomArea51[2][3] =
{
{183.161331,1860.846679,20.661357},//Area 69
{228.632171,1898.935668,17.648057}
};
new Float:RandomCasino[2][3] =
{
{2272.188476,1623.508178,94.921875},//Roof Of Caligulas
{2204.618164,1603.807128,68.726562}
};
new Float:RandomSpawns[16][3] =
{
{-562.7196,-189.0080,78.4062},//Abandoned_Village
{-529.9219,-189.8709,78.4062},
{1529.3504,-1359.3781,329.4609},//Skyscraper
{1557.7271,-1352.8771,329.4609},
{397.3382,-2070.2937,13.8998},//Tenkaichi_tournament
{372.9983,-2069.4833,13.9451},
{-1251.3450,768.4552,34.5781},//BRIDGE
{-1205.4771,801.5731,34.5781},
{-2665.1315,1908.1401,-37.8794},//Under the sea
{-2708.8198,1904.1984,-37.2827},
{183.161331,1860.846679,20.661357},//Area 69
{228.632171,1898.935668,17.648057},
{2272.188476,1623.508178,94.921875},//Roof Of Caligulas
{2204.618164,1603.807128,68.726562},
{-68.4304,-17.8501,3.1171},//space Training
{-53.8105,16.1618,3.1171}
};
//With strings
new rand;
/*new Banned_Words[][] = //WORDS THAT CAN'T BE SAID. IF YOU DON'T WANT THIS, REMOVE
{
"noob","nab","n4","n0","nub",
"dick","penis","shit","pussy","ass","cock",
"fuck","fck","suck","suk","fack","f**k","f*ck","fac","fuc",
"stupid","deficent","idiot","bastard","mongoloid","andicap","fag","gay","g4y",
"nigge","jew","moroccan","morokkan",
"whore","escort","bitch","prostitute","blowjob","slut","baldr","motherfucker"
};*/
new Rules[][] =
{
{"1 - You mustn't use cheats in this server.\n"},
{"2 - You mustn't spam in the chat or spam the attacks.\n"},
{"3 - You mustn't speak rude language.\n"},
{"4 - You mustn't advertise for other servers.\n"},
{"The moderators have the right to punish the rulebreakers.\n"},
{"By clicking the \"I Agree\" button you declare you've\n"},
{"read and understood the rules, Otherwise click \"Exit\"\n"}
};
//With enum
enum dwish
{
dsword,
dBazooka,
dknife,
};
enum PlayerInfo
{
Pass[129], //User's password
Adminlevel, //User's admin level
VIPlevel, //User's vip level
Banned,
ball1,
ball2,
ball3,
ball4,
ball5,
ball6,
ball7,
Score,
DragonRadar,
Kills, //User's kills
Deaths, //User's deaths
Jailed, //was user jailed or not
JailTime, // Jail Timer
pBanexp,
pBanres[100],
pBanPerm,
pBanAdmin[20],
pBanIPP[20],
style[MAX_SKINS],
attack[MAX_SKINS],
speed[MAX_SKINS],
HEALTHMax[MAX_SKINS],
Float:KiMax[MAX_SKINS],
KiSize[MAX_SKINS],
dsword,
dBazooka,
dknife,
};
new pInfo[MAX_PLAYERS][PlayerInfo];
//-----------LOGIN SYSTEM----------//
#define dregister 2011 //Defining register dialog so it won't mixed up with the other dialogs
#define dlogin 2012
#define fail_login_dialog 2013 //Defining login dialog so it won't mixed up with the other dialogs
#define AUTO_SAVE_MINUTES 4 // minutes for auto save
#define server_rules 2019
#define server_rules2 2023
native WP_Hash(buffer[],len,const str[]);
new playerloggedin[MAX_PLAYERS];
new login_timer1[MAX_PLAYERS];
new register_timer1[MAX_PLAYERS];
new registered[MAX_PLAYERS] =0;
#define UserPath "DragonBall/Users/%s.ini" /*Will define user's account path*/
#define BANPATH "DragonBall/Bans/%s.ini" //will define ban path
#define IPPATH "DragonBall/IP/%s.ini" // will difine ip
forward connecthide(playerid);
new JailTimer[MAX_PLAYERS];
public connecthide(playerid)
{
//TextDrawHideForPlayer(playerid,playerconnect[0]);
//TextDrawHideForPlayer(playerid,playerconnect[1]);
//TextDrawHideForPlayer(playerid,playerconnect[2]);
//TextDrawHideForPlayer(playerid,playerconnect[3]);
//TextDrawHideForPlayer(playerid,playerconnect[4]);
//TogglePlayerSpectating(playerid, 0);
login_timer1[playerid] = SetTimerEx("login_timer", 100, 0, "d", playerid);
return 1;
}
forward login_timer(playerid);
public login_timer(playerid)
{
new name[MAX_PLAYER_NAME]; //Making a new variable called 'name'. name[MAX_PLAYER_NAME] is created so we can use it to get player's name.
GetPlayerName(playerid,name,sizeof(name)); //Get player's name
//new pname = strtolower(name);
if(fexist(Path(playerid)))
{// then
SendClientMessage(playerid, COLOR_WHITE, "Welcome to {0087FF}Dragon Ball Z Server {FFFFFF}- {FFBE00}Version 2.0.0");
SendClientMessage(playerid, COLOR_WHITE, "Type {FFBE00}/rules /help /cmds{FFFFFF} For Game Info. Don't forget to visit our website.");
SendClientMessage(playerid, COLOR_WHITE, "This Account is Registered. Type your {FFBE00}Password {FFFFFF}to Load Your Stats.");
SendClientMessage(playerid, COLOR_RED, "IMPORTANT! {FFFFFF}You have few minutes to Login. Otherwise you will be kicked.");
INI_ParseFile(Path(playerid),"loadaccount_%s", .bExtra = true, .extra = playerid); //Will load user's data using INI_Parsefile.
ShowPlayerDialog(playerid,dlogin,DIALOG_STYLE_PASSWORD,"{02FBD6}Dragon Ball Z Login","{FFFFFF}This account is already {02FBD6}registered{FFFFFF} - Please {02FBD6}login{FFFFFF}.\nIf this is not your {E30544}account{FFFFFF}, then quit and change your nick\nin {E30544}SA-MP {FFFFFF}browser.","Login","Quit");
}
else //If the connected user is not registered,
{//then we will 'force' him to register :)
SendClientMessage(playerid, COLOR_WHITE, "Welcome to {0087FF}Dragon Ball Z Server {FFFFFF}- {FFBE00}Version 2.0.0");
SendClientMessage(playerid, COLOR_WHITE, "Type {FFBE00}/rules /help /cmds{FFFFFF} For Game Info. Don't forget to visit our website.");
SendClientMessage(playerid, COLOR_WHITE, "This Account is not Registered. Type {FFBE00}/register {FFFFFF}to Save Your Stats.");
SendClientMessage(playerid, COLOR_RED, "IMPORTANT! {FFFFFF}You have 3 minutes to Register. Otherwise you will be kicked.");
register_timer1[playerid] = SetTimerEx("register_timer", 3*60*1000, 0, "d", playerid);
ShowPlayerDialog(playerid, server_rules, DIALOG_STYLE_MSGBOX, "Server Terms", "Read the terms before you register:\n\n- Don't create Multiple Accounts.\n- Don't enter easy Password.\n- Read the server rules after Registration.","Accept","Dicline");
return 1;
}
return 1;
}
forward KickPublic(playerid);
forward register_timer(playerid);
public register_timer(playerid)
{
new name[MAX_PLAYER_NAME]; //Making a new variable called 'name'. name[MAX_PLAYER_NAME] is created so we can use it to get player's name.
GetPlayerName(playerid,name,sizeof(name)); //Get player's name
if(fexist(Path(playerid)))
{
}
else
{
KickWithMessage(playerid, "{FF0000} Your Register Limit (3 mins) Has Been Exceeded! - KICKED!");
}
}
public KickPublic(playerid) { Kick(playerid); }
stock KickWithMessage(playerid, message[])
{
SendClientMessage(playerid, COLOR_GREY, message);
SetTimerEx("KickPublic", 1000, 0, "d", playerid); //Delay of 1 second before kicking the player so he recieves the message
}
#define GMT_H 0 // Enter the value of the gmt hour u want otherwise kee it zero
#define GMT_M 0 // Enter the value of the gmt mintues u want otherwise kee it zero
new pp[50];
//--ban---//
forward fcreate(filename[]);
public fcreate(filename[])
{
if (fexist(filename)){return false;}
new File:fhandle = fopen(filename,io_write);
fclose(fhandle);
return true;
}
forward LoadBanUser_data(playerid,name[],value[]);
public LoadBanUser_data(playerid,name[],value[])
{INI_Int("Banexp",pInfo[playerid][pBanexp]);
INI_Int("BanPerm",pInfo[playerid][pBanPerm]);
INI_String("BanAdmin", pInfo[playerid][pBanAdmin], 20);
INI_String("Reason",pInfo[playerid][pBanres],100);
return 1;
}
forward LoadIPUser_data(playerid,name[],value[]);
public LoadIPUser_data(playerid,name[],value[])
{
INI_Int("Banexp",pInfo[playerid][pBanexp]);
INI_Int("BanPerm",pInfo[playerid][pBanPerm]);
INI_String("BanPlayer", pInfo[playerid][pBanIPP], 20);
INI_String("BanAdmin", pInfo[playerid][pBanAdmin], 20);
INI_String("Reason",pInfo[playerid][pBanres],100);
return 1;
}
forward LoadIP_data(playerid,name[],value[]);
public LoadIP_data(playerid,name[],value[])
{
INI_String("IP",pp,50);
return 1;
}
stock UserIPPath(playerid)
{
new string[128],ip[50];
GetPlayerIp(playerid,ip,sizeof(ip));
format(string,sizeof(string),IPPATH,ip);
return string;
}
stock UserBanPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),BANPATH,playername);
return string;
}
stock Path(playerid) //Will create a new stock so we can easily use it later to load/save user's data in user's path
{
new str[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
for(new d,len = strlen(name); d != len; d++)
name[d] = tolower(name[d]);
format(str,sizeof(str),UserPath,name);
return str;
}
forward loadaccount_Players_Data(playerid, name[], value[]);
public loadaccount_Players_Data(playerid, name[], value[])
{
INI_String("Password", pInfo[playerid][Pass],129); /*we will use INI_String to load user's password.
("Password",.. will load user's password inside of user's path. 'pInfo[playerid][Pass]',...We have defined our user's variable above called, pInfo. Now it's time to use it here to load user's password. '129',... 129 is a length of a hashed user's password. Whirlpool will hash 128 characters + NULL*/
INI_Int("AdminLevel",pInfo[playerid][Adminlevel]);/*We will use INI_Int to load user's admin level. INI_Int stands for INI_Integer. This load an admin level. */
INI_Int("VIPLevel",pInfo[playerid][VIPlevel]);//As explained above
INI_Int("Score",pInfo[playerid][Score]);//As explained above
INI_Int("Kills",pInfo[playerid][Kills]);//As explained above
INI_Int("Deaths",pInfo[playerid][Deaths]);//As explained above
INI_Int("Banned",pInfo[playerid][Banned]);
INI_Int("Jailed",pInfo[playerid][Jailed]);
INI_Int("JailTime",pInfo[playerid][JailTime]);
INI_Int("ball1",pInfo[playerid][ball1]);
INI_Int("ball2",pInfo[playerid][ball2]);
INI_Int("ball3",pInfo[playerid][ball3]);
INI_Int("ball4",pInfo[playerid][ball4]);
INI_Int("ball5",pInfo[playerid][ball5]);
INI_Int("ball6",pInfo[playerid][ball6]);
INI_Int("ball7",pInfo[playerid][ball7]);
INI_Int("DragonRadar",pInfo[playerid][DragonRadar]);
INI_Int("style[MAX_SKINS]",pInfo[playerid][style]);
INI_Int("attack[MAX_SKINS]",pInfo[playerid][attack]);
INI_Int("speed[MAX_SKINS]",pInfo[playerid][speed]);
INI_Int("HEALTHMax[MAX_SKINS]",pInfo[playerid][HEALTHMax]);
INI_Float("KiMax[MAX_SKINS]",pInfo[playerid][KiMax]);
INI_Int("KiSize[MAX_SKINS]",pInfo[playerid][KiSize]);
INI_Int("dsword",pInfo[playerid][dsword]);
INI_Int("dBazooka",pInfo[playerid][dBazooka]);
INI_Int("dknife",pInfo[playerid][dknife]);
return 1;
}
forward AUTO_SAVE(playerid);
forward ban(playerid);
public ban(playerid)
{
Ban(playerid);
return 1;
}
public AUTO_SAVE(playerid)
{
if(playerloggedin[playerid] == 1)
{
if(playerid == INVALID_PLAYER_ID || !IsPlayerConnected(playerid)) return SCM(playerid, -1,"");
new name[MAX_PLAYER_NAME]; //Making a new variable called 'name'. name[MAX_PLAYER_NAME] is created so we can use it to get player's name.
GetPlayerName(playerid,name,sizeof(name)); //Get player's name
//new pname = strtolower(name);
if(fexist(Path(playerid)))
{// then
new INI:file = INI_Open(Path(playerid)); //will open their file
INI_SetTag(file,"Players_Data");//We will set a tag inside of user's account called "Players_Data"
INI_WriteInt(file,"AdminLevel",pInfo[playerid][Adminlevel]); //If you've set his/her admin level, then his/her admin level will be saved inside of his/her account
INI_WriteInt(file,"VIPLevel",pInfo[playerid][VIPlevel]);//As explained above
INI_WriteInt(file,"Score",GetPlayerScore(playerid));//We will save his score inside of his account
INI_WriteInt(file,"Kills",pInfo[playerid][Kills]);//As explained above
INI_WriteInt(file,"Deaths",pInfo[playerid][Deaths]);//As explained above
INI_WriteInt(file,"Banned",pInfo[playerid][Banned]);
INI_WriteInt(file,"Jailed",pInfo[playerid][Jailed]);
INI_WriteInt(file,"ball1",pInfo[playerid][ball1]);
INI_WriteInt(file,"ball2",pInfo[playerid][ball2]);
INI_WriteInt(file,"ball3",pInfo[playerid][ball3]);
INI_WriteInt(file,"ball4",pInfo[playerid][ball4]);
INI_WriteInt(file,"ball5",pInfo[playerid][ball5]);
INI_WriteInt(file,"ball6",pInfo[playerid][ball6]);
INI_WriteInt(file,"ball7",pInfo[playerid][ball7]);
INI_WriteInt(file,"DragonRadar",pInfo[playerid][DragonRadar]);
INI_WriteInt(file,"style[MAX_SKINS]",pInfo[playerid][style]);
INI_WriteInt(file,"attack[MAX_SKINS]",pInfo[playerid][attack]);
INI_WriteInt(file,"speed[MAX_SKINS]",pInfo[playerid][speed]);
INI_WriteInt(file,"HEALTHMax[MAX_SKINS]",pInfo[playerid][HEALTHMax]);
INI_WriteInt(file,"KiSize[MAX_SKINS]",pInfo[playerid][KiSize]);
INI_WriteInt(file,"dsword",pInfo[playerid][KiSize]);
INI_WriteInt(file,"dBazooka",pInfo[playerid][dBazooka]);
INI_WriteInt(file,"dknife",pInfo[playerid][dknife]);
INI_Close(file);//Now after we've done saving their data, we now need to close the file
//SCM(playerid, COLOR_WHITE, "Your {00B9FF}Stats {FFFFFF}Have Been Automatically {FF0015}Saved.");
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,24);
new str[120];
//format(str,sizeof(str),"<AUTO - SAVED> Stats for account: %s(%d) has been saved automatically.", playername, playerid);
print(str);
}
}
return 1;
}
//=========================================================================================================//
//========================================================================================================//
//Altri
new Radar;
new Drago1;
new Drago2;
new Drago3;
new Drago4;
new Drago5;
new Drago6;
new Drago7;
new SAVEMATCH;
new Kill1;
new Kill2;
new Kill3;
new Kill4;
new Kill5;
new Kill6;
new Kill7;
new Kill8;
//-=-=-=-=-=Main=-=-=-=-=-
main()
{
print("\n-----------------NOW RUNNING------------------\n");
print(" Dragonball Z Deathmatch 4.0z by Sasino ");
print("\n----------------------------------------------\n");
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=CALLBACKS-=-=-=-=-=-=-=-=-=-=-=-=-=
//-=-=-=-=-=OnGamemodeInit=-=-=-=-=-
public OnGameModeInit()
{
SetWeather(17);//Weather
SetGravity(0.001);//Gravity
SetWorldTime(12);//Hours
SetNameTagDrawDistance(20);//Distance from where you can see the name tag
SetGameModeText("DBZ-DM 4.0z");//Gamemode Name
AllowAdminTeleport(true);//You teleport to the administrators and moderators
ShowPlayerMarkers(true);//It signals the players on the map
DisableInteriorEnterExits();//disabling Interiors
AddPlayerClassEx(0,GOKU0,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Goku
AddPlayerClassEx(1,VEGETA0,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Vegeta
AddPlayerClassEx(2,TRUNKS0,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Trunks
AddPlayerClassEx(3,GOHAN0,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Gohan
AddPlayerClassEx(4,SATAN,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Mr. Satan
AddPlayerClassEx(5,VIDEL,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Videl
AddPlayerClassEx(6,CRILIN,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Crilin
AddPlayerClassEx(7,YAMCHA,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Yamcha
AddPlayerClassEx(8,TENSHINSHAN,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Tenshinshan
AddPlayerClassEx(9,GELO,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Dr. Gelo
AddPlayerClassEx(10,Andriod16,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Andriod16
AddPlayerClassEx(11,Andriod17,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Andriod17
AddPlayerClassEx(12,Andriod18,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Andriod18
AddPlayerClassEx(13,Andriod19,-249.000000,6.000000,117.000000, 90.000000,0,0,0,0,0,0);//Andriod19
Drago1 = CreatePickup(1247,15,-537.200683,-102.969543,63.296875);//1 Star Dragon Ball
Drago2 = CreatePickup(1247,15,-2670.812255,1933.930419,217.273895);//2 Star Dragon Ball
Drago3 = CreatePickup(1247,15,1451.416748,-1076.615478,213.382812);//3 Star Dragon Ball
Drago4 = CreatePickup(1247,15,-1363.999755,493.684875,29.944622);//4 Star Dragon Ball
Drago5 = CreatePickup(1247,15,-61.429683,-37.518638,25.980148);//5 Star Dragon Ball
Drago6 = CreatePickup(1247,15,281.206451,1816.537475,1.000000);//6 Star Dragon Ball
Drago7 = CreatePickup(1247,15,2323.700439,1283.225341,97.661628);//7 Star Dragon Ball
Radar = CreatePickup(1252,15,2002.766113,1532.768798,34.918472);//Bulma's Dragon Radar
Kill1 = CreatePickup(1254,15,-534.850280,-177.978118,84.203895);//Kills
Kill2 = CreatePickup(1254,15,382.104675,-2085.783691,7.835937);//
Kill3 = CreatePickup(1254,15,-2717.638427,1916.555175,-37.692634);//
Kill4 = CreatePickup(1254,15,1547.865112,-1366.486816,326.210937);//
Kill5 = CreatePickup(1254,15,-1312.331298,723.875793,34.578125);//
Kill6 = CreatePickup(1254,15,-67.796043,15.665332,5.960474);//
Kill7 = CreatePickup(1254,15,206.900390,1921.105346,17.640625);//
Kill8 = CreatePickup(1254,15,2266.202148,1619.752563,99.023284);//Fine Kills
Radar = CreatePickup(1252,15,2002.766113,1532.768798,34.918472);//Bulma's Dragon Radar
SAVEMATCH = CreatePickup(1277,23,823.166564,1.832440,1004.179687);//Main Menu
CreateObject(971,364.854858,-2024.364990,10.449507,0.000000,0.000000,360.000000);//Cage
CreateObject(971,373.453552,-2024.487670,10.337790,0.000000,0.000000,360.000000);//
CreateObject(971,377.692169,-2028.686035,10.285641,0.000000,0.000000,270.000000);//
CreateObject(971,377.483123,-2037.448486,10.227573,0.000000,0.000000,270.000000);//
CreateObject(971,381.926849,-2041.893554,10.080951,0.000000,0.000000,360.000000);//
CreateObject(971,390.607543,-2041.956298,10.244183,0.000000,0.000000,0.000000);////
CreateObject(971,395.177520,-2041.678222,10.493602,0.000000,0.000000,0.000000);////
CreateObject(971,360.316619,-2028.781860,10.429292,0.000000,0.000000,90.000000);///
CreateObject(971,360.365295,-2037.818237,10.446266,0.000000,0.000000,90.000000);///
CreateObject(971,355.863403,-2047.221557,10.516483,0.000000,0.000000,360.000000);//
CreateObject(971,360.174713,-2042.649414,10.129162,0.000000,0.000000,90.000000);///
CreateObject(971,349.348693,-2051.299560,10.362854,0.000000,0.000000,90.000000);///
CreateObject(971,353.712524,-2047.049804,10.380116,0.000000,0.000000,0.000000);////
CreateObject(971,349.571594,-2059.866210,10.328974,0.000000,0.000000,90.000000);///
CreateObject(971,349.781982,-2068.938476,10.430992,0.000000,0.000000,90.000000);///
CreateObject(971,349.954711,-2077.801269,10.366273,0.000000,0.000000,90.000000);///
CreateObject(971,349.900543,-2084.890380,10.419968,0.000000,0.000000,90.000000);///
CreateObject(971,354.100128,-2089.282958,10.113450,0.000000,0.000000,180.000000);//
CreateObject(971,362.707977,-2089.087158,10.315588,0.000000,0.000000,180.000000);//
CreateObject(971,371.566589,-2089.158447,10.271301,0.000000,0.000000,180.000000);//
CreateObject(971,380.395904,-2089.262939,10.250101,0.000000,0.000000,180.000000);//
CreateObject(971,389.139434,-2089.212158,10.158458,0.000000,0.000000,180.000000);//
CreateObject(971,397.922973,-2089.104492,10.835937,0.000000,0.000000,180.000000);//
CreateObject(971,405.629791,-2089.104492,10.231714,0.000000,0.000000,180.000000);//
CreateObject(971,409.754943,-2084.612792,10.094079,0.000000,0.000000,270.000000);//
CreateObject(971,409.797088,-2075.795410,10.563268,0.000000,0.000000,270.000000);//
CreateObject(971,409.768371,-2067.102539,10.030206,0.000000,0.000000,270.000000);//
CreateObject(971,410.017486,-2058.327880,10.298521,0.000000,0.000000,270.000000);//
CreateObject(971,409.782165,-2051.658203,10.298521,0.000000,0.000000,270.000000);//
CreateObject(971,409.782165,-2048.658203,10.298521,0.000000,0.000000,360.000000);//
CreateObject(971,403.119995,-2047.381835,10.298521,0.000000,0.000000,360.000000);//
CreateObject(971,398.632232,-2043.106811,10.117244,0.000000,0.000000,270.000000);//end Cage
//CLEAR SIGNS FOR CHRISTMAS /* and */
/*
CreateObject(661,368.618499,-1994.246948,6.659312,0.000000,0.000000,0.00000000);//Winter Special Celebrations
CreateObject(3785,370.700073,-1995.705688,12.782113,0.000000,0.000000,0.000000);//
CreateObject(3785,367.190032,-1995.480712,13.676772,0.000000,0.000000,0.000000);//
CreateObject(3785,369.532104,-1994.811157,15.755434,0.000000,0.000000,0.000000);//
CreateObject(3785,370.090789,-1995.620605,19.191816,0.000000,0.000000,0.000000);//
CreateObject(3785,366.341827,-1995.635009,19.376033,0.000000,0.000000,0.000000);//
CreateObject(3785,367.877929,-1991.300903,14.011980,0.000000,0.000000,0.000000);//
CreateObject(3785,367.571228,-1993.741943,20.903799,0.000000,0.000000,0.000000);//
CreateObject(3785,370.950500,-1994.454589,12.136563,0.000000,0.000000,0.000000);//
CreateObject(3785,369.979797,-1993.114868,13.362409,0.000000,0.000000,0.000000);//End of Winter Special Celebrations
*/
return 1;
}
//-=-=-=-=-=OnGamemodeExit=-=-=-=-=-
public OnGameModeExit()
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER) OnPlayerEnterAnyVehicle(playerid);
if(oldstate == PLAYER_STATE_DRIVER && newstate == PLAYER_STATE_ONFOOT) OnPlayerExitAnyVehicle(playerid);
return 1;
}
//-=-=-=-=-=OnPlayerEnterAnyVehicle=-=-=-=-=-
public OnPlayerEnterAnyVehicle(playerid)
{
new name[MAX_PLAYER_NAME];
new string[256];
SetPlayerPos(playerid,prisonX,prisonY,prisonZ);
SetPlayerInterior(playerid,6);
GetPlayerName(playerid,name,sizeof(name));
format(string, sizeof(string),"-SSB- %s got banned for 'Cheat(vehicle)'.", name);
SendClientMessageToAll(COLOR_KICK/BAN,string);
SendClientMessage(playerid,COLOR_KICK/BAN,"Rule n°1: You mustn't use cheats in this server. Penalty: Ban.");
SendClientMessage(playerid,COLOR_KICK/BAN,"The anti-vehicle system detected you in a vehicle.");
GameTextForPlayer(playerid,"YOU ARE NOW BANNED. /Q TO EXIT THE GAME.",300000,5);
BanEx(playerid,"CHEAT(VEHICLE)");
return 1;
}
//-=-=-=-=-=OnPlayerExitAnyVehicle=-=-=-=-=-
public OnPlayerExitAnyVehicle(playerid)
{
new name[MAX_PLAYER_NAME];
new string[256];
SetPlayerPos(playerid,prisonX,prisonY,prisonZ);
SetPlayerInterior(playerid,6);
GetPlayerName(playerid,name,sizeof(name));
format(string, sizeof(string),"-SSB- %s got banned for 'Cheat(vehicle)'.", name);
SendClientMessageToAll(COLOR_KICK/BAN,string);
SendClientMessage(playerid,COLOR_KICK/BAN,"Rule n°1: You mustn't use cheats in this server. Penalty: Ban.");
SendClientMessage(playerid,COLOR_KICK/BAN,"The anti-vehicle system detected exiting a vehicle.");
GameTextForPlayer(playerid,"YOU ARE NOW BANNED. /Q TO EXIT THE GAME.",300000,5);
BanEx(playerid,"CHEAT(VEHICLE)");
return 1;
}
//-=-=-=-=-=OnPlayerSpawn=-=-=-=-=-
public OnPlayerSpawn(playerid)
{
if(pInfo[playerid][Jailed] == 1) {
JailPlayer(playerid);
SendClientMessage(playerid,COLOR_RED,"Nice Try! You cant escape your punishment. You Are Still In Jail");
return 1;
}
new Float:X, Float:Y, Float:Z;
new team = GetPlayerTeam(playerid);
TogglePlayerClock(playerid, true);
ShowPlayerDialog(playerid, DIALOGUE_SPAWN, DIALOG_STYLE_LIST, "Select a battleground", "{FF0000}1 - Abandoned village\n{00FF00}2 - Tenkaichi Tournament\n{FFFF00}3 - Underwater\n{0000FF}4 - Skyscraper\n{FF00D4}5 - Bridge\n{00FFFF}6 - Training zone\n{FF7F2A}7 - Area 51\n{FF7FAA}8 - Casino\n9 - Betting and Customizing Room (No Fight)", "Select", "Random");
TogglePlayerControllable(playerid,false);
new name[MAX_PLAYER_NAME];
//TimerUpdate[playerid] = SetTimerEx("OnPlayerUpdateKi", 500, 1, "i", playerid);
GetPlayerName(playerid,name,sizeof(name));
ShowProgressBarForPlayer(playerid, BarraKi[playerid]);
if(team == 13 || team == 9) { SendClientMessage(playerid,COLOR_LIGHTBLUE,"This character can absorb energy, use /absorb."); }
ResetPlayerMoney(playerid);//Reset Ki
SetPlayerArmour(playerid,150);//First bar HEALTH
SetPlayerHealth(playerid,150);//Second bar HEALTH a.k.a Armour
SetPlayerColor(playerid,COLOR_WHITE);//color
TogglePlayerClock(playerid,false);
SendClientMessage(playerid,COLOR_BLUE, "Welcome to Dragonball Z DM 4.0z (GM by Sasino)! Use /help.");
PlaySound(playerid,SOUND_BIKE_AWARD_TRACK_START);
if(IsPlayerAnAndroid(playerid))
{
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Andriod have less health, but they never get tired.");
SetPlayerColor(playerid,COLOR_LIGHTBLUE);
SetPlayerHealth(playerid,50);
SetPlayerArmour(playerid,0);
ResetPlayerMoney(playerid);
}
if(team == 4 || team == 5)
{
SendClientMessage(playerid,COLOR_PINK,"Weak characters start with 150hp.");
SetPlayerColor(playerid,COLOR_PINK);
SetPlayerHealth(playerid,150);
SetPlayerArmour(playerid,0);
ResetPlayerMoney(playerid);
}
switch(team)
{
case 0: { GameTextForPlayer(playerid,"~r~Goku",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU); Name3DText[playerid] = Create3DTextLabel("GOKU", COLOR_WHITE, X, Y, Z+0.2, 20, 0, 0); Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 1: { GameTextForPlayer(playerid,"~b~Vegeta",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU); Name3DText[playerid] = Create3DTextLabel("VEGETA", COLOR_WHITE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 2: { GameTextForPlayer(playerid,"~y~Trunks",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU); Name3DText[playerid] = Create3DTextLabel("TRUNKS", COLOR_WHITE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 3: { GameTextForPlayer(playerid,"~g~Gohan",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU); Name3DText[playerid] = Create3DTextLabel("GOHAN", COLOR_WHITE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 4: { GameTextForPlayer(playerid,"~p~Hercule",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING); Name3DText[playerid] = Create3DTextLabel("HERCULE", COLOR_WHITE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 5: { GameTextForPlayer(playerid,"~l~Videl",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING); Name3DText[playerid] = Create3DTextLabel("VIDEL", COLOR_WHITE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 6: { GameTextForPlayer(playerid,"~r~Krillin",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU); Name3DText[playerid] = Create3DTextLabel("KRILLIN", COLOR_WHITE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 7: { GameTextForPlayer(playerid,"~b~Yamcha",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU); Name3DText[playerid] = Create3DTextLabel("YAMCHA", COLOR_WHITE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 8: { GameTextForPlayer(playerid,"~y~Tien",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KUNGFU); Name3DText[playerid] = Create3DTextLabel("TIEN", COLOR_WHITE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 9: { GameTextForPlayer(playerid,"~g~Dr.Gero",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK); Name3DText[playerid] = Create3DTextLabel("DR.GERO", COLOR_LIGHTBLUE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 10: { GameTextForPlayer(playerid,"~p~Andriod16",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD); Name3DText[playerid] = Create3DTextLabel("Andriod16", COLOR_LIGHTBLUE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 11: { GameTextForPlayer(playerid,"~l~Andriod17",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD); Name3DText[playerid] = Create3DTextLabel("Andriod17", COLOR_LIGHTBLUE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 12: { GameTextForPlayer(playerid,"~r~Andriod18",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD); Name3DText[playerid] = Create3DTextLabel("Andriod18", COLOR_LIGHTBLUE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
case 13: { GameTextForPlayer(playerid,"~b~Andriod19",1000,4); SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK); Name3DText[playerid] = Create3DTextLabel("Andriod19", COLOR_LIGHTBLUE, X, Y, Z+0.2, 20, 0, 0);Attach3DTextLabelToPlayer(Name3DText[playerid], playerid, X, Y, Z+0.4);}
}
new name3[MAX_PLAYER_NAME];
GetPlayerName(playerid,name3,sizeof(name3));
new skin = GetPlayerSkin(playerid);
new string2[256];
new name2[MAX_PLAYER_NAME];
GetPlayerName(playerid,name2,sizeof(name2));
format(string2, sizeof(string2), "tabless/%s.%d.ini", name2,skin);
if(pInfo[playerid][style][skin] != 0) SetPlayerFightingStyle(playerid,pInfo[playerid][style][skin]);
SetPlayerScore(playerid,pInfo[playerid][Score]);
if(GetPlayerTeam(playerid) == 2 && pInfo[playerid][dsword] == 1) GivePlayerWeapon(playerid,WEAPON_KATANA,1);
if(GetPlayerTeam(playerid) == 5 && pInfo[playerid][dknife] == 1) GivePlayerWeapon(playerid,WEAPON_KNIFE,1);
if(GetPlayerTeam(playerid) == 10 && pInfo[playerid][dBazooka] == 1) GivePlayerWeapon(playerid,WEAPON_HEATSEEKER,20);
if(pInfo[playerid][HEALTHMax][skin] > 5)
{
SetPlayerHealth(playerid, pInfo[playerid][HEALTHMax][skin]);
SetPlayerArmour(playerid, pInfo[playerid][HEALTHMax][skin]);
}
if(pInfo[playerid][DragonRadar] == 1)
{
if(pInfo[playerid][ball1] == 0) SetPlayerMapIcon(playerid, 1, -537.200683,-102.969543,63.296875, 56, 0, MAPICON_GLOBAL);
if(pInfo[playerid][ball2] == 0) SetPlayerMapIcon(playerid, 2, -2670.812255,1933.930419,217.273895, 56, 0, MAPICON_GLOBAL);
if(pInfo[playerid][ball3] == 0) SetPlayerMapIcon(playerid, 3, 1451.416748,-1076.615478,213.382812, 56, 0, MAPICON_GLOBAL);
if(pInfo[playerid][ball4] == 0) SetPlayerMapIcon(playerid, 4, -1363.999755,493.684875,29.944622, 56, 0, MAPICON_GLOBAL);
if(pInfo[playerid][ball5] == 0) SetPlayerMapIcon(playerid, 5, -61.429683,-37.518638,25.980148, 56, 0, MAPICON_GLOBAL);
if(pInfo[playerid][ball6] == 0) SetPlayerMapIcon(playerid, 6, 281.206451,1816.537475,1.007812, 56, 0, MAPICON_GLOBAL);
if(pInfo[playerid][ball7] == 0) SetPlayerMapIcon(playerid, 7, 2323.700439,1283.225341,97.661628, 56, 0, MAPICON_GLOBAL);
}
return 1;
}
//-=-=-=-=-=OnPlayerDeath=-=-=-=-=-
public OnPlayerDeath(playerid,killerid,reason)
{
new string[256];
new playname[MAX_PLAYER_NAME];
new killname[MAX_PLAYER_NAME];
new Float:X,Float:Y,Float:Z;
//KillTimer(TimerUpdate[playerid]);
Delete3DTextLabel(Name3DText[playerid]);
CreateExplosionEx(playerid,0,12,1);
PlaySound(playerid,SOUND_AWARD_TRACK_STOP);
GetPlayerPos(playerid,X,Y,Z);
CreatePickup(1240,5,X,Y,Z);
GetPlayerName(playerid,playname,sizeof(playname));
GetPlayerName(killerid,killname,sizeof(killname));
SetPlayerColor(playerid,COLOR_BLACK);
HideProgressBarForPlayer(playerid, BarraKi[playerid]);
for(new i=0;i<MAX_PLAYERS;i++)
{
new iname[MAX_PLAYER_NAME];
GetPlayerName(i,iname,sizeof(iname));
if(betPlayer[i] == playerid)
{
format(string,sizeof(string),"You lost your bet on %s(%d).",playname,playerid);
SendClientMessage(i,COLOR_RED,string);
format(string,sizeof(string),"%s(%d) betted on you and he lost %d PdD!",iname,i,betMoney[i]);
SendClientMessage(playerid,COLOR_RED,string);
GameTextForPlayer(i,"~r~bet lost",2000,5);
PlaySound(playerid,SOUND_SLAP);
betPlayer[i] = null;
betMoney[i] = 0;
}
if(betPlayer[i] == killerid)
{
format(string,sizeof(string),"You won your bet on %s(%d) and you won %d PdD!",killname,killerid,2*betMoney[i]);
SendClientMessage(i,COLOR_LIGHTBLUE,string);
format(string,sizeof(string),"%s(%d) betted on you and he won %d PdD! You'll recieve a BONUS of 20 PdD!",iname,i,2*betMoney[i]);
SendClientMessage(killerid,COLOR_LIGHTBLUE,string);
AddPlayerScore(i,2*betMoney[i]);
AddPlayerScore(killerid, 20);
GameTextForPlayer(i,"~g~bet Won",2000,5);