-
Notifications
You must be signed in to change notification settings - Fork 6
/
am_boat_taxi.c4
3229 lines (3086 loc) · 97 KB
/
am_boat_taxi.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_17 = 80.0;
l_18 = 140.0;
l_19 = 180.0;
l_1C = 0.0;
l_20 = -0.0375;
l_21 = 0.17;
l_24 = 3;
l_28 = 1;
l_29 = 65;
l_2A = 49;
l_2B = 64;
l_59 = (0.05 + 0.275) - 0.009999999999999998;
l_435 = 15000;
if (NETWORK::NETWORK_IS_GAME_IN_PROGRESS()) {
if (!sub_503a(l_43C)) {
sub_4edd();
}
}
while (1) {
sub_4ed0();
if (sub_4c7e()) {
sub_4edd();
}
if (NETWORK::NETWORK_IS_IN_TUTORIAL_SESSION() != l_432) {
sub_4edd();
}
switch (sub_4c70(NETWORK::PARTICIPANT_ID_TO_INT())) {
case 0:
if (sub_4c64() == 1) {
sub_4b9d();
sub_4b51();
l_70[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/] = 1;
} else if (sub_4c64() == 4) {
l_70[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/] = 3;
}
break;
case 1:
sub_363d();
if (sub_4c64() == 1) {
sub_2acb();
} else if (sub_4c64() == 4) {
l_70[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/] = 3;
}
if (sub_2a73(l_5A._f2)) {
if (!ENTITY::IS_ENTITY_AT_COORD(PLAYER::PLAYER_PED_ID(), ENTITY::GET_ENTITY_COORDS(NETWORK::NET_TO_VEH(l_5A._f2), 1), 200.0, 200.0, 200.0, 0, 1, 0)) {
l_70[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/] = 4;
}
}
break;
case 3:
sub_2a54(&l_5A._f12);
if (sub_2a2b(&l_5A._f12)) {
l_70[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/] = 4;
}
break;
case 2:
l_70[NETWORK::PARTICIPANT_ID_TO_INT()/*3*/] = 4;
case 4:
sub_4edd();
break;
}
if (NETWORK::NETWORK_IS_HOST_OF_THIS_SCRIPT()) {
switch (sub_4c64()) {
case 0:
if (sub_2988(&l_5A._f10, 10000, 0)) {
if (!GAMEPLAY::IS_BIT_SET(l_5A, 12)) {
l_5A._f4 = PLAYER::PLAYER_ID();
l_5A._f5 = sub_2912();
l_5A._fA/*{3}*/ = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 0) + ({0.0, 5.0, 0.0 });
l_5A._f7/*{3}*/ = sub_25df(l_5A._f5);
GAMEPLAY::SET_BIT(&l_5A, 12);
}
if (sub_1b25()) {
sub_4b9d();
l_5A._f1 = 1;
}
}
sub_181f();
break;
case 1:
sub_16bd();
sub_1584();
sub_128e();
sub_181f();
if (sub_266()) {
l_5A._f1 = 4;
}
break;
case 4:
break;
}
}
}
}
auto sub_266() {
if (sub_27a()) {
return 1;
}
return 0;
}
auto sub_27a() {
if (sub_1277()) {
if ((l_5A._f15 >= 0) || (l_5A._f15 <= 3)) {
sub_3e3(sub_dc7(9), 7, 3, 1);
}
return 1;
}
if ((l_5A._f15 >= 0) || (l_5A._f15 <= 3)) {
if (NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(l_5A._f2)) {
if (!sub_2a73(l_5A._f2)) {
if (NETWORK::NETWORK_GET_DESTROYER_OF_NETWORK_ID(l_5A._f2, &v_2) == PLAYER::PLAYER_ID()) {
sub_3b1(1, 600000);
}
return 1;
}
} else {
return 1;
}
if (NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(l_5A._f3)) {
if (sub_392(l_5A._f3)) {
if (NETWORK::NETWORK_GET_DESTROYER_OF_NETWORK_ID(l_5A._f3, &v_3) == PLAYER::PLAYER_ID()) {
sub_3b1(1, 600000);
}
return 1;
}
} else {
return 1;
}
if (!sub_34e(PLAYER::PLAYER_ID(), 1, 1)) {
return 1;
}
}
return 0;
}
auto sub_34e(auto a_0, auto a_1, auto a_2) {
v_5 = a_0;
if (NETWORK::NETWORK_IS_PLAYER_ACTIVE(a_0)) {
if (a_1) {
if (!PLAYER::IS_PLAYER_PLAYING(a_0)) {
return 0;
}
}
if (a_2) {
if (!g_2507F3._f3[v_5/*1*/]) {
return 0;
}
}
return 1;
}
return 0;
}
auto sub_392(auto a_0) {
if (NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(a_0)) {
return PED::IS_PED_INJURED(NETWORK::NET_TO_PED(a_0));
}
return 1;
}
void sub_3b1(auto a_0, auto a_1) {
if (g_2507F3._fCD0[a_0/*1*/] < a_1) {
g_2507F3._fCD0[a_0/*1*/] = a_1;
}
GAMEPLAY::SET_BIT(&g_2507F3._fCCF, a_0);
}
void sub_3e3(auto a_0, auto a_1, auto a_2, auto a_3) {
v_6/*"16"*/ = sub_d23(a_1);
v_A/*"16"*/ = sub_c9a(a_2);
switch (a_1) {
case 0:
v_E = 0x4cbac3aa;
break;
case 1:
v_E = 0x29358006;
break;
case 2:
v_E = 0x5841cc24;
break;
case 3:
v_E = 0x5a26eaef;
break;
case 4:
v_E = 0x2183c4d7;
break;
case 5:
v_E = 0xf6c6f8d3;
break;
case 6:
v_E = 0xaec77375;
break;
case 7:
v_E = 0x267cbc1b;
break;
case 8:
v_E = 0x2dc5587f;
break;
case 9:
v_E = 0x8a91e076;
break;
case 10:
v_E = 0x2ad8ed30;
break;
case 11:
v_E = 0x8b70731d;
break;
case 12:
v_E = 0x3530c574;
break;
}
if (sub_c86()) {
sub_51f(v_E, a_0, &v_F, a_3, a_3, 0);
g_26FAE6[v_F/*72*/]._f8._f2B/*{4}*/ = v_6;
g_26FAE6[v_F/*72*/]._f8._f2F/*{4}*/ = v_A;
} else {
NETWORKCASH::NETWORK_REFUND_CASH(a_0, &v_6, &v_A, a_3);
}
}
void sub_51f(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5) {
if (!sub_c86()) {
return ;
}
v_8 = 1;
if (a_4) {
v_8 = 4;
} else if (a_3) {
v_8 = 2;
} else if (a_5) {
v_8 = 8;
}
switch (a_0) {
case 0x8180486d:
case 0x847b5e8a:
case 0x8f9e64e9:
case 0x92aeab9c:
case 0x978b277b:
case 0x9defcb5b:
case 0xad32107e:
case 0xaef994e9:
case 0xb3e76d2c:
case 0xb62639d4:
case 0xc571db3d:
case 0xca5e1b40:
case 0xcbbc5d1e:
case 0xd30e80f5:
case 0xd80064a4:
case 0xd86d0371:
case 0xdb72fd6e:
case 0xdd16a585:
case 0xe1286116:
case 0xe13b1f5a:
case 0xe7ba9a2c:
case 0xf2beff3e:
case 0xf54343ef:
case 0xfa3e19a3:
case 0x40e0f34:
case 0x108cd6ee:
case 0x10e398b4:
case 0x11611c06:
case 0x15dafb97:
case 0x1b14f96b:
case 0x25cfceff:
case 0x26c85ca3:
case 0x2a6b291e:
case 0x2c41a631:
case 0x3cf098e4:
case 0x3dc70f44:
case 0x3f79e8b3:
case 0x421452ff:
case 0x45f48c05:
case 0x467e2916:
case 0x48090eba:
case 0x5a58e3bd:
case 0x5d40f1f0:
case 0x601646d2:
case 0x61f840eb:
case 0x62a4b6cc:
case 0x6597c63c:
case 0x6da50854:
case 0x7323dab3:
case 0x73af3590:
case 0x741dadd0:
case 0x79d2be32:
case 0x7a31f111:
case 0x7f096f7d:
if (a_1 > 0) {
sub_841(a_2, 0xbc537e0d, 0x2005d9a9, 0x57de404e, a_0, a_1, v_8, 7);
}
break;
case 0x862fb02e:
case 0x89ad02ce:
case 0x8a91e076:
case 0x8b70731d:
case 0x8d682613:
case 0xa174f633:
case 0xa87819a3:
case 0xaca75aae:
case 0xaec77375:
case 0xb77dd8b4:
case 0xb8d124be:
case 0xb94ddb9b:
case 0xbcd304b8:
case 0xbfcbe6b6:
case 0xc2c5e339:
case 0xc4f96e65:
case 0xc84d30cc:
case 0xccfa5f2d:
case 0xcf63bf45:
case 0xd89979ee:
case 0xeaff75bd:
case 0xf353df93:
case 0xf6c6f8d3:
case 0xf97db87a:
case 0xfc71898e:
case 0xfc8d0020:
case 0xfd389995:
case 0xfe249573:
case 0x16b1cde:
case 0x6a679fe:
case 0xc92ecef:
case 0x129a5b6e:
case 0x176d9d54:
case 0x2183c4d7:
case 0x2195c3d1:
case 0x21ecda63:
case 0x267cbc1b:
case 0x29358006:
case 0x2ad8ed30:
case 0x2dc5587f:
case 0x3530c574:
case 0x381ae70b:
case 0x39b3a1a7:
case 0x3e7aa93e:
case 0x4cbac3aa:
case 0x4d8c639e:
case 0x506a6af5:
case 0x5841cc24:
case 0x5a26eaef:
case 0x5aef7c87:
case 0x5e0b0a1c:
case 0x60988977:
case 0x628502b3:
case 0x676706d3:
case 0x67878154:
case 0x6a22d039:
case 0x74ec47ce:
case 0x762d6bf6:
sub_841(a_2, 0xbc537e0d, 0x562592bb, 0x57de404e, a_0, a_1, v_8, 7);
break;
}
}
auto sub_841(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4, auto a_5, auto a_6, auto a_7) {
v_A = 0;
if (!sub_c86()) {
v_A = 1;
}
if (!v_A) {
if ((!UNK3::_B24F0944DA203D9E(sub_c7a())) || UNK3::_810E8431C0614BF9()) {
g_26FCCA = 1;
return 0;
}
if (g_254382) {
if ((a_3 == 0x3fa29128) || (a_3 == 0xb2491b6e)) {
g_26FCCB = 1;
return 0;
}
}
}
v_C = 0;
for (v_B = 0; v_B < 5; v_B += 1) {
if (g_26FAE6[v_B/*72*/]._f2 == 0) {
v_C = 1;
}
}
if (!v_C) {
return 0;
}
a_0 = 5;
v_D = 0x7fffffff;
if (v_A || UNK3::_3C5FD37B5499582E(&v_D, a_3, a_4, a_2, a_5, a_6)) {
if (v_A || UNK3::_39BE7CEA8D9CC8E6(v_D)) {
a_0 = sub_ba6(v_D, a_1, a_4, a_2, a_3, a_5, 0, a_6, a_7);
if (v_A) {
if (a_0 != -1) {
g_26FAE6[a_0/*72*/]._f41 = 1;
}
}
g_26FCC2 = 1;
return 1;
}
} else {
if ((a_7 & 2) != 0) {
g_26FCC9 = 1;
g_26FCCC = a_4;
g_26FCCE = a_3;
g_26FCCF = 1;
g_26FCCD = a_5;
}
if ((a_7 & 8) != 0) {
g_26FCCC = a_4;
g_26FCCE = a_3;
g_26FCCF = 1;
g_26FCCD = a_5;
}
v_E = 0;
if (v_E) {
sub_b92(1, a_4);
g_26FCC9 = 0;
}
if ((a_7 & 4) != 0) {
sub_9b5(-1, a_4, a_6, a_5, -1);
}
}
return 0;
}
void sub_9b5(auto a_0, auto a_1, auto a_2, auto a_3, auto a_4) {
switch (a_1) {
case 0x6597c63c:
GAMEPLAY::SET_BIT(&g_24E1AF[PLAYER::PLAYER_ID()/*306*/]._f79._f47, 0);
break;
}
if (a_0 != -1) {
sub_9ed(a_0);
}
}
void sub_9ed(auto a_0) {
v_3 = 0;
if (!sub_c86()) {
v_3 = 1;
}
if (a_0 != -1) {
if (sub_b6a(a_0)) {
if (!v_3) {
__678_$22A86DAAC9EDB234();
}
} else if (!v_3) {
UNK3::_E2A99A9B524BEFFF(g_26FAE6[a_0/*72*/]);
}
sub_a3f(&g_26FAE6[a_0/*72*/]);
}
}
void sub_a3f(auto a_0) {
a_0 = 0;
a_0 = 0x7fffffff;
a_0._f1 = 0;
a_0._f2 = 0;
a_0._f3 = 0xa10aed30;
a_0._f4 = 0x83b4a55b;
a_0._f5 = 0;
a_0._f6 = 0x492b4a93;
a_0._f7 = 0xbabfd2a5;
a_0._f8 = 0;
a_0._f8._f1 = 0;
a_0._f8._f2 = 0;
sub_b22(&a_0._f8._f3);
sub_b22(&a_0._f8._f10);
a_0._f8._f1D/*"32"*/ = "";
a_0._f8._f25/*"24"*/ = "";
a_0._f8._f2B/*"16"*/ = "";
a_0._f8._f2F/*"16"*/ = "";
a_0._f8._f33 = 0;
a_0._f8._f34 = 0;
a_0._f8._f35 = 0;
a_0._f8._f36 = 0;
a_0._f8._f37 = 0;
a_0._f8._f38 = 0;
a_0._f41 = 0;
a_0._f42 = 0;
a_0._f43 = 0;
a_0._f44 = 0;
a_0._f45 = 0;
a_0._f46 = 0;
a_0._f47 = 0;
}
void sub_b22(auto a_0) {
a_0 = 0;
a_0._f1 = 0;
a_0._f2 = 0;
a_0._f3 = 0;
a_0._f4 = 0;
a_0._f5 = 0;
a_0._f6 = 0;
a_0._f7 = 0;
a_0._f8 = 0;
a_0._f9 = 0;
a_0._fA = 0;
a_0._fB = 0;
a_0._fC = 0;
}
auto sub_b6a(auto a_0) {
if ((a_0 >= 0) && (a_0 < 5)) {
return g_26FAE6[a_0/*72*/]._f5 == 1;
}
return 0;
}
void sub_b92(auto a_0, auto a_1) {
g_254880 = a_1;
g_25487F = a_0;
}
auto sub_ba6(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) {
v_B = 0;
for (v_B = 0; v_B < 5; v_B += 1) {
if (g_26FAE6[v_B/*72*/]._f2 == 0) {
if (!sub_c86()) {
a_0 = v_B + 900;
}
g_26FAE6[v_B/*72*/]._f2 = 1;
g_26FAE6[v_B/*72*/]._f1 = a_5;
g_26FAE6[v_B/*72*/]._f3 = a_1;
g_26FAE6[v_B/*72*/]._f4 = a_2;
g_26FAE6[v_B/*72*/]._f7 = a_3;
g_26FAE6[v_B/*72*/]._f5 = 0;
g_26FAE6[v_B/*72*/] = a_0;
g_26FAE6[v_B/*72*/]._f6 = a_4;
g_26FAE6[v_B/*72*/]._f44 = a_8;
g_26FAE6[v_B/*72*/]._f43 = a_7;
g_26FAE6[v_B/*72*/]._f47 = 0;
g_26FCC2 = 0;
if (a_6) {
g_26FAE6[v_B/*72*/]._f5 = 1;
}
return v_B;
}
}
return -1;
}
auto sub_c7a() {
return g_1407EA;
}
auto sub_c86() {
if (GAMEPLAY::IS_PC_VERSION()) {
return 1;
}
return 0;
}
auto sub_c9a(auto a_0) {
switch (a_0) {
case 0:
return "NOTREACHTARGET";
break;
case 1:
return "TARGET_ESCAPE";
break;
case 2:
return "DELIVERY_FAIL";
break;
case 3:
return "NOT_USED";
break;
case 4:
return "TEAM_QUIT";
break;
case 5:
return "SERVER_ERROR";
break;
case 6:
return "RECEIVE_LJ_L";
break;
case 8:
return "CHALLENGE_PLAYER_LEFT";
break;
}
return "DEFAULT";
}
auto sub_d23(auto a_0) {
switch (a_0) {
case 0:
return "BACKUP_VAGOS";
case 1:
return "BACKUP_LOST";
case 2:
return "BACKUP_FAMILIES";
case 3:
return "HIRE_MUGGER";
case 4:
return "HIRE_MERCENARY";
case 5:
return "BUY_CARDROPOFF";
case 6:
return "HELI_PICKUP";
case 7:
return "BOAT_PICKUP";
case 8:
return "CLEAR_WANTED";
case 9:
return "HEAD_2_HEAD";
case 10:
return "CHALLENGE";
case 11:
return "SHARE_LAST_JOB";
}
return "DEFAULT";
}
auto sub_dc7(auto a_0) {
v_3 = 0;
if (sub_fe9(a_0) >= 0) {
v_3 = sub_fe9(a_0);
} else {
v_3 = sub_df1(a_0);
}
return v_3;
}
auto sub_df1(auto a_0) {
switch (a_0) {
case 1:
return 1000;
break;
case 10:
return 5000;
break;
case 11:
return 8000;
break;
case 8:
return 1000;
break;
case 0:
return 500;
break;
case 9:
return 250;
break;
case 13:
return 1000;
break;
case 12:
return 7500;
break;
case 2:
return 1000;
break;
case 14:
return 500;
break;
case 20:
if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 1) {
return 200;
} else if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 2) {
return 400;
} else if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 3) {
return 600;
} else if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 4) {
return 800;
} else if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 5) {
return 1000;
}
break;
case 6:
return 500;
break;
case 22:
return 200;
break;
case 23:
return 400;
break;
case 24:
return 700;
break;
case 25:
return 100;
break;
case 26:
return 1000;
break;
case 35:
return 5000;
break;
case 15:
return 0;
break;
case 17:
return 0;
break;
case 18:
return 0;
break;
case 19:
return 0;
break;
case 21:
return 0;
break;
case 36:
return 0;
break;
case 39:
return 200;
break;
case 40:
return 1000;
case 41:
return 750;
case 42:
return 0;
}
return 0;
}
auto sub_fe9(auto a_0) {
switch (a_0) {
case 1:
return g_40001._f13B3;
break;
case 10:
return g_40001._f100D;
break;
case 11:
return g_40001._f100E;
break;
case 8:
return g_40001._f100B;
break;
case 0:
return g_40001._fFFD;
break;
case 9:
return g_40001._f100C;
break;
case 13:
return g_40001._f1010;
break;
case 12:
return g_40001._f100F;
break;
case 2:
return g_40001._f1007;
break;
case 14:
return g_40001._f1011;
break;
case 20:
if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 1) {
return g_40001._f13BA;
} else if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 2) {
return g_40001._f13BB;
} else if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 3) {
return g_40001._f13BC;
} else if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 4) {
return g_40001._f13BD;
} else if (PLAYER::GET_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID()) == 5) {
return g_40001._f13BE;
}
break;
case 6:
return g_40001._f100A;
break;
case 22:
return g_40001._f1017;
break;
case 23:
return g_40001._f1018;
break;
case 24:
return g_40001._f1019;
break;
case 25:
return g_40001._f101A;
break;
case 26:
return g_40001._f101B;
break;
case 35:
return g_40001._f15F2;
break;
case 15:
return g_40001._f13B4;
break;
case 17:
return g_40001._f13B4;
break;
case 18:
return g_40001._f13B4;
break;
case 19:
return g_40001._f13B4;
break;
case 21:
return g_40001._f13B4;
break;
case 36:
return g_40001._f17C3;
break;
case 39:
return -1;
break;
case 40:
return g_40001._f2A12;
break;
case 41:
return g_40001._f2A13;
break;
case 42:
return g_40001._f2A14;
break;
}
return 0;
}
auto sub_1277() {
return g_1837E7[PLAYER::PLAYER_ID()/*410*/]._fB1 != 0;
}
void sub_128e() {
if (!NETWORK::NETWORK_IS_HOST_OF_THIS_SCRIPT()) {
return ;
}
if (l_5A._f14 != 7) {
if (sub_392(l_5A._f3) || (!sub_2a73(l_5A._f2))) {
l_5A._f14 = 7;
} else if (!PED::IS_PED_IN_VEHICLE(NETWORK::NET_TO_PED(l_5A._f3), NETWORK::NET_TO_VEH(l_5A._f2), 0)) {
l_5A._f14 = 7;
}
}
if ((!sub_392(l_5A._f3)) && sub_2a73(l_5A._f2)) {
if (l_5A._f14 != 1) {
if ((ENTITY::GET_ENTITY_HEALTH(NETWORK::NET_TO_VEH(l_5A._f2)) <= 600) || (ENTITY::GET_ENTITY_HEALTH(NETWORK::NET_TO_PED(l_5A._f3)) <= 150)) {
l_5A._f14 = 1;
}
}
switch (l_5A._f14) {
case 2:
if (l_5A._f15 == 3) {
l_5A._f14 = 4;
} else if (l_5A._f15 == 5) {
l_5A._f14 = 7;
} else if ((!GAMEPLAY::IS_BIT_SET(l_5A, 7)) && ENTITY::IS_ENTITY_AT_ENTITY(NETWORK::NET_TO_PED(l_5A._f3), PLAYER::PLAYER_PED_ID(), 10.0, 10.0, 10.0, 0, 1, 0)) {
l_5A._f14 = 3;
}
break;
case 4:
GAMEPLAY::SET_BIT(&l_D1, 8);
if (VEHICLE::GET_VEHICLE_NUMBER_OF_PASSENGERS(NETWORK::NET_TO_VEH(l_5A._f2)) <= 0) {
l_5A._f14 = 3;
GAMEPLAY::CLEAR_BIT(&l_D1, 8);
} else if ((!GAMEPLAY::IS_BIT_SET(l_5A, 7)) && ENTITY::IS_ENTITY_AT_COORD(NETWORK::NET_TO_PED(l_5A._f3), l_5A._f7, 10.0, 10.0, 10.0, 0, 1, 0)) {
l_5A._f14 = 5;
}
break;
case 5:
if (((VEHICLE::GET_VEHICLE_NUMBER_OF_PASSENGERS(NETWORK::NET_TO_VEH(l_5A._f2)) <= 0) && (!PED::IS_PED_ON_SPECIFIC_VEHICLE(PLAYER::PLAYER_PED_ID(), NETWORK::NET_TO_VEH(l_5A._f2)))) && (sub_1528(PLAYER::PLAYER_PED_ID(), NETWORK::NET_TO_VEH(l_5A._f2), 1) >= 10.0)) {
l_5A._f14 = 6;
}
break;
case 3:
if (VEHICLE::GET_VEHICLE_NUMBER_OF_PASSENGERS(NETWORK::NET_TO_VEH(l_5A._f2)) >= 1) {
l_5A._f14 = 4;
}
break;
case 6:
if (((VEHICLE::GET_VEHICLE_NUMBER_OF_PASSENGERS(NETWORK::NET_TO_VEH(l_5A._f2)) <= 0) && (!PED::IS_PED_ON_SPECIFIC_VEHICLE(PLAYER::PLAYER_PED_ID(), NETWORK::NET_TO_VEH(l_5A._f2)))) && (sub_1528(PLAYER::PLAYER_PED_ID(), NETWORK::NET_TO_VEH(l_5A._f2), 1) >= 10.0)) {
if (AI::GET_SCRIPT_TASK_STATUS(NETWORK::NET_TO_PED(l_5A._f3), 0xe763797) == 1) {
l_5A._f14 = 7;
}
}
break;
case 1:
if ((AI::GET_SCRIPT_TASK_STATUS(NETWORK::NET_TO_PED(l_5A._f3), 0xe763797) == 1) && (sub_1528(PLAYER::PLAYER_PED_ID(), NETWORK::NET_TO_PED(l_5A._f3), 1) >= 10.0)) {
l_5A._f14 = 7;
}
break;
case 7:
break;
}
}
}
auto sub_1528(auto a_0, auto a_1, auto a_2) {
if (!ENTITY::IS_ENTITY_DEAD(a_0)) {
v_5/*{3}*/ = ENTITY::GET_ENTITY_COORDS(a_0, 1);
} else {
v_5/*{3}*/ = ENTITY::GET_ENTITY_COORDS(a_0, 0);
}
if (!ENTITY::IS_ENTITY_DEAD(a_1)) {
v_8/*{3}*/ = ENTITY::GET_ENTITY_COORDS(a_1, 1);
} else {
v_8/*{3}*/ = ENTITY::GET_ENTITY_COORDS(a_1, 0);
}
return GAMEPLAY::GET_DISTANCE_BETWEEN_COORDS(v_5, v_8, a_2);
}
void sub_1584() {
switch (l_5A._f15) {
case 0:
if (GAMEPLAY::IS_BIT_SET(l_5A, 8) || (VEHICLE::GET_VEHICLE_NUMBER_OF_PASSENGERS(NETWORK::NET_TO_VEH(l_5A._f2)) > 0)) {
l_5A._f15 = 1;
}
break;
case 1:
if (NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(l_5A._f2)) {
if (VEHICLE::GET_VEHICLE_NUMBER_OF_PASSENGERS(NETWORK::NET_TO_VEH(l_5A._f2)) > 0) {
l_5A._f15 = 2;
}
}
break;
case 2:
if (VEHICLE::GET_VEHICLE_NUMBER_OF_PASSENGERS(NETWORK::NET_TO_VEH(l_5A._f2)) > 0) {
l_5A._f15 = 3;
} else if (GAMEPLAY::IS_BIT_SET(l_5A, 10)) {
l_5A._f15 = 4;
}
break;
case 3:
if (NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(l_5A._f2)) {
if (VEHICLE::GET_VEHICLE_NUMBER_OF_PASSENGERS(NETWORK::NET_TO_VEH(l_5A._f2)) <= 0) {
l_5A._f15 = 1;
} else if (GAMEPLAY::IS_BIT_SET(l_5A, 10)) {
l_5A._f15 = 4;
}
}
break;
case 4:
if (NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(l_5A._f2)) {
if (((VEHICLE::GET_VEHICLE_NUMBER_OF_PASSENGERS(NETWORK::NET_TO_VEH(l_5A._f2)) <= 0) && (!PED::IS_PED_ON_SPECIFIC_VEHICLE(PLAYER::PLAYER_PED_ID(), NETWORK::NET_TO_VEH(l_5A._f2)))) && (sub_1528(PLAYER::PLAYER_PED_ID(), NETWORK::NET_TO_VEH(l_5A._f2), 1) >= 10.0)) {
l_5A._f15 = 5;
}
}
break;
case 5:
break;
}
}
void sub_16bd() {
GAMEPLAY::CLEAR_BIT(&l_5A, 9);
for (v_2 = 0; v_2 < NETWORK::_NETWORK_GET_NUM_PARTICIPANTS_HOST(); v_2 += 1) {
if (NETWORK::NETWORK_IS_PARTICIPANT_ACTIVE(PLAYER::INT_TO_PARTICIPANTINDEX(v_2))) {
v_3 = NETWORK::NETWORK_GET_PLAYER_INDEX(PLAYER::INT_TO_PARTICIPANTINDEX(v_2));
if (sub_34e(v_3, 1, 1)) {
if (sub_2a73(l_5A._f2)) {
if (!GAMEPLAY::IS_BIT_SET(l_5A, 8)) {
if (ENTITY::IS_ENTITY_AT_COORD(NETWORK::NET_TO_VEH(l_5A._f2), l_5A._fA, 10.0 * 1.5, 10.0 * 1.5, 10.0 * 1.5, 0, 1, 0)) {
GAMEPLAY::SET_BIT(&l_5A, 8);
}
}
if ((!GAMEPLAY::IS_BIT_SET(l_5A, 7)) || GAMEPLAY::IS_BIT_SET(l_5A, 11)) {
if (!GAMEPLAY::IS_BIT_SET(l_5A, 10)) {
if (ENTITY::IS_ENTITY_AT_COORD(NETWORK::NET_TO_VEH(l_5A._f2), l_5A._f7, 10.0 * 1.5, 10.0 * 1.5, 10.0 * 1.5, 0, 1, 0)) {
GAMEPLAY::SET_BIT(&l_5A, 10);
}
}
}
if (!GAMEPLAY::IS_BIT_SET(l_5A, 9)) {
if (GAMEPLAY::IS_BIT_SET(l_70[v_2/*3*/]._f1, 6)) {
GAMEPLAY::SET_BIT(&l_5A, 9);
GAMEPLAY::CLEAR_BIT(&l_70[v_2/*3*/]._f1, 6);
}
}
if (l_5A._f14 != 3) {
if (GAMEPLAY::IS_BIT_SET(l_70[v_2/*3*/]._f1, 5)) {
l_5A._f14 = 3;
GAMEPLAY::CLEAR_BIT(&l_70[v_2/*3*/]._f1, 5);
}
}
}
}
}
}
}
void sub_181f() {
if (((l_5A._f15 <= 2) || (l_5A._f14 == 2)) || (l_5A._f14 == 3)) {
v_2/*{3}*/ = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1);
if (((!WATER::GET_WATER_HEIGHT_NO_WAVES(v_2, &v_5)) || sub_1924()) || sub_187c()) {
l_5A._f1 = 4;
}