-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy patham_contact_requests.c4
23277 lines (22623 loc) · 672 KB
/
am_contact_requests.c4
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
// listener's C4 decompiler
void main() {
l_2 = 1;
l_3 = 134;
l_4 = 134;
l_5 = 1;
l_6 = 1;
l_7 = 1;
l_8 = 134;
l_9 = 1;
l_A = 12;
l_B = 12;
l_E = 0.001;
l_11 = -1;
l_14 = "NULL";
l_15 = 0.0;
l_19 = -0.0375;
l_1A = 0.17;
l_1C = 3;
l_1F = 80.0;
l_20 = 140.0;
l_21 = 180.0;
l_27 = 1;
l_28 = 65;
l_29 = 49;
l_2A = 64;
l_59 = (0.05 + 0.275) - 0.009999999999999998;
l_9F = -0.05;
l_A0 = 0.9200000166893;
l_A1 = 1.94;
l_A2 = 2.99;
l_A3 = 3.7;
l_2EA = -1;
if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS()) {
GAMEPLAY::NETWORK_SET_SCRIPT_IS_SAFE_FOR_NETWORK_GAME();
}
sub_285e0();
sub_279e0(l_320);
while (1) {
sub_279d3();
if (sub_27781()) {
sub_27582();
}
if (sub_2752f(PLAYER::PLAYER_ID())) {
sub_27582();
}
switch (sub_27524()) {
case 0:
if (sub_274a0()) {
sub_27058();
} else {
sub_27582();
}
break;
case 1:
if (sub_26f99()) {
sub_26ddc(l_A5._f1, l_A5, &l_28F, &l_28D, 45000, &l_2EB);
sub_3b08();
} else {
sub_27582();
}
break;
case 2:
if (l_210) {
if (!sub_3afc(&l_2F6)) {
sub_3ab7(&l_2F6, 0, 0);
}
if (!sub_3a59(&l_2F6, 500, 0)) {
if (CONTROLS::_GET_LAST_INPUT_METHOD(2)) {
CONTROLS::SET_INPUT_EXCLUSIVE(2, 176);
CONTROLS::SET_INPUT_EXCLUSIVE(2, 177);
CONTROLS::SET_INPUT_EXCLUSIVE(2, 237);
CONTROLS::SET_INPUT_EXCLUSIVE(2, 238);
}
}
}
sub_d54();
break;
case 4:
if (l_210) {
if (!sub_3a59(&l_2F6, 500, 0)) {
if (CONTROLS::_GET_LAST_INPUT_METHOD(2)) {
CONTROLS::SET_INPUT_EXCLUSIVE(2, 176);
CONTROLS::SET_INPUT_EXCLUSIVE(2, 177);
CONTROLS::SET_INPUT_EXCLUSIVE(2, 237);
CONTROLS::SET_INPUT_EXCLUSIVE(2, 238);
}
}
}
if (l_290) {
sub_b63(l_A5._f1, l_A5, &l_2EB);
l_290 = 0;
}
if (l_2EB._f2 == 0) {
if (!sub_b41()) {
g_2507F3._f267._fB = 1;
sub_27582();
}
} else if (!sub_b41()) {
if ((!GAMEPLAY::IS_STRING_NULL_OR_EMPTY(l_2EB)) && (!GAMEPLAY::IS_STRING_NULL_OR_EMPTY(l_2EB._f1))) {
sub_27d(l_A5._f1, l_2EB, l_2EB._f1, &l_2EB, GAMEPLAY::IS_BIT_SET(l_A5._f167, 19));
}
l_2EB._f2 = 0;
} else if (sub_3a59(&l_2EB._f4, 8000, 0)) {
l_2EB._f2 = 0;
}
break;
}
}
}
auto sub_27d(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5, auto a_6, auto a_7, auto a_8, auto a_9, auto a_10, auto a_11, auto a_12, auto a_13, auto a_14, auto a_15, auto a_16, auto a_17, auto a_18, auto a_19, auto a_20, auto a_21, auto a_22, auto a_23, auto a_24, auto a_25, auto a_26, auto a_27, auto a_28, auto a_29, auto a_30, auto a_31, auto a_32, auto a_33, auto a_34, auto a_35, auto a_36, auto a_37, auto a_38, auto a_39, auto a_40, auto a_41, auto a_42, auto a_43, auto a_44, auto a_45, auto a_46, auto a_47, auto a_48, auto a_49, auto a_50, auto a_51, auto a_52, auto a_53, auto a_54, auto a_55, auto a_56, auto a_57, auto a_58, auto a_59, auto a_60, auto a_61, auto a_62, auto a_63, auto a_64, auto a_65, auto a_66, auto a_67, auto a_68, auto a_69, auto a_70, auto a_71, auto a_72, auto a_73, auto a_74, auto a_75, auto a_76, auto a_77, auto a_78, auto a_79, auto a_80, auto a_81, auto a_82, auto a_83, auto a_84, auto a_85, auto a_86, auto a_87, auto a_88, auto a_89, auto a_90, auto a_91, auto a_92, auto a_93, auto a_94, auto a_95, auto a_96, auto a_97, auto a_98, auto a_99, auto a_100, auto a_101, auto a_102, auto a_103, auto a_104, auto a_105, auto a_106, auto a_107, auto a_108, auto a_109, auto a_110, auto a_111, auto a_112, auto a_113, auto a_114, auto a_115, auto a_116, auto a_117, auto a_118, auto a_119, auto a_120, auto a_121, auto a_122, auto a_123, auto a_124, auto a_125, auto a_126, auto a_127, auto a_128, auto a_129, auto a_130, auto a_131, auto a_132, auto a_133, auto a_134, auto a_135, auto a_136, auto a_137, auto a_138, auto a_139, auto a_140, auto a_141, auto a_142, auto a_143, auto a_144, auto a_145, auto a_146, auto a_147, auto a_148, auto a_149, auto a_150, auto a_151, auto a_152, auto a_153, auto a_154, auto a_155, auto a_156, auto a_157, auto a_158, auto a_159, auto a_160, auto a_161, auto a_162, auto a_163, auto a_164, auto a_165, auto a_166, auto a_167, auto a_168) {
if (!sub_b41()) {
a_A7 = "";
a_A7._f1 = "";
a_A7._f2 = 0;
if (!a_A8) {
return sub_af3(&a_0, a_A5, a_A6, 12, 0, 0, 0);
} else {
return sub_2de(&a_0, a_A5, a_A6, 12, 0, 0, 0);
}
} else {
a_A7 = a_A5;
a_A7._f1 = a_A6;
a_A7._f2 = 1;
}
return 0;
}
auto sub_2de(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5, auto a_6) {
sub_a9d(a_0, 145, a_1, a_4, a_5, a_6);
if (a_3 > 7) {
if (a_3 < 12) {
a_3 = 7;
}
}
g_3D67 = 0;
g_3D69 = 0;
g_3D6E = 0;
g_413F = 0;
g_4141 = 0;
g_4145 = 0;
g_280001 = 0;
return sub_32c(a_2, a_3, 0);
}
auto sub_32c(auto a_0, auto a_1, auto a_2) {
g_3D61 = 0;
if ((g_3D60 == 0) || (g_3D62 == 2)) {
if (g_3D60 != 0) {
if (a_1 > g_3D62) {
if (g_3D67 == 0) {
AUDIO::STOP_SCRIPTED_CONVERSATION(0);
g_384D._f1 = 3;
g_3D60 = 0;
g_3D61 = 1;
g_3D95 = 0;
g_3D5C = 0;
g_3D5D = 0;
g_3D6B = 0;
g_3D6A = 0;
g_384C = 0;
} else {
sub_a46();
return 0;
}
} else {
return 0;
}
}
if (AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING()) {
return 0;
}
if (sub_a0b(8, -1)) {
return 0;
}
g_3DAC/*{6}*/ = g_3DA6;
sub_9b5();
g_3A99/*{165}*/ = g_3B3E;
g_3D66 = g_3D67;
g_3D6D = g_3D6E;
g_280002 = g_280001;
g_3D6F/*{16}*/ = g_3D7F;
g_3D68 = g_3D69;
g_413E = g_413F;
g_4146/*{6}*/ = g_414C;
g_4140 = g_4141;
g_4142 = g_4143;
g_4144 = g_4145;
g_3BE3._f172 = g_413D;
g_3BE3._f170 = g_413B;
g_3BE3._f171 = g_413C;
g_3D5C = g_3D5D;
if (g_3D66) {
GAMEPLAY::CLEAR_BIT(&g_8EB, 20);
GAMEPLAY::CLEAR_BIT(&g_8EC, 17);
GAMEPLAY::CLEAR_BIT(&g_8ED, 0);
if (a_2) {
sub_77d();
if (g_C10[g_384D/*2811*/][0/*281*/]._f103 == 2) {
if (a_1 == 13) {
} else {
return 0;
}
}
if (g_384D._f1 > 3) {
return 0;
}
}
if (g_382B == 1) {
return 0;
}
if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID())) {
if (PED::IS_PED_IN_MELEE_COMBAT(PLAYER::PLAYER_PED_ID())) {
return 0;
}
if (sub_6e4()) {
return 0;
}
if (AI::IS_PED_SPRINTING(PLAYER::PLAYER_PED_ID())) {
return 0;
}
if (PED::IS_PED_RAGDOLL(PLAYER::PLAYER_PED_ID())) {
return 0;
}
if (PED::IS_PED_IN_PARACHUTE_FREE_FALL(PLAYER::PLAYER_PED_ID())) {
return 0;
}
if (WEAPON::GET_IS_PED_GADGET_EQUIPPED(PLAYER::PLAYER_PED_ID(), ${gadget_parachute})) {
return 0;
}
if (!g_10EC5) {
if (ENTITY::IS_ENTITY_IN_WATER(PLAYER::PLAYER_PED_ID())) {
return 0;
}
if (PLAYER::IS_PLAYER_CLIMBING(PLAYER::PLAYER_ID())) {
return 0;
}
if (PED::IS_PED_PLANTING_BOMB(PLAYER::PLAYER_PED_ID())) {
return 0;
}
if (PLAYER::IS_SPECIAL_ABILITY_ACTIVE(PLAYER::PLAYER_ID())) {
return 0;
}
}
}
if (sub_6bd()) {
return 0;
} else {
switch (g_384D._f1) {
case 7:
return 0;
break;
case 8:
return 0;
break;
case 9:
break;
case 10:
break;
default:
break;
}
if (GAMEPLAY::IS_BIT_SET(g_8EB, 9)) {
return 0;
}
}
sub_628();
g_3D6A = a_2;
}
g_3D62 = a_1;
g_3BE3/*"24"*/ = a_0;
g_38F2 = 0;
sub_5f8();
return 1;
} else {
if (g_3D60 == 5) {
return 0;
}
if ((a_1 < g_3D62) || (a_1 == g_3D62)) {
return 0;
} else {
if (a_1 == 2) {
} else {
sub_a46();
}
return 0;
}
}
}
void sub_5f8() {
for (v_2 = 0; v_2 <= 69; v_2 += 1) {
g_38F4[v_2/*6*/]/*"24"*/ = "";
}
AUDIO::STOP_SCRIPTED_CONVERSATION(0);
g_3D60 = 1;
}
void sub_628() {
g_3D95 = g_3D94;
g_3D8F = g_3D90;
g_3DBE/*{6}*/ = g_3DB2;
g_3DC4/*{6}*/ = g_3DB8;
g_3D97 = g_3D96;
g_3DDC/*{6}*/ = g_3DCA;
g_3DE2/*{6}*/ = g_3DD0;
g_3DE8/*{6}*/ = g_3DD6;
g_3DEE/*{6}*/ = g_3DF4;
g_63E = g_63F;
g_640 = g_641;
g_3D6B = g_3D6C;
g_3D6D = g_3D6E;
g_3D6F/*{16}*/ = g_3D7F;
g_3D64 = g_3D65;
g_4158 = 0;
g_3D91 = 0;
g_3D92 = 0;
GAMEPLAY::CLEAR_BIT(&g_8EC, 16);
}
auto sub_6bd() {
if ((g_384D._f1 == 1) || (g_384D._f1 == 0)) {
return 1;
} else {
return 0;
}
}
auto sub_6e4() {
if (g_10EC5) {
v_2 = 0;
WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), &v_3, 1);
if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID())) {
if (((v_3 == ${weapon_sniperrifle}) || (v_3 == ${weapon_heavysniper})) || (v_3 == ${weapon_remotesniper})) {
v_2 = 1;
}
}
if (CAM::IS_AIM_CAM_ACTIVE() && (v_2 == 1)) {
return 1;
} else {
return 0;
}
} else if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID())) {
if (PED::GET_PED_CONFIG_FLAG(PLAYER::PLAYER_PED_ID(), 78, 1)) {
return 1;
} else {
return 0;
}
} else {
return 1;
}
}
void sub_77d() {
if (sub_9a7(14)) {
if (!ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID())) {
if (ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()) == g_18A70._f7F07[0/*29*/]) {
g_384D = 0;
} else if (ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()) == g_18A70._f7F07[1/*29*/]) {
g_384D = 1;
} else if (ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()) == g_18A70._f7F07[2/*29*/]) {
g_384D = 2;
} else {
g_384D = 0;
}
}
} else {
g_384D = sub_81e();
if (g_384D == 145) {
g_384D = 3;
}
if (g_10EC5) {
g_384D = 3;
}
if (g_384D > 3) {
g_384D = 3;
}
}
}
auto sub_81e() {
sub_837();
return g_18A70._f6EA._f21B._fDDD;
}
void sub_837() {
if (ENTITY::DOES_ENTITY_EXIST(PLAYER::PLAYER_PED_ID())) {
if (sub_97d(g_18A70._f6EA._f21B._fDDD) != ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID())) {
v_2 = sub_940(PLAYER::PLAYER_PED_ID());
if (sub_934(v_2) && ((!sub_9a7(14)) || g_18658)) {
if ((g_18A70._f6EA._f21B._fDDD != v_2) && sub_934(g_18A70._f6EA._f21B._fDDD)) {
g_18A70._f6EA._f21B._fDDE = g_18A70._f6EA._f21B._fDDD;
}
g_18A70._f6EA._f21B._fDDF = v_2;
g_18A70._f6EA._f21B._fDDD = v_2;
return ;
}
} else {
if (g_18A70._f6EA._f21B._fDDD != 145) {
g_18A70._f6EA._f21B._fDDF = g_18A70._f6EA._f21B._fDDD;
}
return ;
}
}
g_18A70._f6EA._f21B._fDDD = 145;
}
auto sub_934(auto a_0) {
return a_0 < 3;
}
auto sub_940(auto a_0) {
if (ENTITY::DOES_ENTITY_EXIST(a_0)) {
v_4 = ENTITY::GET_ENTITY_MODEL(a_0);
for (v_3 = 0; v_3 <= 2; v_3 += 1) {
if (sub_97d(v_3) == v_4) {
return v_3;
}
}
}
return 145;
}
auto sub_97d(auto a_0) {
if (sub_934(a_0)) {
return g_18A70._f7F07[a_0/*29*/];
} else if (a_0 != 145) {}
return 0;
}
auto sub_9a7(auto a_0) {
return g_8B74 == a_0;
}
void sub_9b5() {
for (v_2 = 0; v_2 <= 15; v_2 += 1) {
g_3A99[v_2/*10*/] = 0;
g_3A99[v_2/*10*/]._f1/*"24"*/ = "";
g_3A99[v_2/*10*/]._f7 = 0;
g_3A99[v_2/*10*/]._f8 = 0;
}
g_3A99._fA1 = -99;
g_3A99._fA2/*{3}*/ = {0.0, 0.0, 0.0 };
}
auto sub_a0b(auto a_0, auto a_1) {
switch (a_0) {
case 5:
if (a_1 > -1) {
return g_146CF3._fCB[a_1/*1*/];
} else { }
break;
}
return GAMEPLAY::IS_BIT_SET(g_146CF3._f3B5, a_0);
}
void sub_a46() {
AUDIO::RESTART_SCRIPTED_CONVERSATION();
g_4153 = 0;
if ((AUDIO::IS_MOBILE_PHONE_CALL_ONGOING() || (g_384D._f1 == 9)) || (g_384C == 1)) {
AUDIO::STOP_SCRIPTED_CONVERSATION(0);
g_3D60 = 6;
g_384D._f1 = 3;
return ;
}
if (AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING()) {
AUDIO::STOP_SCRIPTED_CONVERSATION(1);
g_3D60 = 6;
return ;
}
}
void sub_a9d(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5) {
g_3B3E/*{165}*/ = a_0;
g_63F = a_1;
g_3DA6/*"24"*/ = a_2;
g_413D = a_5;
if (a_3 == 0) {
g_413B = 1;
g_4139 = 0;
} else {
g_413B = 0;
g_4139 = 1;
}
if (a_4 == 0) {
g_413C = 1;
g_413A = 0;
} else {
g_413C = 0;
g_413A = 1;
}
}
auto sub_af3(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5, auto a_6) {
sub_a9d(a_0, 145, a_1, a_4, a_5, a_6);
if (a_3 > 7) {
if (a_3 < 12) {
a_3 = 7;
}
}
g_3D67 = 0;
g_3D69 = 0;
g_3D6E = 0;
g_413F = 0;
g_4141 = 0;
g_4145 = 0;
g_280001 = 1;
return sub_32c(a_2, a_3, 0);
}
auto sub_b41() {
if ((g_3D60 != 0) || AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING()) {
return 1;
} else {
return 0;
}
}
void sub_b63(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5, auto a_6, auto a_7, auto a_8, auto a_9, auto a_10, auto a_11, auto a_12, auto a_13, auto a_14, auto a_15, auto a_16, auto a_17, auto a_18, auto a_19, auto a_20, auto a_21, auto a_22, auto a_23, auto a_24, auto a_25, auto a_26, auto a_27, auto a_28, auto a_29, auto a_30, auto a_31, auto a_32, auto a_33, auto a_34, auto a_35, auto a_36, auto a_37, auto a_38, auto a_39, auto a_40, auto a_41, auto a_42, auto a_43, auto a_44, auto a_45, auto a_46, auto a_47, auto a_48, auto a_49, auto a_50, auto a_51, auto a_52, auto a_53, auto a_54, auto a_55, auto a_56, auto a_57, auto a_58, auto a_59, auto a_60, auto a_61, auto a_62, auto a_63, auto a_64, auto a_65, auto a_66, auto a_67, auto a_68, auto a_69, auto a_70, auto a_71, auto a_72, auto a_73, auto a_74, auto a_75, auto a_76, auto a_77, auto a_78, auto a_79, auto a_80, auto a_81, auto a_82, auto a_83, auto a_84, auto a_85, auto a_86, auto a_87, auto a_88, auto a_89, auto a_90, auto a_91, auto a_92, auto a_93, auto a_94, auto a_95, auto a_96, auto a_97, auto a_98, auto a_99, auto a_100, auto a_101, auto a_102, auto a_103, auto a_104, auto a_105, auto a_106, auto a_107, auto a_108, auto a_109, auto a_110, auto a_111, auto a_112, auto a_113, auto a_114, auto a_115, auto a_116, auto a_117, auto a_118, auto a_119, auto a_120, auto a_121, auto a_122, auto a_123, auto a_124, auto a_125, auto a_126, auto a_127, auto a_128, auto a_129, auto a_130, auto a_131, auto a_132, auto a_133, auto a_134, auto a_135, auto a_136, auto a_137, auto a_138, auto a_139, auto a_140, auto a_141, auto a_142, auto a_143, auto a_144, auto a_145, auto a_146, auto a_147, auto a_148, auto a_149, auto a_150, auto a_151, auto a_152, auto a_153, auto a_154, auto a_155, auto a_156, auto a_157, auto a_158, auto a_159, auto a_160, auto a_161, auto a_162, auto a_163, auto a_164, auto a_165, auto a_166) {
switch (a_A5) {
case 12:
sub_27d(a_0, "CT_AUD", "MPCT_LShang", a_A6, 0);
break;
case 19:
sub_27d(a_0, "CT_AUD", "MPCT_LMhang", a_A6, 0);
break;
case 84:
sub_27d(a_0, "CT_AUD", "MPCT_Bhang", a_A6, 0);
break;
case 72:
if (sub_d25()) {
sub_27d(a_0, "CT_AUD", "MPCT_VhangF", a_A6, 0);
} else {
sub_27d(a_0, "CT_AUD", "MPCT_VhangM", a_A6, 0);
}
break;
case 70:
if (sub_d25()) {
sub_27d(a_0, "CT_AUD", "MPCT_LhangF", a_A6, 0);
} else {
sub_27d(a_0, "CT_AUD", "MPCT_LhangM", a_A6, 0);
}
break;
case 89:
sub_27d(a_0, "CT_AUD", "MPCT_MChang", a_A6, 0);
break;
case 85:
sub_27d(a_0, "CT_AUD", "MPCT_MWhang", a_A6, 0);
break;
case 18:
sub_27d(a_0, "CT_AUD", "MPCT_Shang", a_A6, 0);
break;
case 86:
sub_27d(a_0, "CT_AUD", "MPCT_Ghang", a_A6, 0);
break;
case 31:
sub_27d(a_0, "CT_AUD", "MPCT_Mhang", a_A6, 0);
break;
case 20:
sub_27d(a_0, "CT_AUD", "MPCT_Rhang", a_A6, 0);
break;
case 91:
sub_27d(a_0, "CT_AUD", "MPCT_INhang", a_A6, 0);
break;
case 41:
sub_27d(a_0, "CT_AUD", "MPCT_PGhang", a_A6, 0);
break;
case 82:
sub_27d(a_0, "BACALAU", "BACAL_HANG", a_A6, 1);
break;
}
}
auto sub_d25() {
return sub_d35(PLAYER::PLAYER_ID());
}
auto sub_d35(auto a_0) {
if (ENTITY::GET_ENTITY_MODEL(PLAYER::GET_PLAYER_PED(a_0)) == ${mp_f_freemode_01}) {
return 1;
}
return 0;
}
void sub_d54() {
switch (l_A5) {
case 12:
switch (l_A5._fB2) {
case 3:
sub_2ef3();
break;
}
break;
case 19:
switch (l_A5._fB2) {
case 1:
sub_2633();
break;
}
break;
case 85:
switch (l_A5._fB2) {
case 1:
sub_dc0();
break;
}
break;
}
}
void sub_dc0() {
if (sub_249b(0, -1, 0)) {
if (!GAMEPLAY::IS_BIT_SET(l_A5._f167, 4)) {
sub_f3b();
GAMEPLAY::SET_BIT(&l_A5._f167, 4);
}
}
if (sub_edc(1)) {
if (!sub_eb0(95, -1)) {
sub_e31(95, 1, -1, 1);
}
sub_27d(l_A5._f1, "CT_AUD", "MPCT_MERtar", &l_2EB, 0);
sub_e24(4);
}
}
void sub_e24(auto a_0) {
l_20E = a_0;
}
void sub_e31(auto a_0, auto a_1, auto a_2, auto a_3) {
if (sub_ea3()) {
v_6 = g_25F257[a_0/*5*/][sub_e63(a_2)/*1*/];
if (v_6 != 0) {
STATS::STAT_SET_BOOL(v_6, a_1, a_3);
}
}
}
auto sub_e63(auto a_0) {
v_3 = a_0;
if (v_3 == -1) {
v_4 = sub_e97();
if (v_4 > -1) {
g_25A2B7 = 0;
v_3 = v_4;
} else {
v_3 = 0;
g_25A2B7 = 1;
}
}
return v_3;
}
auto sub_e97() {
return g_1407EA;
}
auto sub_ea3() {
return 1;
return 0;
}
auto sub_eb0(auto a_0, auto a_1) {
v_4 = g_25F257[a_0/*5*/][sub_e63(a_1)/*1*/];
if (STATS::STAT_GET_BOOL(v_4, &v_5, -1)) {
return v_5;
}
return 0;
}
auto sub_edc(auto a_0) {
if ((g_180046._f6A[a_0/*1*/] != -1) && (g_180046._f6A[a_0/*1*/] == PLAYER::PLAYER_ID())) {
if ((a_0 == 0) || (a_0 == 1)) {
return 1;
} else if (GAMEPLAY::IS_BIT_SET(g_19F63F, a_0)) {
g_19F63F = 0;
g_19F63E = 0;
return 1;
}
}
return 0;
}
void sub_f3b() {
if (sub_2457(l_A5._f166, 0, 1)) {
sub_1fcd(0);
sub_1f82("STRING");
v_3/*"64"*/ = PLAYER::GET_PLAYER_NAME(l_A5._f166);
sub_1f27(v_3);
sub_1e7d(1, 1, 0, 0, 0);
sub_1e3e(1, 2, 1, 1, 1);
sub_1dff(0, 1, 0, 0, 0);
l_A5._fB5._f2 = 1;
l_A5._fB5._f45 = 1;
sub_110c(v_2, "GC_MENU8", 0, 1, 0, 0);
sub_fca(-1);
GAMEPLAY::SET_BIT(&l_A5._f167, 6);
} else {
GAMEPLAY::CLEAR_BIT(&l_A5._f167, 4);
l_A5._fB2 = 1;
}
}
void sub_fca(auto a_0) {
g_4369._f121F = 0;
g_4369._f1220 = 0;
for (v_3 = 0; v_3 < 12; v_3 += 1) {
g_4369._f12E2[v_3/*4*/]/*"16"*/ = "";
g_4369._f1313[v_3/*1*/] = -1;
g_4369._f1320[v_3/*1*/] = 344;
g_4369._f132D[v_3/*1*/] = 31;
}
g_4369._f133A = 0;
g_2708AA._f10/*"16"*/ = "";
g_2708AA._f14 = -1;
if (GAMEPLAY::IS_PC_VERSION()) {
if (!sub_106f(&v_4, 0, a_0)) {
return ;
}
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION(g_4369._f159A[v_4/*10*/], "TOGGLE_MOUSE_BUTTONS");
GRAPHICS::_PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_BOOL(0);
GRAPHICS::_POP_SCALEFORM_MOVIE_FUNCTION_VOID();
}
}
auto sub_106f(auto a_0, auto a_1, auto a_2) {
if (a_2 == -1) {
if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS() && NETWORK::NETWORK_GET_THIS_SCRIPT_IS_NETWORK_SCRIPT()) {
a_2 = NETWORK::_638A3A81733086DB();
}
}
v_5/*"64"*/ = SCRIPT::GET_THIS_SCRIPT_NAME();
v_5/*64*/ += a_2;
v_15 = GAMEPLAY::GET_HASH_KEY(&v_5);
v_17 = -1;
for (v_16 = 0; v_16 < 6; v_16 += 1) {
if (g_4369._f15D7[v_16/*1*/] == v_15) {
a_0 = v_16;
return 1;
} else if (g_4369._f15D7[v_16/*1*/] == 0) {
v_17 = v_16;
}
}
if (a_1) {
if (v_17 != -1) {
g_4369._f15D7[v_17/*1*/] = v_15;
a_0 = v_17;
return 1;
}
}
return 0;
}
void sub_110c(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5) {
if (g_4369._f13E0 > a_0) {
return ;
}
if (g_4369._f13E0 >= 128) {
return ;
}
if (g_4369._f13E2 >= 256) {
return ;
}
if (g_4369._f15EA < g_4369._f15E8) {
return ;
}
if (g_4369._f13E0 != a_0) {
g_4369._f13E0 = a_0;
g_4369._f13E1 = 0;
}
v_8 = g_4369._f133E[g_4369._f13E1/*1*/];
if (v_8 != 1) {
while ((g_4369._f13E1 < 4) && (v_8 != 1)) {
g_4369._f13E1 += 1;
v_8 = g_4369._f133E[g_4369._f13E1/*1*/];
}
if (v_8 != 1) {
return ;
}
}
g_4369._f49[g_4369._f13E2/*6*/]/*"24"*/ = a_1;
if ((!GAMEPLAY::IS_STRING_NULL_OR_EMPTY(a_1)) && (!UI::DOES_TEXT_LABEL_EXIST(a_1))) {}
g_4369._f64A[g_4369._f13E2/*1*/] = a_3;
g_4369._f74B[g_4369._f13E2/*1*/] = a_4;
g_4369._f13E2 += 1;
if (a_2 == 0) {
v_9 = sub_19a2(&g_4369._f49[g_4369._f13E2/*6*/]);
if (g_4369._f1351[g_4369._f13E1/*1*/]) {
sub_1315(26, 1, 0, &v_A, &v_B, 0);
v_9 += v_A * 2.0;
}
if (v_9 > g_4369._f134A[g_4369._f13E1/*1*/]) {
g_4369._f134A[g_4369._f13E1/*1*/] = v_9;
}
}
if (a_5) {
if (a_2 == 0) {
v_C = sub_12f9(&g_4369._f49[g_4369._f13E2/*6*/]);
if (v_C > g_4369._f15EC[a_0/*1*/]) {
g_4369._f15EC[a_0/*1*/] = v_C;
}
}
}
GAMEPLAY::SET_BIT(&g_4369._f135F[a_0/*1*/], g_4369._f13E1);
g_4369._f13E1 += 1;
g_4369._f15EB = 1;
g_4369._f15E9 = g_4369._f13E2 - 1;
g_4369._f15EA = 0;
g_4369._f15E8 = a_2;
}
auto sub_12f9(auto a_0) {
if (!UI::DOES_TEXT_LABEL_EXIST(a_0)) {}
return UI::_DB88A37483346780(0.35, 0);
}
auto sub_1315(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5) {
v_8 = sub_1965(a_0);
v_9 = sub_1562(a_0, a_1);
if (GAMEPLAY::GET_HASH_KEY(v_9) != 0) {
v_C = 1.0;
if (a_5) {
GRAPHICS::_GET_SCREEN_ACTIVE_RESOLUTION(&v_A, &v_B);
v_D = GRAPHICS::_GET_SCREEN_ASPECT_RATIO(0);
if (sub_1530()) {
v_A = SYSTEM::ROUND(__678_$BBDA792448DB5A89(v_B) * v_D);
}
v_E = __678_$BBDA792448DB5A89(v_A) / __678_$BBDA792448DB5A89(v_B);
v_C = v_E / v_D;
if (sub_1530()) {
v_C = 1.0;
}
if (SCRIPT::_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(${director_mode}) > 0) {
GRAPHICS::GET_SCREEN_RESOLUTION(&v_A, &v_B);
}
v_A = SYSTEM::ROUND(__678_$BBDA792448DB5A89(v_A) / v_C);
v_B = SYSTEM::ROUND(__678_$BBDA792448DB5A89(v_B) / v_C);
} else {
GRAPHICS::GET_SCREEN_RESOLUTION(&v_A, &v_B);
}
v_F/*{3}*/ = GRAPHICS::GET_TEXTURE_RESOLUTION(v_8, v_9);
v_F *= sub_1491(a_0) / v_C;
v_F._f1 *= sub_1491(a_0) / v_C;
if (!a_2) {
v_F -= 2.0;
v_F._f1 -= 2.0;
}
if (a_0 == 30) {
v_F = 288.0;
v_F._f1 = 106.0;
}
a_3 = (v_F / ((float)v_A)) * ((float)(v_A / v_B));
a_4 = ((v_F._f1 / ((float)v_B)) / (v_F / ((float)v_A))) * a_3;
if (!a_5) {
if ((!GRAPHICS::GET_IS_WIDESCREEN()) && (a_0 != 30)) {
a_3 *= 1.33;
}
}
if (a_0 == 29) {
if (a_3 > g_4368) {
a_4 *= g_4368 / a_3;
a_3 = g_4368;
}
}
return 1;
}
return 0;
}
auto sub_1491(auto a_0) {
switch (a_0) {
case 4:
case 5:
case 6:
case 7:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
case 17:
case 18:
case 19:
case 20:
case 26:
case 27:
case 28:
case 31:
case 32:
case 33:
case 49:
return 0.5;
break;
}
return 1.0;
}
auto sub_1530() {
GRAPHICS::_GET_SCREEN_ACTIVE_RESOLUTION(&v_2, &v_3);
v_4 = __678_$BBDA792448DB5A89(v_2) / __678_$BBDA792448DB5A89(v_3);
if (v_4 > 3.5) {
return 1;
} else {
return 0;
}
}
auto sub_1562(auto a_0, auto a_1) {
asm .vardef<F> 4, "[{\"offset\":0,\"value\":2}]"
if (!GAMEPLAY::IS_STRING_NULL_OR_EMPTY(&g_4369._f1A1A[a_0/*16*/])) {
return sub_195b(&g_4369._f1A1A[a_0/*16*/]);
}
switch (a_0) {
case 3:
v_4[0/*1*/] = "MP_hostCrown";
v_4[1/*1*/] = "MP_hostCrown";
break;
case 21:
v_4[0/*1*/] = "MP_SpecItem_Coke";
v_4[1/*1*/] = "MP_SpecItem_Coke";
break;
case 22:
v_4[0/*1*/] = "MP_SpecItem_Heroin";
v_4[1/*1*/] = "MP_SpecItem_Heroin";
break;
case 23:
v_4[0/*1*/] = "MP_SpecItem_Weed";
v_4[1/*1*/] = "MP_SpecItem_Weed";
break;
case 24:
v_4[0/*1*/] = "MP_SpecItem_Meth";
v_4[1/*1*/] = "MP_SpecItem_Meth";
break;
case 25:
v_4[0/*1*/] = "MP_SpecItem_Cash";
v_4[1/*1*/] = "MP_SpecItem_Cash";
break;
case 1:
v_4[0/*1*/] = "shop_NEW_Star";
v_4[1/*1*/] = "shop_NEW_Star";
break;
case 2:
v_4[0/*1*/] = "shop_NEW_Star";
v_4[1/*1*/] = "shop_NEW_Star";
break;
case 4:
v_4[0/*1*/] = "Shop_Tick_Icon";
v_4[1/*1*/] = "Shop_Tick_Icon";
break;
case 6:
v_4[0/*1*/] = "Shop_Box_CrossB";
v_4[1/*1*/] = "Shop_Box_Cross";
break;
case 7:
v_4[0/*1*/] = "Shop_Box_BlankB";
v_4[1/*1*/] = "Shop_Box_Blank";
break;
case 5:
v_4[0/*1*/] = "Shop_Box_TickB";
v_4[1/*1*/] = "Shop_Box_Tick";
break;
case 8:
v_4[0/*1*/] = "shop_NEW_Star";
v_4[1/*1*/] = "shop_NEW_Star";
break;
case 9:
v_4[0/*1*/] = "Shop_Clothing_Icon_B";
v_4[1/*1*/] = "Shop_Clothing_Icon_A";
break;
case 10:
v_4[0/*1*/] = "Shop_GunClub_Icon_B";
v_4[1/*1*/] = "Shop_GunClub_Icon_A";
break;
case 17:
v_4[0/*1*/] = "Shop_Ammo_Icon_B";
v_4[1/*1*/] = "Shop_Ammo_Icon_A";
break;
case 18:
v_4[0/*1*/] = "Shop_Armour_Icon_B";
v_4[1/*1*/] = "Shop_Armour_Icon_A";
break;
case 19:
v_4[0/*1*/] = "Shop_Health_Icon_B";
v_4[1/*1*/] = "Shop_Health_Icon_A";
break;
case 20:
v_4[0/*1*/] = "Shop_MakeUp_Icon_B";
v_4[1/*1*/] = "Shop_MakeUp_Icon_A";
break;
case 11:
v_4[0/*1*/] = "Shop_Tattoos_Icon_B";
v_4[1/*1*/] = "Shop_Tattoos_Icon_A";
break;
case 12:
v_4[0/*1*/] = "Shop_Garage_Icon_B";