-
Notifications
You must be signed in to change notification settings - Fork 6
/
ambient_sonar.c4
2750 lines (2628 loc) · 75.3 KB
/
ambient_sonar.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_12 = "NULL";
l_15 = 0.0;
l_19 = -0.0375;
l_1A = 0.17;
l_1E = 80.0;
l_1F = 140.0;
l_20 = 180.0;
l_23 = 3;
l_28 = 1;
l_29 = 1;
l_187 = -1;
l_188 = 5;
if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(210)) {
sub_4e0d();
}
if (SCRIPT::_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(${ambient_sonar}) > 1) {
SCRIPT::TERMINATE_THIS_THREAD();
}
sub_4db3(13);
sub_4d8f(0);
while (1) {
SYSTEM::WAIT(0);
sub_4d72(PLAYER::PLAYER_PED_ID());
switch (l_184) {
case 0:
sub_48cc();
break;
case 1:
sub_442b();
break;
case 2:
sub_eb();
break;
case 3:
sub_4e0d();
break;
}
}
}
void sub_eb() {
l_185 = 0;
if (sub_440b(PLAYER::PLAYER_PED_ID())) {
if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID())) {
if (sub_31f9(&l_2A, &l_37)) {
sub_1229();
} else if (PED::IS_PED_IN_ANY_SUB(PLAYER::PLAYER_PED_ID())) {
l_182 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 0);
sub_4d8f(1);
sub_726(0);
if (sub_440b(PLAYER::PLAYER_PED_ID())) {
if (sub_681(&l_2A, &l_37, ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1), &l_187)) {
sub_2e0();
}
}
PLAYER::SET_MAX_WANTED_LEVEL(0);
sub_2c7();
sub_2ba(1);
} else if (sub_440b(l_182)) {
if (SYSTEM::VDIST2(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1), ENTITY::GET_ENTITY_COORDS(l_182, 1)) > 62500.0) {
sub_29d();
} else if (!UI::DOES_BLIP_EXIST(l_183)) {
l_183 = sub_1cf(l_182, 0, 0);
UI::SET_BLIP_SPRITE(l_183, 308);
}
} else {
sub_2c7();
}
}
}
}
auto sub_1cf(auto a_0, auto a_1, auto a_2) {
return sub_1e2(a_0, !a_1, a_2);
}
auto sub_1e2(auto a_0, auto a_1, auto a_2) {
if (!ENTITY::DOES_ENTITY_EXIST(a_0)) {
return 0;
}
v_5 = UI::ADD_BLIP_FOR_ENTITY(a_0);
if (ENTITY::IS_ENTITY_A_VEHICLE(a_0)) {
UI::SET_BLIP_SCALE(v_5, sub_286(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 1.0, 1.0));
if (!a_2) {
UI::SET_BLIP_AS_FRIENDLY(v_5, a_1);
} else {
UI::SET_BLIP_COLOUR(v_5, 2);
}
} else if (ENTITY::IS_ENTITY_A_PED(a_0)) {
UI::SET_BLIP_SCALE(v_5, sub_286(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 0.7, 0.7));
UI::SET_BLIP_AS_FRIENDLY(v_5, a_1);
} else if (ENTITY::IS_ENTITY_AN_OBJECT(a_0)) {
UI::SET_BLIP_SCALE(v_5, sub_286(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 0.7, 0.7));
} else { }
return v_5;
}
auto sub_286(auto a_0, auto a_1, auto a_2) {
if (a_0) {
return a_1;
} else {
return a_2;
}
}
void sub_29d() {
sub_2c7();
if (ENTITY::DOES_ENTITY_EXIST(l_182)) {
ENTITY::SET_VEHICLE_AS_NO_LONGER_NEEDED(&l_182);
}
}
void sub_2ba(auto a_0) {
l_184 = a_0;
}
void sub_2c7() {
if (UI::DOES_BLIP_EXIST(l_183)) {
UI::REMOVE_BLIP(&l_183);
}
}
void sub_2e0() {
sub_2f9(sub_345(l_187), 1, 1);
l_186 = 1;
}
void sub_2f9(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4) {
g_41B2/*{3}*/ = a_0;
GAMEPLAY::CLEAR_BIT(&g_8EC, 30);
if (a_3) {
GAMEPLAY::SET_BIT(&g_8EC, 29);
} else {
GAMEPLAY::CLEAR_BIT(&g_8EC, 29);
}
if (a_4) {
GAMEPLAY::SET_BIT(&g_8ED, 1);
} else {
GAMEPLAY::CLEAR_BIT(&g_8ED, 1);
}
}
auto<3> sub_345(auto a_0) {
switch (a_0) {
case 0:
return {-1435.6099853515625, 5781.1201171875, -29.87 };
break;
case 1:
return {-1956.54, -1125.0699462890625, 37.21 };
break;
case 2:
return {2752.8798828125, -1212.78, 22.41 };
break;
case 3:
return {3188.04, -1668.18994140625, -146.88 };
break;
case 4:
return {2555.04, -2372.469970703125, -112.01 };
break;
case 5:
return {2945.9, 6537.41015625, -27.36 };
break;
case 6:
return {-1266.68994140625, 6261.75, 34.169999999999995 };
break;
case 7:
return {3034.719970703125, 6550.419921875, -35.2 };
break;
case 8:
return {1694.53, 6991.68994140625, 137.62 };
break;
case 9:
return {1233.43, 7081.14990234375, -141.72 };
break;
case 10:
return {-3413.72998046875, 830.22998046875, 12.95 };
break;
case 11:
return {1422.5, 6854.669921875, -38.2 };
break;
case 12:
return {-3345.1, 3547.8, 59.1 };
break;
case 13:
return {-3437.929931640625, 3069.57, 54.85 };
break;
case 14:
return {-2909.28, 4204.31982421875, -111.62 };
break;
case 15:
return {-3179.1201171875, 2151.28, -31.86 };
break;
case 16:
return {4146.08984375, 3825.860107421875, 40.96 };
break;
case 17:
return {2716.610107421875, 6956.91015625, 157.17 };
break;
case 18:
return {2487.5, 7001.68994140625, 143.56 };
break;
case 19:
return {-3043.22998046875, -212.16, 23.48 };
break;
case 20:
return {-2871.1, 4268.18994140625, -152.47 };
break;
case 21:
return {-777.21, 6726.7099609375, 30.89 };
break;
case 22:
return {-3008.33, 2877.72998046875, -27.76 };
break;
case 23:
return {1843.12, -1260.67, -22.17 };
break;
case 24:
return {-2591.6201171875, 470.34, 30.4 };
break;
case 25:
return {3824.99, 3729.169921875, -16.17 };
break;
case 26:
return {3885.43994140625, 3797.18994140625, -24.26 };
break;
case 27:
return {2153.9, -2826.3701171875, 50.76 };
break;
case 28:
return {1873.5, -3012.6, -47.0 };
break;
case 29:
return {-2325.06, 1046.6999999999998, 70.67 };
break;
}
return {0.0, 0.0, 0.0 };
}
auto sub_681(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5) {
v_8 = 0;
v_9 = 0.0;
v_A = -1.0;
for (v_8 = 0; v_8 < a_1; v_8 += 1) {
if (!sub_6e8(&a_0._f1, v_8)) {
v_9 = SYSTEM::VDIST2(a_2, a_1[v_8/*11*/]._f3);
if ((v_A == -1.0) || (v_9 < v_A)) {
a_5 = v_8;
v_A = v_9;
}
}
}
return a_5 != -1;
}
auto sub_6e8(auto a_0, auto a_1) {
if ((a_1 < 0) || (a_1 >= 64)) {
return 0;
}
if (a_1 <= 31) {
return GAMEPLAY::IS_BIT_SET(a_0, a_1);
}
return GAMEPLAY::IS_BIT_SET(a_0._f1, a_1 - 32);
}
auto sub_726(auto a_0) {
if (sub_75d(17, 0, 1, 0)) {
if (a_0 == 1) {
GAMEPLAY::SET_BIT(&g_8EC, 22);
} else {
GAMEPLAY::CLEAR_BIT(&g_8EC, 22);
}
return 1;
} else {
return 0;
}
}
auto sub_75d(auto a_0, auto a_1, auto a_2, auto a_3) {
if (g_10EC5) {
if ((a_0 != 17) && (a_0 != 3)) {
return 0;
}
if (!GAMEPLAY::IS_BIT_SET(g_270DEA, 14)) {
if (a_0 == 17) {
GAMEPLAY::SET_BIT(&g_270DEA, 14);
GAMEPLAY::SET_BIT(&g_270DEA, 16);
}
if (a_0 == 3) {
GAMEPLAY::SET_BIT(&g_270DEA, 14);
GAMEPLAY::SET_BIT(&g_270DEA, 15);
}
}
if (SCRIPT::_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(g_8F2[a_0/*15*/]._f9) > 0) {
GAMEPLAY::CLEAR_BIT(&g_270DEA, 14);
GAMEPLAY::CLEAR_BIT(&g_270DEA, 16);
GAMEPLAY::CLEAR_BIT(&g_270DEA, 15);
return 1;
} else {
return 0;
}
} else {
sub_fff();
if (g_384D._f1 == 9) {
return 0;
}
if (a_2 == 0) {
if (sub_fa5(0) == 1) {
return 0;
}
}
if (g_382B == 1) {
return 0;
}
if (g_384D._f1 == 7) {
return 0;
}
if (a_1 == 1) {}
if (!SCRIPT::IS_THREAD_ACTIVE(g_384A)) {
if (SCRIPT::_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(${cellphone_flashhand}) == 0) {
if (g_384D._f1 < 4) {
sub_f85("cellphone_flashhand");
if (SCRIPT::_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(${cellphone_flashhand}) == 0) {
g_384A = SYSTEM::START_NEW_SCRIPT("cellphone_flashhand", 1424);
}
SCRIPT::SET_SCRIPT_AS_NO_LONGER_NEEDED("cellphone_flashhand");
}
}
}
while (!g_383B) {
SYSTEM::WAIT(0);
}
sub_a76();
sub_92e();
if (SCRIPT::_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(g_8F2[a_0/*15*/]._f9) == 0) {
g_B49 = 0;
g_384D._f1 = 7;
sub_f85(&g_8F2[a_0/*15*/]._f5);
if (a_3) {
if (SCRIPT::_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(g_8F2[a_0/*15*/]._f9) == 0) {
g_384B = SYSTEM::START_NEW_SCRIPT(&g_8F2[a_0/*15*/]._f5, 3800);
}
} else if (SCRIPT::_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(g_8F2[a_0/*15*/]._f9) == 0) {
g_384B = SYSTEM::START_NEW_SCRIPT(&g_8F2[a_0/*15*/]._f5, 2552);
}
SCRIPT::SET_SCRIPT_AS_NO_LONGER_NEEDED(&g_8F2[a_0/*15*/]._f5);
return 1;
} else {
return 1;
}
}
}
void sub_92e() {
if (g_10EC5 == 0) {
g_8F2[14/*15*/]._f4 = -99;
g_8F2[4/*15*/]._f4 = -99;
if (g_2540A1) {
if (sub_a68(14)) {
sub_9b2(2, "CELL_2", 2, "appInternet", 6, 1, 1, 0, 0);
sub_9b2(14, "CELL_29", 7, "appMPJobListNEW", 12, 1, 1, 0, 0);
} else {
sub_9b2(14, "CELL_29", 2, "appMPJobListNEW", 12, 1, 1, 0, 0);
}
} else {
sub_9b2(4, "CELL_23", 2, "appChecklist", 39, 1, 1, 0, 0);
}
}
}
void sub_9b2(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) {
g_8F2[a_0/*15*/]/*"16"*/ = a_1;
g_8F2[a_0/*15*/]._f4 = a_2;
g_8F2[a_0/*15*/]._f5/*"16"*/ = a_3;
g_8F2[a_0/*15*/]._f9 = GAMEPLAY::GET_HASH_KEY(a_3);
g_8F2[a_0/*15*/]._fA = a_4;
g_8F2[a_0/*15*/]._fB = a_5;
g_8F2[a_0/*15*/]._fC = a_6;
g_8F2[a_0/*15*/]._fD = a_7;
g_8F2[a_0/*15*/]._fE = a_8;
if (g_8F2[a_0/*15*/]._fC == 0) {
g_8F2[a_0/*15*/]._fC = 0;
}
if (g_8F2[a_0/*15*/]._fD == 0) {
g_8F2[a_0/*15*/]._fD = 0;
}
if (g_8F2[a_0/*15*/]._fE == 0) {
g_8F2[a_0/*15*/]._fE = 0;
}
}
auto sub_a68(auto a_0) {
return g_8B74 == a_0;
}
void sub_a76() {
for (v_2 = 0; v_2 < 34; v_2 += 1) {
g_8F2[v_2/*15*/]._f4 = -99;
}
if (g_10EC5 == 0) {
v_3 = 0;
for (; v_4 < 147; v_4 += 1) {
if (g_18A70._f7F07[v_4/*29*/]._f13[g_384D/*1*/] == 1) {
v_3 = 1;
}
}
sub_9b2(7, "CELL_5", 0, "appEmail", 4, 1, 1, 0, 0);
sub_9b2(1, "CELL_1", 1, "appTextMessage", 2, 1, 1, 0, 0);
sub_9b2(4, "CELL_23", 2, "appChecklist", 39, 1, 1, 0, 0);
if (((g_8B74 == 15) && (sub_f5a(0) == 0)) && (g_8F0 == 0)) {
sub_9b2(20, "CELL_32", 3, "appSettings", 43, 1, 1, 0, 0);
g_38EE = 0;
g_8F1 = 255;
} else {
sub_9b2(20, "CELL_32", 3, "appSettings", 43, 1, 1, 0, 0);
g_38EE = 1;
g_8F1 = 42;
}
if (v_3 == 1) {
sub_9b2(0, "CELL_0", 4, "appContacts", 27, 1, 1, 0, 0);
} else {
sub_9b2(0, "CELL_0", 4, "appContacts", 5, 1, 1, 0, 0);
}
sub_9b2(10, "CELL_16", 5, "appSettings", 24, 1, 1, 0, 0);
sub_9b2(3, "CELL_7", 6, "appCamera", 1, 1, 1, 0, 0);
sub_9b2(2, "CELL_2", 7, "appInternet", 6, 1, 1, 0, 0);
if (g_18A70._f318D._f59 == 1) {
sub_9b2(17, "CELL_28", 8, "appTrackify", 42, 1, 1, 0, 0);
}
if (g_18A70._f318D._f58 == 1) {
sub_9b2(16, "CELL_25", 0, "appContacts", 40, 2, 1, 0, 0);
}
sub_9b2(25, "CELL_14", -99, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(9, "CELL_13", -99, "appContacts", 13, 2, 1, 0, 0);
sub_9b2(11, "CELL_14", -99, "appContacts", 8, 2, 1, 0, 0);
sub_9b2(27, "CELL_15", -99, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(28, "CELL_15", -99, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(29, "CELL_15", -99, "appSettings", 17, 2, 1, 0, 0);
sub_9b2(30, "CELL_15", -99, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(31, "CELL_15", -99, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(32, "CELL_15", -99, "appSettings", 17, 2, 1, 0, 0);
} else {
sub_9b2(7, "CELL_5", 0, "appMPEmail", 4, 1, 1, 0, 0);
sub_9b2(10, "CELL_16", 5, "appSettings", 24, 1, 1, 0, 0);
sub_9b2(1, "CELL_1", 1, "appTextMessage", 2, 1, 1, 0, 0);
sub_9b2(3, "CELL_7", 6, "appCamera", 1, 1, 1, 0, 0);
sub_9b2(2, "CELL_2", 7, "appInternet", 6, 1, 1, 0, 0);
sub_9b2(14, "CELL_29", 4, "appMPJobListNEW", 12, 1, 1, 0, 0);
sub_9b2(0, "CELL_0", 2, "appContacts", 5, 1, 1, 0, 0);
sub_9b2(21, "JIPMP_QJ", 3, "AppJIPMP", 14, 1, 1, 0, 0);
if (GAMEPLAY::IS_BIT_SET(g_270DEA, 4) == 1) {
sub_9b2(17, "CELL_28", 8, "appTrackify", 42, 1, 1, 0, 0);
}
sub_9b2(13, "CELL_35", -99, "appMPCopBackup", 39, 1, 1, 0, 0);
sub_9b2(13, "CELL_20", -99, "appMPCopBackup", 16, 1, 1, 0, 0);
sub_9b2(15, "CELL_18", -99, "appContacts", 8, 1, 1, 0, 0);
sub_9b2(9, "CELL_13", -99, "appContacts", 13, 2, 1, 0, 0);
sub_9b2(5, "CELL_4", -99, "appContacts", 12, 2, 1, 0, 0);
sub_9b2(23, "CELL_15", 0, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(24, "CELL_15", 1, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(25, "CELL_15", 2, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(26, "CELL_15", 3, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(27, "CELL_15", 4, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(28, "CELL_15", 5, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(29, "CELL_15", 6, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(30, "CELL_15", 7, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(31, "CELL_15", 8, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(32, "CELL_15", 9, "appContacts", 17, 2, 1, 0, 0);
sub_9b2(33, "CELL_15", 10, "appContacts", 17, 2, 1, 0, 0);
if ((!GAMEPLAY::IS_BIT_SET(g_270DEA, 4)) == 1) {
if (g_180235) {
sub_9b2(23, "CELL_CIRCBREAK", 8, "AppVLSI", 54, 1, 1, 0, 0);
} else if (GAMEPLAY::IS_BIT_SET(g_270DEA, 20) == 1) {
sub_9b2(23, "CELL_SIGHTS", 8, "AppSettings", 59, 1, 1, 0, 0);
} else if (GAMEPLAY::IS_BIT_SET(g_270DEA, 22) == 1) {
sub_9b2(23, "CELL_EXTRACT", 8, "AppExtraction", 58, 1, 1, 0, 0);
}
}
if ((((GAMEPLAY::IS_BIT_SET(g_270DEA, 4) == 0) && (g_180235 == 0)) && (GAMEPLAY::IS_BIT_SET(g_270DEA, 20) == 0)) && (GAMEPLAY::IS_BIT_SET(g_270DEA, 22) == 0)) {
sub_9b2(23, "CELL_BOSSAGE", 8, "appMPBossAgency", 57, 1, 1, 0, 0);
}
}
}
auto sub_f5a(auto a_0) {
if ((!a_0) && (SCRIPT::_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(${benchmark}) > 0)) {
return 1;
}
return GAMEPLAY::IS_BIT_SET(g_10FBD, 0);
}
void sub_f85(auto a_0) {
SCRIPT::REQUEST_SCRIPT(a_0);
while (!SCRIPT::HAS_SCRIPT_LOADED(a_0)) {
SYSTEM::WAIT(0);
}
}
auto sub_fa5(auto a_0) {
if (a_0 == 1) {
if (g_384D._f1 > 3) {
if (GAMEPLAY::IS_BIT_SET(g_8EB, 14)) {
return 1;
} else {
return 0;
}
} else {
return 0;
}
} else {
if (SCRIPT::_GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(${cellphone_flashhand}) > 0) {
return 1;
}
if (g_384D._f1 > 3) {
return 1;
} else {
return 0;
}
}
}
void sub_fff() {
if (sub_a68(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_10a0();
if (g_384D == 145) {
g_384D = 3;
}
if (g_10EC5) {
g_384D = 3;
}
if (g_384D > 3) {
g_384D = 3;
}
}
}
auto sub_10a0() {
sub_10b9();
return g_18A70._f6EA._f21B._fDDD;
}
void sub_10b9() {
if (ENTITY::DOES_ENTITY_EXIST(PLAYER::PLAYER_PED_ID())) {
if (sub_11ff(g_18A70._f6EA._f21B._fDDD) != ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID())) {
v_2 = sub_11c2(PLAYER::PLAYER_PED_ID());
if (sub_11b6(v_2) && ((!sub_a68(14)) || g_18658)) {
if ((g_18A70._f6EA._f21B._fDDD != v_2) && sub_11b6(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_11b6(auto a_0) {
return a_0 < 3;
}
auto sub_11c2(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_11ff(v_3) == v_4) {
return v_3;
}
}
}
return 145;
}
auto sub_11ff(auto a_0) {
if (sub_11b6(a_0)) {
return g_18A70._f7F07[a_0/*29*/];
} else if (a_0 != 145) {}
return 0;
}
void sub_1229() {
sub_1f6f(3, 250000);
sub_15cd(299, 0, 0);
sub_12ce(20, 1);
sub_1254();
sub_2ba(3);
}
void sub_1254() {
v_2 = sub_1281(65);
g_24C5EA[v_2/*83*/] = 65;
g_24C5EA[v_2/*83*/]._f12[0/*16*/]/*"64"*/ = "";
}
auto sub_1281(auto a_0) {
v_3 = 19;
for (v_4 = 0; v_4 <= 19; v_4 += 1) {
if (g_24C5EA[v_4/*83*/] == a_0) {
v_3 = v_4;
v_4 = 20;
} else if (g_24C5EA[v_4/*83*/] == 0) {
v_3 = v_4;
v_4 = 20;
}
}
return v_3;
}
auto sub_12ce(auto a_0, auto a_1) {
if (a_0 >= 70) {
return 0;
}
return sub_12e9(a_0, a_1);
}
auto sub_12e9(auto a_0, auto a_1) {
if (sub_a68(14) && (!sub_157d(a_0))) {
return 0;
}
if (PLAYER::HAS_ACHIEVEMENT_BEEN_PASSED(a_0) && (a_1 == 1)) {
return 0;
}
if ((g_6311 != 0) && (!g_10EC5)) {
return 0;
}
if (sub_156f(&g_270ECA)) {
if (sub_1530(&g_270ECA, a_0)) {
return 0;
}
if (sub_1386(&g_270ECA, a_0)) {
return 1;
}
} else {
if (!PLAYER::GIVE_ACHIEVEMENT_TO_PLAYER(a_0)) {
return 0;
}
if (PLAYER::HAS_ACHIEVEMENT_BEEN_PASSED(a_0)) {
return 1;
}
return 0;
}
return 0;
}
auto sub_1386(auto a_0, auto a_1) {
asm .vardef<F> 5, "[{\"type\":\"field\",\"value\":[{\"offset\":0,\"value\":70}]}]"
if (PLAYER::HAS_ACHIEVEMENT_BEEN_PASSED(a_1)) {
return 0;
}
if (sub_a68(14) && (!sub_157d(a_1))) {
return 0;
}
if (sub_1530(a_0, a_1)) {
return 0;
}
if (sub_1524(a_0) < 0.0) {
sub_1507(a_0, 0);
}
sub_14c3(&v_5);
v_4 = 0;
for (v_4 = 0; v_4 < (a_0 - 1); v_4 += 1) {
v_5[v_4 + 1/*1*/] = a_0[v_4/*1*/];
}
sub_1437(&v_5, a_1);
v_4 = 0;
for (v_4 = 0; v_4 < a_0; v_4 += 1) {
a_0[v_4/*1*/] = v_5[v_4/*1*/];
}
return 1;
}
auto sub_1437(auto a_0, auto a_1) {
if (PLAYER::HAS_ACHIEVEMENT_BEEN_PASSED(a_1)) {
return 0;
}
if (sub_a68(14) && (!sub_157d(a_1))) {
return 0;
}
if (sub_1530(a_0, a_1)) {
return 0;
}
if (sub_1524(a_0) < 0.0) {
sub_1507(a_0, 0);
}
for (v_4 = 0; v_4 < a_0; v_4 += 1) {
if (sub_14b2(a_0, v_4)) {
a_0[v_4/*1*/] = a_1;
return 1;
}
}
return 0;
}
auto sub_14b2(auto a_0, auto a_1) {
return a_0[a_1/*1*/] == 70;
}
void sub_14c3(auto a_0) {
for (v_3 = 0; v_3 < a_0; v_3 += 1) {
sub_14f7(a_0, v_3);
}
sub_1507(a_0, g_270EC9 - 0.5);
}
void sub_14f7(auto a_0, auto a_1) {
a_0[a_1/*1*/] = 70;
}
void sub_1507(auto a_0, auto a_1) {
if (a_1 == 0.0) {
a_0._f48 = 0.0;
} else {
a_0._f48 = a_1;
}
}
auto sub_1524(auto a_0) {
return a_0._f48;
}
auto sub_1530(auto a_0, auto a_1) {
return sub_1542(a_0, a_1) != -1;
}
auto sub_1542(auto a_0, auto a_1) {
for (v_4 = 0; v_4 < a_0; v_4 += 1) {
if (a_0[v_4/*1*/] == a_1) {
return v_4;
}
}
return -1;
}
auto sub_156f(auto a_0) {
return a_0._f47 == 1;
}
auto sub_157d(auto a_0) {
switch (a_0) {
case 60:
case 61:
case 62:
case 63:
case 64:
case 65:
case 66:
case 67:
case 68:
case 69:
return 1;
}
return 0;
}
void sub_15cd(auto a_0, auto a_1, auto a_2) {
if (a_0 < 0) {}
if ((a_0 == 321) || (a_0 > 321)) {
} else {
sub_1c1d(891 + a_0, 1, -1, 1);
}
v_5 = 1;
if (g_18A70._f227C[a_0/*12*/]._f5 == 1) {
if ((g_18A70._f227C[a_0/*12*/]._f6 == 11) || (g_18A70._f227C[a_0/*12*/]._f6 == 12)) {
v_5 = 0;
}
} else {
g_18A70._f227C[a_0/*12*/]._f5 = 1;
g_18A70._f227C[a_0/*12*/]._fA = a_1;
g_18A70._f227C[a_0/*12*/]._fB = a_2;
if (a_0 == 287) {
STATS::_11FF1C80276097ED(0x86267624, 50, 0);
}
if (a_0 == 286) {
STATS::_11FF1C80276097ED(0x52af42b, 50, 0);
}
if (a_0 == 299) {
STATS::_11FF1C80276097ED(0xe99d3d10, 50, 0);
}
}
if (v_5) {
sub_16b5();
}
}
void sub_16b5() {
v_2 = 0;
g_18968 = 0;
g_18969 = 0;
g_1896A = 0;
g_1896B = 0;
g_1896C = 0;
g_1896D = 0;
g_1896E = 0;
v_3 = 0.0;
v_4 = 0.0;
v_5 = 0.0;
v_6 = 0.0;
v_7 = 0.0;
v_8 = 0.0;
v_9 = 0.0;
v_A = g_18A70._f227C._fF0D;
g_18A70._f227C._fF0D = 0.0;
for (; v_2 < 321; v_2 += 1) {
if (g_18A70._f227C[v_2/*12*/]._f5 == 1) {
switch (g_18A70._f227C[v_2/*12*/]._f6) {
case 1:
g_18968 += 1;
v_3 += g_18A70._f227C[v_2/*12*/]._f4;
break;
case 3:
g_18969 += 1;
v_4 += g_18A70._f227C[v_2/*12*/]._f4;
break;
case 5:
g_1896A += 1;
v_5 += g_18A70._f227C[v_2/*12*/]._f4;
break;
case 7:
g_1896B += 1;
v_6 += g_18A70._f227C[v_2/*12*/]._f4;
break;
case 9:
g_1896C += 1;
v_7 += g_18A70._f227C[v_2/*12*/]._f4 * 4.0;
break;
case 11:
g_1896D += 1;
v_8 += g_18A70._f227C[v_2/*12*/]._f4;
break;
case 13:
g_1896E += 1;
v_9 += g_18A70._f227C[v_2/*12*/]._f4;
break;
default:
break;
}
}
}
if (g_18957 > 0) {
if (g_18968 == g_18957) {
v_3 = 55.0;
}
}
if (g_18958 > 0) {
if (g_18969 == g_18958) {
v_4 = 10.0;
}
}
if (g_18959 > 0) {
if (g_1896A == g_18959) {
v_5 = 0.0;
}
}
if (g_1895A > 0) {
if (g_1896B == g_1895A) {
v_6 = 10.0;
}
}
if (g_1895B > 0) {
if ((((g_1896C == g_1895B) || (((g_1895B * 10) / g_1896C) < 41)) || (g_1896C > g_1895E)) || (g_1896C == g_1895E)) {
if (!GAMEPLAY::IS_BIT_SET(g_18A70._f227C._fF10, 14)) {
if (g_1896C == g_1895B) {
STATS::_11FF1C80276097ED(0x817b5488, g_1895B, 0);
GAMEPLAY::SET_BIT(&g_18A70._f227C._fF10, 14);
}
}
v_7 = 5.0;
}
}
if (g_1895C > 0) {
if (g_1896D == g_1895C) {
v_8 = 15.0;
}
}
if (g_1895D > 0) {
if (g_1896E == g_1895D) {
v_9 = 5.0;
}
}
g_18A70._f227C._fF0D = (((((v_3 + v_4) + v_5) + v_6) + v_7) + v_8) + v_9;
if ((g_1896C > g_1895E) || (g_1896C == g_1895E)) {
v_B = g_1895E;
} else {
v_B = g_1896C;
}
STATS::STAT_SET_INT(0xc115f6b0, g_18968, 1);
STATS::STAT_SET_INT(0xe6fb1ebc, g_18957, 1);
STATS::STAT_SET_INT(0x4f5b53ba, g_18969, 1);
STATS::STAT_SET_INT(0x2053b0a0, g_18958, 1);
STATS::STAT_SET_INT(0x5d0e88a9, g_1896A, 1);
STATS::STAT_SET_INT(0x214a068c, g_18959, 1);
STATS::STAT_SET_INT(0xcd2d71f9, g_1896B, 1);
STATS::STAT_SET_INT(0xfec8b0d8, g_1895A, 1);
STATS::STAT_SET_INT(0x817b5488, v_B, 1);
STATS::STAT_SET_INT(0xf32498ea, g_1895E, 1);
STATS::STAT_SET_INT(0xf82362ef, g_1896E + g_1896D, 1);
STATS::STAT_SET_INT(0x83a486e8, g_1895D + g_1895C, 1);
g_1896F = (g_18968 * 100) / g_18957;
g_18971 = ((g_1896A + g_18969) * 100) / (g_18959 + g_18958);
g_18970 = ((g_1896B + v_B) * 100) / (g_1895A + g_1895E);
g_18972 = ((g_1896D + g_1896E) * 100) / (g_1895C + g_1895D);
STATS::STAT_SET_FLOAT(0x486cdcff, g_18A70._f227C._fF0D, 1);
STATS::STAT_SET_INT(0x6c11a0fd, g_1896F, 1);
STATS::STAT_SET_INT(0xb82247ac, g_18970, 1);
STATS::STAT_SET_INT(0x1ca274fa, g_18971, 1);
if ((v_A > 0.0) && (SYSTEM::FLOOR(v_A) < SYSTEM::FLOOR(g_18A70._f227C._fF0D))) {
sub_1bcc(13, SYSTEM::FLOOR(g_18A70._f227C._fF0D));
}
if (!DATAFILE::_BEDB96A7584AA8CF()) {
if (!g_10EC5) {
if (((sub_1bc1() == 2) == 0) && (!NETWORK::NETWORK_IS_GAME_IN_PROGRESS())) {
if (NETWORK::NETWORK_IS_CLOUD_AVAILABLE()) {
g_18966 = 0;
}
if (!g_D96B) {
sub_1b76();
}
}
}
}
}
auto sub_1b76() {
if (sub_f5a(0)) {
return 0;
}
if (g_16409._f8) {
if (g_16409._fA > 0) {
return 0;
}
} else if (g_16409._fA > 1) {
return 0;
}
g_16409._fA += 1;
return 1;
}
auto sub_1bc1() {
return g_621B;
}
auto sub_1bcc(auto a_0, auto a_1) {
if (a_0 < 0) {
return 0;
}
if (a_0 > 70) {
return 0;
}
if ((a_1 <= 0) || (a_1 > 100)) {
return 0;
}
v_4 = PLAYER::_1C186837D0619335(a_0);
if (a_1 > v_4) {
return PLAYER::_C2AFFFDABBDC2C5C(a_0, a_1);
} else { }
return 0;
}
auto sub_1c1d(auto a_0, auto a_1, auto a_2, auto a_3) {
if (a_2 == -1) {
a_2 = sub_1f63();
}
v_6 = 0;
if ((a_0 >= 0) && (a_0 < 192)) {
v_8 = STATS::_80C75307B1C42837(a_0 - 0, 0, 1, a_2);
v_7 = (a_0 - 0) - (STATS::_F4D8E7AC2A27758C(a_0 - 0) * 64);
v_6 = STATS::STAT_SET_BOOL_MASKED(v_8, a_1, v_7, a_3);
} else if ((a_0 >= 192) && (a_0 < 384)) {