/
CopsAndTerrorists.pwn
3228 lines (2811 loc) · 128 KB
/
CopsAndTerrorists.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
// CopsAndTerrorists.pwn By Gammix
// An old gamemode of mine i hosted times ago!
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS \
50
#pragma dynamic \
10000
#if !defined KEY_AIM
#define KEY_AIM \
128
#endif
#if !defined IsValidVehicle
native IsValidVehicle(vehicleid);
#endif
#define ZMSG_HYPHEN_END \
""
#define ZMSG_HYPHEN_START \
""
#include <zmessage>
#include <zcmd>
#include <sscanf2>
#include <streamer>
#include <PreviewModelDialog>
#include <easyDialog>
#include <attachmentfix>
#include <dini2>
#include <progress2>
#define COLOR_WHITE (0xFFFFFFFF)
#define COLOR_TOMATO (0xFF6347FF)
#define COLOR_YELLOW (0xFFDD00FF)
#define COLOR_GREEN (0x00FF00FF)
#define COLOR_DEFAULT (0xA9C4E4FF)
#define COL_WHITE "{FFFFFF}"
#define COL_TOMATO "{FF6347}"
#define COL_YELLOW "{FFDD00}"
#define COL_GREEN "{00FF00}"
#define COL_DEFAULT "{A9C4E4}"
#define DIRECTORY \
""
#define MAX_SECURITY_QUESTIONS \
25
#define MAX_SECURITY_QUESTION_SIZE \
128
#define CAPTURE_TIME \
60
#define SET_ALPHA(%1,%2) \
((%1 & ~0xFF) | (clamp(%2, 0x00, 0xFF)))
main()
{
SetGameModeText("TDM - v1.6");
}
new DB:db;
enum
{
TEAM_COPS,
TEAM_TERRORISTS
};
enum
{
TEAM_COLOR_COPS = 0x095EE8FF,
TEAM_COLOR_TERRORISTS = 0xE80909FF
};
enum e_USER
{
e_USER_SQLID,
e_USER_PASSWORD[64 + 1],
e_USER_SALT[64 + 1],
e_USER_KILLS,
e_USER_DEATHS,
e_USER_MONEY,
e_USER_ADMIN_LEVEL,
e_USER_VIP_LEVEL,
e_USER_REGISTER_TIMESTAMP,
e_USER_LASTLOGIN_TIMESTAMP,
e_USER_SECURITY_QUESTION[MAX_SECURITY_QUESTION_SIZE],
e_USER_SECURITY_ANSWER[64 + 1]
};
new eUser[MAX_PLAYERS][e_USER];
new iPlayerLoginAttempts[MAX_PLAYERS];
new iPlayerAnswerAttempts[MAX_PLAYERS];
enum e_STATIC_PICKUP
{
e_STATIC_PICKUP_ID,
e_STATIC_PICKUP_MODEL,
Float:e_STATIC_PICKUP_AMOUNT,
e_STATIC_PICKUP_TIMER
}
new eStaticPickup[MAX_PICKUPS][e_STATIC_PICKUP];
new iStaticPickupCount;
enum e_CAPTURE_ZONE
{
e_CAPTURE_ZONE_NAME[35],
Float:e_CAPTURE_ZONE_POS[4],
Float:e_CAPTURE_ZONE_CPPOS[3],
e_CAPTURE_ZONE_OWNER,
e_CAPTURE_ZONE_ATTACKER,
e_CAPTURE_ZONE_TICK,
e_CAPTURE_ZONE_ID,
e_CAPTURE_ZONE_CPID,
e_CAPTURE_ZONE_TIMER,
e_CAPTURE_ZONE_PLAYERS
};
new eCaptureZone[][e_CAPTURE_ZONE] =
{
{"Cash Store", {607.3975, -523.7447, 676.2416, -476.0361}, {623.3041, -506.1986, 16.3525}, TEAM_TERRORISTS},
{"Drug Den", {673.9339, -650.8413, 717.4572, -606.4443}, {705.4277, -639.7715, 16.3359}, TEAM_COPS},
{"Houses", {726.5567, -598.6243, 836.5234, -477.0225}, {804.3663, -575.2430, 21.3363}, TEAM_TERRORISTS}
};
new PlayerText:ptxtCapture[MAX_PLAYERS] = {PlayerText:INVALID_TEXT_DRAW, ...};
new PlayerBar:pbarCapture[MAX_PLAYERS] = {INVALID_PLAYER_BAR_ID, ...};
new PlayerText:ptxtCaptureText[MAX_PLAYERS][2];
new tmrPlayerCaptureText[MAX_PLAYERS][2];
new iPlayerCaptureZone[MAX_PLAYERS];
enum e_WEAPON_SHOP
{
e_WEAPON_SHOP_MODEL,
e_WEAPON_SHOP_NAME[35],
e_WEAPON_SHOP_PRICE,
e_WEAPON_SHOP_AMMO
};
new const WEAPON_SHOP[][e_WEAPON_SHOP] =
{
{335, "Knife", 750, 1},
{341, "Chainsaw", 1500, 1},
{342, "Grenade", 1545, 1},
{343, "Moltove", 1745, 1},
{347, "Silenced 9mm", 1500, 150},
{348, "Desert Eagle", 3199, 150},
{350, "Sawnoff Shotgun", 4999, 100},
{351, "Combat Shotgun", 3870, 100},
{352, "Micro-UZI", 3500, 300},
{353, "MP5", 2999, 200},
{372, "Tec-9", 3500, 300},
{358, "Sniper Rifle", 4999, 50},
{355, "Ak47", 2999, 200},
{356, "M4", 3155, 200},
{359, "RPG", 1999, 1},
{361, "Flamethrower", 3500, 350},
{362, "Minigun", 10000, 350},
{363, "Satchel Charge", 1999, 2},
{365, "Spray Can", 800, 200},
{366, "Fire Extinguisher", 855, 200}
};
enum e_VEHICLE_SHOP
{
e_VEHICLE_SHOP_MODEL,
e_VEHICLE_SHOP_NAME[64],
e_VEHICLE_SHOP_PRICE
};
new const VEHICLE_SHOP[][e_VEHICLE_SHOP] =
{
{406, "Dumper", 15055},
{409, "Stretch", 19999},
{411, "Infernus", 26750},
{425, "Hunter", 100000},
{427, "Enforcer", 23599},
{432, "Rhino", 55099},
{434, "Hotknife", 17099},
{437, "Coach", 12050},
{444, "Monster", 19999},
{447, "Seasparrow", 48900},
{457, "Caddy", 8075},
{461, "PCJ-600", 14699},
{470, "Patriot", 10000},
{481, "BMX", 7777},
{494, "Hotring Racer", 25000},
{532, "Combine Harvester", 15870}
};
new bool:bPlayerGambleStarted[MAX_PLAYERS];
new iPlayerGambleBet[MAX_PLAYERS];
new iPlayerGambleRightCard[MAX_PLAYERS];
new sPlayerGambleCards[MAX_PLAYERS][3][64];
new PlayerText:ptxtGamble[MAX_PLAYERS][6];
new CARD[] = "ld_card:cdback";
new RED_CARD[] = "ld_card:cd13h";
new BLACK_CARD[] = "ld_card:cd13s";
new OTHER_CARD[] = "ld_bum:bum2";
new const Float:COPS_SPAWN[][4] =
{
{629.9655, -571.4874, 16.3359, 274.1459},
{613.8113, -602.2937, 17.2266, 273.8325},
{606.2744, -543.9374, 16.5985, 275.3991}
};
new const Float:TERRORISTS_SPAWN[][4] =
{
{691.7385, -470.5683, 16.5363, 180.1450},
{672.1321, -462.5963, 16.5363, 152.2346},
{653.6218, -439.0352, 16.3359, 200.8018}
};
new const HELMETS[] =
{
18936, 18937, 18938, 19101, 19102, 19103, 19104, 19105, 19106, 19107, 19108, 19109, 19110, 19111, 19112, 19113, 19114, 19115, 19116, 19117, 19118, 19119, 19120
};
enum
{
NORMAL_DAY,
CLOUDY_DAY,
RAINY_DAY
};
new iDayType;
new iWeather;
new iPlayerClassid[MAX_PLAYERS];
new iPlayerSkills[MAX_PLAYERS][11];
new PlayerText:ptxtDeathText[MAX_PLAYERS][2];
new tmrPlayerDeathText[MAX_PLAYERS];
new PlayerText:ptxtNotification[MAX_PLAYERS];
new tmrPlayerNotification[MAX_PLAYERS];
new iPlayerHeadshotData[MAX_PLAYERS][2];
new bool:bPlayerHelmet[MAX_PLAYERS];
new PlayerText:ptxtHelmet[MAX_PLAYERS];
new iPlayerOffRadar[MAX_PLAYERS][2];
new PlayerText:ptxtOffRadar[MAX_PLAYERS][2];
new iPlayerVehicleid[MAX_PLAYERS][3];
new iPlayerProtection[MAX_PLAYERS][2];
new Text3D:iPlayerProtection3DText[MAX_PLAYERS];
new PlayerText:ptxtProtection[MAX_PLAYERS][2];
new iPlayerSpree[MAX_PLAYERS];
IpToLong(const address[])
{
new parts[4];
sscanf(address, "p<.>a<i>[4]", parts);
return ((parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8) | parts[3]);
}
ReturnTimelapse(start, till)
{
new ret[32];
new seconds = till - start;
const
MINUTE = 60,
HOUR = 60 * MINUTE,
DAY = 24 * HOUR,
MONTH = 30 * DAY;
if (seconds == 1)
format(ret, sizeof(ret), "a second");
if (seconds < (1 * MINUTE))
format(ret, sizeof(ret), "%i seconds", seconds);
else if (seconds < (2 * MINUTE))
format(ret, sizeof(ret), "a minute");
else if (seconds < (45 * MINUTE))
format(ret, sizeof(ret), "%i minutes", (seconds / MINUTE));
else if (seconds < (90 * MINUTE))
format(ret, sizeof(ret), "an hour");
else if (seconds < (24 * HOUR))
format(ret, sizeof(ret), "%i hours", (seconds / HOUR));
else if (seconds < (48 * HOUR))
format(ret, sizeof(ret), "a day");
else if (seconds < (30 * DAY))
format(ret, sizeof(ret), "%i days", (seconds / DAY));
else if (seconds < (12 * MONTH))
{
new months = floatround(seconds / DAY / 30);
if (months <= 1)
format(ret, sizeof(ret), "a month");
else
format(ret, sizeof(ret), "%i months", months);
}
else
{
new years = floatround(seconds / DAY / 365);
if (years <= 1)
format(ret, sizeof(ret), "a year");
else
format(ret, sizeof(ret), "%i years", years);
}
return ret;
}
bool:IsPasswordSecure(const password[])
{
new bool:contain_number,
bool:contain_highercase,
bool:contain_lowercase;
for (new i, j = strlen(password); i < j; i++)
{
switch (password[i])
{
case '0'..'9':
contain_number = true;
case 'A'..'Z':
contain_highercase = true;
case 'a'..'z':
contain_lowercase = true;
}
if (contain_number && contain_highercase && contain_lowercase)
return true;
}
return false;
}
StaticPickup_Create(Float:x, Float:y, Float:z, model, Float:ammount, virtualworld = 0, expiretime = 0)
{
new i;
if (iStaticPickupCount == MAX_PICKUPS)
{
StaticPickup_Destroy(0);
}
i = iStaticPickupCount++;
eStaticPickup[i][e_STATIC_PICKUP_ID] = CreatePickup(model, 1, x, y, z, virtualworld);
eStaticPickup[i][e_STATIC_PICKUP_MODEL] = model;
eStaticPickup[i][e_STATIC_PICKUP_AMOUNT] = ammount;
if (expiretime > 0)
eStaticPickup[i][e_STATIC_PICKUP_TIMER] = SetTimerEx("StaticPickup_Destroy", expiretime, false, "i", i);
else
eStaticPickup[i][e_STATIC_PICKUP_TIMER] = -1;
return i;
}
forward StaticPickup_Destroy(pickupid);
public StaticPickup_Destroy(pickupid)
{
DestroyPickup(eStaticPickup[pickupid][e_STATIC_PICKUP_ID]);
if (eStaticPickup[pickupid][e_STATIC_PICKUP_TIMER] != -1)
{
KillTimer(eStaticPickup[pickupid][e_STATIC_PICKUP_TIMER]);
eStaticPickup[pickupid][e_STATIC_PICKUP_TIMER] = -1;
}
if (pickupid < (iStaticPickupCount - 1))
{
eStaticPickup[pickupid][e_STATIC_PICKUP_ID] = eStaticPickup[(iStaticPickupCount - 1)][e_STATIC_PICKUP_ID];
eStaticPickup[pickupid][e_STATIC_PICKUP_MODEL] = eStaticPickup[(iStaticPickupCount - 1)][e_STATIC_PICKUP_MODEL];
eStaticPickup[pickupid][e_STATIC_PICKUP_AMOUNT] = eStaticPickup[(iStaticPickupCount - 1)][e_STATIC_PICKUP_AMOUNT];
eStaticPickup[pickupid][e_STATIC_PICKUP_TIMER] = eStaticPickup[(iStaticPickupCount - 1)][e_STATIC_PICKUP_TIMER];
}
}
GetModelWeaponID(weaponid)
{
switch(weaponid)
{
case 331: return 1;
case 333: return 2;
case 334: return 3;
case 335: return 4;
case 336: return 5;
case 337: return 6;
case 338: return 7;
case 339: return 8;
case 341: return 9;
case 321: return 10;
case 322: return 11;
case 323: return 12;
case 324: return 13;
case 325: return 14;
case 326: return 15;
case 342: return 16;
case 343: return 17;
case 344: return 18;
case 346: return 22;
case 347: return 23;
case 348: return 24;
case 349: return 25;
case 350: return 26;
case 351: return 27;
case 352: return 28;
case 353: return 29;
case 355: return 30;
case 356: return 31;
case 372: return 32;
case 357: return 33;
case 358: return 34;
case 359: return 35;
case 360: return 36;
case 361: return 37;
case 362: return 38;
case 363: return 39;
case 364: return 40;
case 365: return 41;
case 366: return 42;
case 367: return 43;
case 368: return 44;
case 369: return 45;
case 371: return 46;
}
return -1;
}
GetWeaponModelID(weaponid)
{
switch(weaponid)
{
case 1: return 331;
case 2: return 333;
case 3: return 334;
case 4: return 335;
case 5: return 336;
case 6: return 337;
case 7: return 338;
case 8: return 339;
case 9: return 341;
case 10: return 321;
case 11: return 322;
case 12: return 323;
case 13: return 324;
case 14: return 325;
case 15: return 326;
case 16: return 342;
case 17: return 343;
case 18: return 344;
case 22: return 346;
case 23: return 347;
case 24: return 348;
case 25: return 349;
case 26: return 350;
case 27: return 351;
case 28: return 352;
case 29: return 353;
case 30: return 355;
case 31: return 356;
case 32: return 372;
case 33: return 357;
case 34: return 358;
case 35: return 359;
case 36: return 360;
case 37: return 361;
case 38: return 362;
case 39: return 363;
case 40: return 364;
case 41: return 365;
case 42: return 366;
case 43: return 367;
case 44: return 368;
case 45: return 369;
case 46: return 371;
}
return -1;
}
ShowDeathText(playerid, killerid, expiretime, bool:headshot)
{
if (tmrPlayerDeathText[playerid] != -1)
KillTimer(tmrPlayerDeathText[playerid]);
tmrPlayerDeathText[playerid] = SetTimerEx("OnDeathTextExpire", expiretime, false, "i", playerid);
if (tmrPlayerDeathText[killerid] != -1)
KillTimer(tmrPlayerDeathText[killerid]);
tmrPlayerDeathText[killerid] = SetTimerEx("OnDeathTextExpire", expiretime, false, "i", killerid);
new name[MAX_PLAYER_NAME],
string[64];
if (headshot)
PlayerTextDrawSetString(playerid, ptxtDeathText[playerid][0], "~w~You got ~b~headshot ~w~by");
else
PlayerTextDrawSetString(playerid, ptxtDeathText[playerid][0], "~w~You were ~r~killed ~w~by");
PlayerTextDrawShow(playerid, ptxtDeathText[playerid][0]);
GetPlayerName(killerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s[%i]", name, killerid);
PlayerTextDrawSetString(playerid, ptxtDeathText[playerid][1], string);
PlayerTextDrawShow(playerid, ptxtDeathText[playerid][1]);
if (headshot)
PlayerTextDrawSetString(killerid, ptxtDeathText[killerid][0], "~w~You ~y~headshot");
else
PlayerTextDrawSetString(killerid, ptxtDeathText[killerid][0], "~w~You ~g~killed");
PlayerTextDrawShow(killerid, ptxtDeathText[killerid][0]);
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s[%i]", name, playerid);
PlayerTextDrawSetString(killerid, ptxtDeathText[killerid][1], string);
PlayerTextDrawShow(killerid, ptxtDeathText[killerid][1]);
}
forward OnDeathTextExpire(playerid);
public OnDeathTextExpire(playerid)
{
PlayerTextDrawHide(playerid, ptxtDeathText[playerid][0]);
PlayerTextDrawHide(playerid, ptxtDeathText[playerid][1]);
tmrPlayerDeathText[playerid] = -1;
}
ShowCaptureText(playerid, index, text[], expiretime)
{
if (tmrPlayerCaptureText[playerid][index] != -1)
KillTimer(tmrPlayerCaptureText[playerid][index]);
tmrPlayerCaptureText[playerid][index] = SetTimerEx("OnCaptureTextExpire", expiretime, false, "ii", playerid, index);
PlayerTextDrawSetString(playerid, ptxtCaptureText[playerid][index], text);
PlayerTextDrawShow(playerid, ptxtCaptureText[playerid][index]);
}
forward OnCaptureTextExpire(playerid, index);
public OnCaptureTextExpire(playerid, index)
{
PlayerTextDrawHide(playerid, ptxtCaptureText[playerid][index]);
tmrPlayerCaptureText[playerid][index] = -1;
}
ShowNotification(playerid, text[], expiretime)
{
if (tmrPlayerNotification[playerid] != -1)
KillTimer(tmrPlayerNotification[playerid]);
if (!text[0] || text[0] == ' ')
{
OnNotificationExpire(playerid);
return;
}
if (expiretime > 0)
tmrPlayerNotification[playerid] = SetTimerEx("OnNotificationExpire", expiretime, false, "i", playerid);
PlayerTextDrawSetString(playerid, ptxtNotification[playerid], text);
PlayerTextDrawShow(playerid, ptxtNotification[playerid]);
}
forward OnNotificationExpire(playerid);
public OnNotificationExpire(playerid)
{
PlayerTextDrawHide(playerid, ptxtNotification[playerid]);
tmrPlayerNotification[playerid] = -1;
}
IsPlayerSpawned(playerid)
{
new Float:health;
GetPlayerHealth(playerid, health);
if (health <= 0.0)
return 0;
else if (GetPlayerState(playerid) == PLAYER_STATE_WASTED)
return 0;
else if (GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
return 0;
else
return 1;
}
public OnGameModeInit()
{
if (strlen(DIRECTORY) > 1 && !dini_Exists(DIRECTORY))
{
SendRconCommand("gmx");
return 0;
}
new string[1024];
if (!dini_Exists(DIRECTORY "config.ini"))
{
dini_Create(DIRECTORY "config.ini");
dini_Set(DIRECTORY "config.ini", "database_name", "database.db");
dini_IntSet(DIRECTORY "config.ini", "max_warnings", 5);
dini_IntSet(DIRECTORY "config.ini", "max_login_attempts", 3);
dini_IntSet(DIRECTORY "config.ini", "max_answer_attempts", 3);
dini_IntSet(DIRECTORY "config.ini", "max_pint", 700);
dini_IntSet(DIRECTORY "config.ini", "max_accounts", 3);
dini_IntSet(DIRECTORY "config.ini", "max_admin_level", 5);
dini_IntSet(DIRECTORY "config.ini", "max_vip_level", 3);
dini_IntSet(DIRECTORY "config.ini", "min_password_length", 4);
dini_IntSet(DIRECTORY "config.ini", "max_password_length", 45);
dini_IntSet(DIRECTORY "config.ini", "account_lock_minutes", 2);
dini_BoolSet(DIRECTORY "config.ini", "toggle_spectate_feed", true);
dini_BoolSet(DIRECTORY "config.ini", "toggle_secure_password", true);
dini_BoolSet(DIRECTORY "config.ini", "toggle_anti_spam", true);
dini_BoolSet(DIRECTORY "config.ini", "toggle_anti_advert", true);
dini_BoolSet(DIRECTORY "config.ini", "toggle_anti_caps", false);
dini_BoolSet(DIRECTORY "config.ini", "toggle_blacklist", true);
dini_BoolSet(DIRECTORY "config.ini", "toggle_read_cmd", false);
dini_BoolSet(DIRECTORY "config.ini", "toggle_read_pm", true);
dini_BoolSet(DIRECTORY "config.ini", "toggle_aka", true);
dini_BoolSet(DIRECTORY "config.ini", "toggle_admins_cmd", true);
dini_BoolSet(DIRECTORY "config.ini", "toggle_guest_login", true);
}
if (!dini_Exists(DIRECTORY "adminspawns.ini"))
{
string = "1435.8024,2662.3647,11.3926,1.1650\r\n";
strcat(string, "1457.4762,2773.4868,10.8203,272.2754\r\n");
strcat(string, "2101.4192,2678.7874,10.8130,92.0607\r\n");
strcat(string, "1951.1090,2660.3877,10.8203,180.8461\r\n");
strcat(string, "1666.6949,2604.9861,10.8203,179.8495\r\n");
strcat(string, "1860.9672,1030.2910,10.8203,271.6988\r\n");
strcat(string, "1673.2345,1316.1067,10.8203,177.7294\r\n");
strcat(string, "1412.6187,2000.0596,14.7396,271.3568");
new File:h = fopen(DIRECTORY "adminspawns.ini", io_write);
fwrite(h, string);
fclose(h);
}
if (!dini_Exists(DIRECTORY "questions.ini"))
{
string = "What was your childhood nickname?\r\n";
strcat(string, "What is the name of your favorite childhood friend?\r\n");
strcat(string, "In what city or town did your mother and father meet?\r\n");
strcat(string, "What is the middle name of your oldest child?\r\n");
strcat(string, "What is your favorite team?\r\n");
strcat(string, "What is your favorite movie?\r\n");
strcat(string, "What is the first name of the boy or girl that you first kissed?\r\n");
strcat(string, "What was the make and model of your first car?\r\n");
strcat(string, "What was the name of the hospital where you were born?\r\n");
strcat(string, "Who is your childhood sports hero?\r\n");
strcat(string, "In what town was your first job?\r\n");
strcat(string, "What was the name of the company where you had your first job?\r\n");
strcat(string, "What school did you attend for sixth grade?\r\n");
strcat(string, "What was the last name of your third grade teacher?");
new File:h = fopen(DIRECTORY "questions.ini", io_write);
fwrite(h, string);
fclose(h);
}
db_debug_openresults();
string = DIRECTORY;
strcat(string, dini_Get(DIRECTORY "config.ini", "database_name"));
db = db_open(string);
db_query(db, "PRAGMA synchronous = NORMAL");
db_query(db, "PRAGMA journal_mode = WAL");
string = "CREATE TABLE IF NOT EXISTS `users`(\
`id` INTEGER PRIMARY KEY, \
`name` VARCHAR(24) NOT NULL DEFAULT '', \
`ip` VARCHAR(18) NOT NULL DEFAULT '', \
`longip` INT NOT NULL DEFAULT '0', \
`password` VARCHAR(64) NOT NULL DEFAULT '', \
`salt` VARCHAR(64) NOT NULL DEFAULT '', \
`sec_question` VARCHAR("#MAX_SECURITY_QUESTION_SIZE") NOT NULL DEFAULT '', \
`sec_answer` VARCHAR(64) NOT NULL DEFAULT '', ";
strcat(string, "`register_timestamp` INT NOT NULL DEFAULT '0', \
`lastlogin_timestamp` INT NOT NULL DEFAULT '0', \
`kills` INT NOT NULL DEFAULT '0', \
`deaths` INT NOT NULL DEFAULT '0', \
`money` INT NOT NULL DEFAULT '0', \
`adminlevel` INT NOT NULL DEFAULT '0', \
`viplevel` INT NOT NULL DEFAULT '0')");
db_query(db, string);
string = "CREATE TABLE IF NOT EXISTS `user_skills` (\
`WEAPONSKILL_PISTOL` INT NOT NULL DEFAULT '0', \
`WEAPONSKILL_PISTOL_SILENCED` INT NOT NULL DEFAULT '0', \
`WEAPONSKILL_DESERT_EAGLE` INT NOT NULL DEFAULT '0', \
`WEAPONSKILL_SHOTGUN` INT NOT NULL DEFAULT '0', \
`WEAPONSKILL_SAWNOFF_SHOTGUN` INT NOT NULL DEFAULT '0', ";
strcat(string, "`WEAPONSKILL_SPAS12_SHOTGUN` INT NOT NULL DEFAULT '0', \
`WEAPONSKILL_MICRO_UZI` INT NOT NULL DEFAULT '0', \
`WEAPONSKILL_MP5` INT NOT NULL DEFAULT '0', \
`WEAPONSKILL_AK47` INT NOT NULL DEFAULT '0', \
`WEAPONSKILL_M4` INT NOT NULL DEFAULT '0', \
`WEAPONSKILL_SNIPERRIFLE` INT NOT NULL DEFAULT '0', \
`user_id` INT NOT NULL DEFAULT '-1')");
db_query(db, string);
db_query(db, "CREATE TABLE IF NOT EXISTS `temp_blocked_users` (\
`ip` VARCHAR(18) NOT NULL DEFAULT '', \
`lock_timestamp` INT NOT NULL DEFAULT '0', \
`user_id` INT NOT NULL DEFAULT '-1')");
EnableVehicleFriendlyFire();
DisableInteriorEnterExits();
UsePlayerPedAnims();
SetNameTagDrawDistance(20.0);
AddPlayerClass(4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 1
AddPlayerClass(5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 2
AddPlayerClass(9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 3
AddPlayerClass(18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 5
AddPlayerClass(28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 6
AddPlayerClass(66, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 7
AddPlayerClass(80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 8
AddPlayerClass(106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 10
AddPlayerClass(116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 11
AddPlayerClass(142, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 13
AddPlayerClass(178, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 14
AddPlayerClass(256, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 15
AddPlayerClass(280, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 1
AddPlayerClass(281, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 2
AddPlayerClass(282, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 3
AddPlayerClass(283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 4
AddPlayerClass(283, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 5
AddPlayerClass(286, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 8
AddPlayerClass(288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 9
AddPlayerClass(300, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 10
AddPlayerClass(302, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 11
AddPlayerClass(310, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 12
AddPlayerClass(311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); // 13
for (new i; i < sizeof(eCaptureZone); i++)
{
eCaptureZone[i][e_CAPTURE_ZONE_ID] = GangZoneCreate(eCaptureZone[i][e_CAPTURE_ZONE_POS][0], eCaptureZone[i][e_CAPTURE_ZONE_POS][1], eCaptureZone[i][e_CAPTURE_ZONE_POS][2], eCaptureZone[i][e_CAPTURE_ZONE_POS][3]);
eCaptureZone[i][e_CAPTURE_ZONE_CPID] = CreateDynamicCP(eCaptureZone[i][e_CAPTURE_ZONE_CPPOS][0], eCaptureZone[i][e_CAPTURE_ZONE_CPPOS][1], eCaptureZone[i][e_CAPTURE_ZONE_CPPOS][2], 5.0, 0, .streamdistance = 250.0);
CreateDynamicMapIcon(eCaptureZone[i][e_CAPTURE_ZONE_CPPOS][0], eCaptureZone[i][e_CAPTURE_ZONE_CPPOS][1], eCaptureZone[i][e_CAPTURE_ZONE_CPPOS][2], 19, 0, 0, .streamdistance = 700.0);
new label[65];
format(label, sizeof(label), "ZONE #%i\n%s", i, eCaptureZone[i][e_CAPTURE_ZONE_NAME]);
CreateDynamic3DTextLabel(label, SET_ALPHA(COLOR_TOMATO, 150), eCaptureZone[i][e_CAPTURE_ZONE_CPPOS][0], eCaptureZone[i][e_CAPTURE_ZONE_CPPOS][1], eCaptureZone[i][e_CAPTURE_ZONE_CPPOS][2], 50.0);
eCaptureZone[i][e_CAPTURE_ZONE_ATTACKER] = INVALID_PLAYER_ID;
}
BeginDay();
UpdateWeather();
SetTimer("BeginDay", (24 * 60 * 1000), true);
SetTimer("UpdateWeather", (30 * 60 * 1000), true);
return 1;
}
forward BeginDay();
public BeginDay()
{
#define PROBABILITY \
10
iDayType = random(PROBABILITY);
switch (iDayType)
{
case 0..(PROBABILITY - 3):
iDayType = NORMAL_DAY;
case (PROBABILITY - 2):
iDayType = CLOUDY_DAY;
case (PROBABILITY - 1):
iDayType = RAINY_DAY;
}
}
forward UpdateWeather();
public UpdateWeather()
{
new h, x;
gettime(h, x, x);
#pragma unused x
switch (h)
{
case 0..5:
iWeather = 23;
case 6..10:
{
switch (iDayType)
{
case NORMAL_DAY:
iWeather = 1;
case CLOUDY_DAY:
iWeather = 15;
case RAINY_DAY:
iWeather = 16;
}
}
case 11..14:
{
switch (iDayType)
{
case NORMAL_DAY:
iWeather = 3;
case CLOUDY_DAY:
iWeather = 17;
case RAINY_DAY:
iWeather = 9;
}
}
case 15..18:
{
switch (iDayType)
{
case NORMAL_DAY:
iWeather = 23;
case CLOUDY_DAY:
iWeather = 29;
case RAINY_DAY:
iWeather = 33;
}
}
case 19..24:
{
switch (iDayType)
{
case NORMAL_DAY:
iWeather = 2;
case CLOUDY_DAY:
iWeather = 36;
case RAINY_DAY:
iWeather = 36;
}
}
}
}
public OnGameModeExit()
{
db_close(db);
for (new i; i < iStaticPickupCount; i++)
StaticPickup_Destroy(i);
return 1;
}
public OnPlayerConnect(playerid)
{
iPlayerLoginAttempts[playerid] = 0;
iPlayerAnswerAttempts[playerid] = 0;
tmrPlayerDeathText[playerid] = -1;
tmrPlayerCaptureText[playerid][0] = -1;
tmrPlayerCaptureText[playerid][1] = -1;
for (new i; i < sizeof(iPlayerSkills[]); i++)
iPlayerSkills[playerid][i] = 0;
iPlayerCaptureZone[playerid] = -1;
iPlayerOffRadar[playerid][0] = 0;
iPlayerOffRadar[playerid][1] = -1;
tmrPlayerNotification[playerid] = -1;
ptxtDeathText[playerid][0] = CreatePlayerTextDraw(playerid, 321.000000, 328.000000, "~w~You were ~r~killed ~w~by");
PlayerTextDrawAlignment(playerid, ptxtDeathText[playerid][0], 2);
PlayerTextDrawBackgroundColor(playerid, ptxtDeathText[playerid][0], 255);
PlayerTextDrawFont(playerid, ptxtDeathText[playerid][0], 2);
PlayerTextDrawLetterSize(playerid, ptxtDeathText[playerid][0], 0.150000, 1.000000);
PlayerTextDrawColor(playerid, ptxtDeathText[playerid][0], -1);
PlayerTextDrawSetOutline(playerid, ptxtDeathText[playerid][0], 0);
PlayerTextDrawSetProportional(playerid, ptxtDeathText[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, ptxtDeathText[playerid][0], 1);
PlayerTextDrawSetSelectable(playerid, ptxtDeathText[playerid][0], 0);
ptxtDeathText[playerid][1] = CreatePlayerTextDraw(playerid, 321.000000, 337.000000, "RydEr[4]");
PlayerTextDrawAlignment(playerid, ptxtDeathText[playerid][1], 2);
PlayerTextDrawBackgroundColor(playerid, ptxtDeathText[playerid][1], 255);
PlayerTextDrawFont(playerid, ptxtDeathText[playerid][1], 1);
PlayerTextDrawLetterSize(playerid, ptxtDeathText[playerid][1], 0.250000, 1.400000);
PlayerTextDrawColor(playerid, ptxtDeathText[playerid][1], -1);
PlayerTextDrawSetOutline(playerid, ptxtDeathText[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, ptxtDeathText[playerid][1], 1);
PlayerTextDrawSetSelectable(playerid, ptxtDeathText[playerid][1], 0);
ptxtNotification[playerid] = CreatePlayerTextDraw(playerid, 10.000000, 150.000000, "~w~You have chossen team ~b~Cops~w~. You mission is to eliminate ~r~Terrorists ~w~and capture all their terroteries!");
PlayerTextDrawBackgroundColor(playerid, ptxtNotification[playerid], 0);
PlayerTextDrawFont(playerid, ptxtNotification[playerid], 1);
PlayerTextDrawLetterSize(playerid, ptxtNotification[playerid], 0.250000, 1.000000);
PlayerTextDrawColor(playerid, ptxtNotification[playerid], -1);
PlayerTextDrawSetOutline(playerid, ptxtNotification[playerid], 0);
PlayerTextDrawSetProportional(playerid, ptxtNotification[playerid], 1);
PlayerTextDrawSetShadow(playerid, ptxtNotification[playerid], 1);
PlayerTextDrawUseBox(playerid, ptxtNotification[playerid], 1);
PlayerTextDrawBoxColor(playerid, ptxtNotification[playerid], 150);
PlayerTextDrawTextSize(playerid, ptxtNotification[playerid], 220.000000, 0.000000);
PlayerTextDrawSetSelectable(playerid, ptxtNotification[playerid], 0);
pbarCapture[playerid] = CreatePlayerProgressBar(playerid, 44.000000, 318.000000, 89.500000, 3.700000, -1429936641, CAPTURE_TIME, 0);
ptxtCapture[playerid] = CreatePlayerTextDraw(playerid, 87.000000, 308.000000, "...");
PlayerTextDrawBackgroundColor(playerid, ptxtCapture[playerid], 255);
PlayerTextDrawFont(playerid, ptxtCapture[playerid], 1);
PlayerTextDrawLetterSize(playerid, ptxtCapture[playerid], 0.180000, 0.799999);
PlayerTextDrawColor(playerid, ptxtCapture[playerid], -1);
PlayerTextDrawAlignment(playerid, ptxtCapture[playerid], 2);
PlayerTextDrawSetOutline(playerid, ptxtCapture[playerid], 1);
ptxtCaptureText[playerid][0] = CreatePlayerTextDraw(playerid, 317.000000, 348.000000, "~g~We have won the turfwar against the ~b~~h~~h~~h~Grove ~g~in ~b~~h~~h~~h~Gangton ~g~(/turfs)");
PlayerTextDrawAlignment(playerid, ptxtCaptureText[playerid][0], 2);
PlayerTextDrawBackgroundColor(playerid, ptxtCaptureText[playerid][0], 255);
PlayerTextDrawFont(playerid, ptxtCaptureText[playerid][0], 1);
PlayerTextDrawLetterSize(playerid, ptxtCaptureText[playerid][0], 0.180000, 0.799999);
PlayerTextDrawColor(playerid, ptxtCaptureText[playerid][0], -1);
PlayerTextDrawSetOutline(playerid, ptxtCaptureText[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, ptxtCaptureText[playerid][0], 1);
PlayerTextDrawSetSelectable(playerid, ptxtCaptureText[playerid][0], 0);
ptxtCaptureText[playerid][1] = CreatePlayerTextDraw(playerid, 317.000000, 355.000000, "~r~We have lost the turfwar against the ~b~~h~~h~~h~Azetecas ~r~in ~b~~h~~h~~h~LS. Beach ~r~(/turfs)");
PlayerTextDrawAlignment(playerid, ptxtCaptureText[playerid][1], 2);
PlayerTextDrawBackgroundColor(playerid, ptxtCaptureText[playerid][1], 255);
PlayerTextDrawFont(playerid, ptxtCaptureText[playerid][1], 1);
PlayerTextDrawLetterSize(playerid, ptxtCaptureText[playerid][1], 0.180000, 0.799999);
PlayerTextDrawColor(playerid, ptxtCaptureText[playerid][1], -1);
PlayerTextDrawSetOutline(playerid, ptxtCaptureText[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, ptxtCaptureText[playerid][1], 1);
PlayerTextDrawSetSelectable(playerid, ptxtCaptureText[playerid][1], 0);
ptxtHelmet[playerid] = CreatePlayerTextDraw(playerid, 606.000000, 132.000000, "/Helmet: ~g~ON");
PlayerTextDrawAlignment(playerid, ptxtHelmet[playerid], 3);
PlayerTextDrawBackgroundColor(playerid, ptxtHelmet[playerid], 255);
PlayerTextDrawFont(playerid, ptxtHelmet[playerid], 1);
PlayerTextDrawLetterSize(playerid, ptxtHelmet[playerid], 0.239999, 1.199999);
PlayerTextDrawColor(playerid, ptxtHelmet[playerid], -1);
PlayerTextDrawSetOutline(playerid, ptxtHelmet[playerid], 1);
PlayerTextDrawSetProportional(playerid, ptxtHelmet[playerid], 1);
PlayerTextDrawSetPreviewModel(playerid, ptxtHelmet[playerid], 355);
PlayerTextDrawSetPreviewRot(playerid, ptxtHelmet[playerid], 0.000000, 0.000000, -50.000000, 1.000000);
PlayerTextDrawSetSelectable(playerid, ptxtHelmet[playerid], 0);
ptxtOffRadar[playerid][0] = CreatePlayerTextDraw(playerid, 606.000000, 111.000000, "/Offradar: ~g~ON");
PlayerTextDrawAlignment(playerid, ptxtOffRadar[playerid][0], 3);
PlayerTextDrawBackgroundColor(playerid, ptxtOffRadar[playerid][0], 255);
PlayerTextDrawFont(playerid, ptxtOffRadar[playerid][0], 1);
PlayerTextDrawLetterSize(playerid, ptxtOffRadar[playerid][0], 0.239999, 1.199999);
PlayerTextDrawColor(playerid, ptxtOffRadar[playerid][0], -1);
PlayerTextDrawSetOutline(playerid, ptxtOffRadar[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, ptxtOffRadar[playerid][0], 1);
PlayerTextDrawSetPreviewModel(playerid, ptxtOffRadar[playerid][0], 355);
PlayerTextDrawSetPreviewRot(playerid, ptxtOffRadar[playerid][0], 0.000000, 0.000000, -50.000000, 1.000000);
PlayerTextDrawSetSelectable(playerid, ptxtOffRadar[playerid][0], 0);
ptxtOffRadar[playerid][1] = CreatePlayerTextDraw(playerid,606.000000, 122.000000, "You'll be visible back in ~y~2m 18s");
PlayerTextDrawAlignment(playerid, ptxtOffRadar[playerid][1], 3);
PlayerTextDrawBackgroundColor(playerid, ptxtOffRadar[playerid][1], 255);
PlayerTextDrawFont(playerid, ptxtOffRadar[playerid][1], 1);
PlayerTextDrawLetterSize(playerid, ptxtOffRadar[playerid][1], 0.149999, 0.799998);
PlayerTextDrawColor(playerid, ptxtOffRadar[playerid][1], -1);
PlayerTextDrawSetOutline(playerid, ptxtOffRadar[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, ptxtOffRadar[playerid][1], 1);
PlayerTextDrawSetPreviewModel(playerid, ptxtOffRadar[playerid][1], 355);
PlayerTextDrawSetPreviewRot(playerid, ptxtOffRadar[playerid][1], 0.000000, 0.000000, -50.000000, 1.000000);
PlayerTextDrawSetSelectable(playerid, ptxtOffRadar[playerid][1], 0);
ptxtProtection[playerid][0] = CreatePlayerTextDraw(playerid, 319.000000, 189.000000, "Anti-Spawnkill Protection");
PlayerTextDrawAlignment(playerid, ptxtProtection[playerid][0], 2);
PlayerTextDrawBackgroundColor(playerid, ptxtProtection[playerid][0], 255);
PlayerTextDrawFont(playerid, ptxtProtection[playerid][0], 1);
PlayerTextDrawLetterSize(playerid, ptxtProtection[playerid][0], 0.199999, 1.199999);
PlayerTextDrawColor(playerid, ptxtProtection[playerid][0], -1);
PlayerTextDrawSetOutline(playerid, ptxtProtection[playerid][0], 1);
PlayerTextDrawSetProportional(playerid, ptxtProtection[playerid][0], 1);
PlayerTextDrawSetPreviewModel(playerid, ptxtProtection[playerid][0], 355);
PlayerTextDrawSetPreviewRot(playerid, ptxtProtection[playerid][0], 0.000000, 0.000000, -50.000000, 1.000000);
PlayerTextDrawSetSelectable(playerid, ptxtProtection[playerid][0], 0);
ptxtProtection[playerid][1] = CreatePlayerTextDraw(playerid, 320.000000, 197.000000, "10s");
PlayerTextDrawAlignment(playerid, ptxtProtection[playerid][1], 2);
PlayerTextDrawBackgroundColor(playerid, ptxtProtection[playerid][1], 255);
PlayerTextDrawFont(playerid, ptxtProtection[playerid][1], 1);
PlayerTextDrawLetterSize(playerid, ptxtProtection[playerid][1], 0.329999, 1.799999);
PlayerTextDrawColor(playerid, ptxtProtection[playerid][1], -16776961);
PlayerTextDrawSetOutline(playerid, ptxtProtection[playerid][1], 1);
PlayerTextDrawSetProportional(playerid, ptxtProtection[playerid][1], 1);
PlayerTextDrawSetPreviewModel(playerid, ptxtProtection[playerid][1], 355);
PlayerTextDrawSetPreviewRot(playerid, ptxtProtection[playerid][1], 0.000000, 0.000000, -50.000000, 1.000000);
PlayerTextDrawSetSelectable(playerid, ptxtProtection[playerid][1], 0);
// Gambling
ptxtGamble[playerid][0] = CreatePlayerTextDraw(playerid, 229.000000, 168.000000, "ld_spac:white");
PlayerTextDrawBackgroundColor(playerid, ptxtGamble[playerid][0], 255);
PlayerTextDrawFont(playerid, ptxtGamble[playerid][0], 4);
PlayerTextDrawLetterSize(playerid, ptxtGamble[playerid][0], 0.500000, 1.000000);
PlayerTextDrawColor(playerid, ptxtGamble[playerid][0], 255);
PlayerTextDrawSetOutline(playerid, ptxtGamble[playerid][0], 0);
PlayerTextDrawSetProportional(playerid, ptxtGamble[playerid][0], 1);
PlayerTextDrawSetShadow(playerid, ptxtGamble[playerid][0], 1);
PlayerTextDrawUseBox(playerid, ptxtGamble[playerid][0], 1);
PlayerTextDrawBoxColor(playerid, ptxtGamble[playerid][0], 255);
PlayerTextDrawTextSize(playerid, ptxtGamble[playerid][0], 54.000000, 74.000000);
PlayerTextDrawSetSelectable(playerid, ptxtGamble[playerid][0], 0);
ptxtGamble[playerid][1] = CreatePlayerTextDraw(playerid, 231.000000, 170.000000, "ld_card:cdback");
PlayerTextDrawBackgroundColor(playerid, ptxtGamble[playerid][1], 255);
PlayerTextDrawFont(playerid, ptxtGamble[playerid][1], 4);
PlayerTextDrawLetterSize(playerid, ptxtGamble[playerid][1], 0.500000, 1.000000);
PlayerTextDrawColor(playerid, ptxtGamble[playerid][1], -1);
PlayerTextDrawSetOutline(playerid, ptxtGamble[playerid][1], 0);
PlayerTextDrawSetProportional(playerid, ptxtGamble[playerid][1], 1);
PlayerTextDrawSetShadow(playerid, ptxtGamble[playerid][1], 1);
PlayerTextDrawUseBox(playerid, ptxtGamble[playerid][1], 1);
PlayerTextDrawBoxColor(playerid, ptxtGamble[playerid][1], 255);
PlayerTextDrawTextSize(playerid, ptxtGamble[playerid][1], 50.000000, 70.000000);
PlayerTextDrawSetSelectable(playerid, ptxtGamble[playerid][1], 1);
ptxtGamble[playerid][2] = CreatePlayerTextDraw(playerid, 289.000000, 168.000000, "ld_spac:white");
PlayerTextDrawBackgroundColor(playerid, ptxtGamble[playerid][2], 255);
PlayerTextDrawFont(playerid, ptxtGamble[playerid][2], 4);
PlayerTextDrawLetterSize(playerid, ptxtGamble[playerid][2], 0.500000, 1.000000);