-
Notifications
You must be signed in to change notification settings - Fork 50
/
am_imp_exp.c
21261 lines (19126 loc) · 414 KB
/
am_imp_exp.c
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
#region Local Var
var uLocal_0 = 0;
var uLocal_1 = 0;
int iLocal_2 = 0;
int iLocal_3 = 0;
int iLocal_4 = 0;
int iLocal_5 = 0;
int iLocal_6 = 0;
int iLocal_7 = 0;
int iLocal_8 = 0;
int iLocal_9 = 0;
int iLocal_10 = 0;
int iLocal_11 = 0;
float fLocal_12 = 0f;
var uLocal_13 = 0;
var uLocal_14 = 0;
int iLocal_15 = 0;
char* sLocal_16 = NULL;
var uLocal_17 = 0;
var uLocal_18 = 0;
var uLocal_19 = 0;
var uLocal_20 = 0;
float fLocal_21 = 0f;
float fLocal_22 = 0f;
float fLocal_23 = 0f;
var uLocal_24 = 0;
var uLocal_25 = 0;
int iLocal_26 = 0;
float fLocal_27 = 0f;
var uLocal_28 = 0;
var uLocal_29 = 0;
var uLocal_30 = 0;
float fLocal_31 = 0f;
float fLocal_32 = 0f;
var uLocal_33 = 0;
var uLocal_34 = 0;
var uLocal_35 = 0;
var uLocal_36 = 0;
int iLocal_37 = 0;
int iLocal_38 = 0;
int iLocal_39 = 0;
int iLocal_40 = 0;
var uLocal_41 = 0;
var uLocal_42 = 0;
var uLocal_43 = 0;
var uLocal_44 = 0;
var uLocal_45 = 0;
var uLocal_46 = 0;
var uLocal_47 = 0;
var uLocal_48 = 0;
var uLocal_49 = 0;
var uLocal_50 = 0;
var uLocal_51 = 0;
var uLocal_52 = 0;
var uLocal_53 = 0;
var uLocal_54 = 0;
var uLocal_55 = 0;
var uLocal_56 = 0;
var uLocal_57 = 0;
var uLocal_58 = 0;
float fLocal_59 = 0f;
var uLocal_60 = 0;
var uLocal_61 = 0;
var uLocal_62 = 0;
float fLocal_63 = 0f;
var uLocal_64 = 0;
var uLocal_65 = 0;
var uLocal_66 = 0;
var uLocal_67 = 0;
var uLocal_68 = 0;
var uLocal_69 = 0;
var uLocal_70 = 0;
var uLocal_71 = 0;
var uLocal_72 = 0;
var uLocal_73 = 0;
var uLocal_74 = 0;
var uLocal_75 = 0;
var uLocal_76 = 0;
var uLocal_77 = 0;
var uLocal_78 = 0;
var uLocal_79 = 0;
var uLocal_80 = 0;
var uLocal_81 = 0;
var uLocal_82 = 0;
var uLocal_83 = 0;
var uLocal_84 = 0;
var uLocal_85 = 0;
var uLocal_86 = 0;
var uLocal_87 = 0;
var uLocal_88 = 0;
var uLocal_89 = 0;
struct<15> Local_90 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
int iLocal_105 = 0;
bool bLocal_106 = 0;
bool bLocal_107 = 0;
int iLocal_108 = 0;
bool bLocal_109 = 0;
bool bLocal_110 = 0;
bool bLocal_111 = 0;
bool bLocal_112 = 0;
bool bLocal_113 = 0;
bool bLocal_114 = 0;
bool bLocal_115 = 0;
bool bLocal_116 = 0;
bool bLocal_117 = 0;
int iLocal_118 = 0;
int iLocal_119 = 0;
int iLocal_120 = 0;
int iLocal_121 = 0;
int iLocal_122 = 0;
bool bLocal_123 = 0;
bool bLocal_124 = 0;
int iLocal_125 = 0;
bool bLocal_126 = 0;
bool bLocal_127 = 0;
int iLocal_128 = 0;
int iLocal_129 = 0;
int iLocal_130 = 0;
int iLocal_131 = 0;
int iLocal_132 = 0;
int iLocal_133 = 0;
var uLocal_134 = 0;
var uLocal_135 = 0;
var uLocal_136 = 0;
var uLocal_137 = 0;
var uLocal_138 = 16;
var uLocal_139 = 0;
var uLocal_140 = 0;
var uLocal_141 = 0;
var uLocal_142 = 0;
var uLocal_143 = 0;
var uLocal_144 = 0;
var uLocal_145 = 0;
var uLocal_146 = 0;
var uLocal_147 = 0;
var uLocal_148 = 0;
var uLocal_149 = 0;
var uLocal_150 = 0;
var uLocal_151 = 0;
var uLocal_152 = 0;
var uLocal_153 = 0;
var uLocal_154 = 0;
var uLocal_155 = 0;
var uLocal_156 = 0;
var uLocal_157 = 0;
var uLocal_158 = 0;
var uLocal_159 = 0;
var uLocal_160 = 0;
var uLocal_161 = 0;
var uLocal_162 = 0;
var uLocal_163 = 0;
var uLocal_164 = 0;
var uLocal_165 = 0;
var uLocal_166 = 0;
var uLocal_167 = 0;
var uLocal_168 = 0;
var uLocal_169 = 0;
var uLocal_170 = 0;
var uLocal_171 = 0;
var uLocal_172 = 0;
var uLocal_173 = 0;
var uLocal_174 = 0;
var uLocal_175 = 0;
var uLocal_176 = 0;
var uLocal_177 = 0;
var uLocal_178 = 0;
var uLocal_179 = 0;
var uLocal_180 = 0;
var uLocal_181 = 0;
var uLocal_182 = 0;
var uLocal_183 = 0;
var uLocal_184 = 0;
var uLocal_185 = 0;
var uLocal_186 = 0;
var uLocal_187 = 0;
var uLocal_188 = 0;
var uLocal_189 = 0;
var uLocal_190 = 0;
var uLocal_191 = 0;
var uLocal_192 = 0;
var uLocal_193 = 0;
var uLocal_194 = 0;
var uLocal_195 = 0;
var uLocal_196 = 0;
var uLocal_197 = 0;
var uLocal_198 = 0;
var uLocal_199 = 0;
var uLocal_200 = 0;
var uLocal_201 = 0;
var uLocal_202 = 0;
var uLocal_203 = 0;
var uLocal_204 = 0;
var uLocal_205 = 0;
var uLocal_206 = 0;
var uLocal_207 = 0;
var uLocal_208 = 0;
var uLocal_209 = 0;
var uLocal_210 = 0;
var uLocal_211 = 0;
var uLocal_212 = 0;
var uLocal_213 = 0;
var uLocal_214 = 0;
var uLocal_215 = 0;
var uLocal_216 = 0;
var uLocal_217 = 0;
var uLocal_218 = 0;
var uLocal_219 = 0;
var uLocal_220 = 0;
var uLocal_221 = 0;
var uLocal_222 = 0;
var uLocal_223 = 0;
var uLocal_224 = 0;
var uLocal_225 = 0;
var uLocal_226 = 0;
var uLocal_227 = 0;
var uLocal_228 = 0;
var uLocal_229 = 0;
var uLocal_230 = 0;
var uLocal_231 = 0;
var uLocal_232 = 0;
var uLocal_233 = 0;
var uLocal_234 = 0;
var uLocal_235 = 0;
var uLocal_236 = 0;
var uLocal_237 = 0;
var uLocal_238 = 0;
var uLocal_239 = 0;
var uLocal_240 = 0;
var uLocal_241 = 0;
var uLocal_242 = 0;
var uLocal_243 = 0;
var uLocal_244 = 0;
var uLocal_245 = 0;
var uLocal_246 = 0;
var uLocal_247 = 0;
var uLocal_248 = 0;
var uLocal_249 = 0;
var uLocal_250 = 0;
var uLocal_251 = 0;
var uLocal_252 = 0;
var uLocal_253 = 0;
var uLocal_254 = 0;
var uLocal_255 = 0;
var uLocal_256 = 0;
var uLocal_257 = 0;
var uLocal_258 = 0;
var uLocal_259 = 0;
var uLocal_260 = 0;
var uLocal_261 = 0;
var uLocal_262 = 0;
var uLocal_263 = 0;
var uLocal_264 = 0;
var uLocal_265 = 0;
var uLocal_266 = 0;
var uLocal_267 = 0;
var uLocal_268 = 0;
var uLocal_269 = 0;
var uLocal_270 = 0;
var uLocal_271 = 0;
var uLocal_272 = 0;
var uLocal_273 = 0;
var uLocal_274 = 0;
var uLocal_275 = 0;
var uLocal_276 = 0;
var uLocal_277 = 0;
var uLocal_278 = 0;
var uLocal_279 = 0;
var uLocal_280 = 0;
var uLocal_281 = 0;
var uLocal_282 = 0;
var uLocal_283 = 0;
var uLocal_284 = 0;
var uLocal_285 = 0;
var uLocal_286 = 0;
var uLocal_287 = 0;
var uLocal_288 = 0;
var uLocal_289 = 0;
var uLocal_290 = 0;
var uLocal_291 = 0;
var uLocal_292 = 0;
var uLocal_293 = 0;
var uLocal_294 = 0;
var uLocal_295 = 0;
var uLocal_296 = 0;
var uLocal_297 = 0;
var uLocal_298 = 0;
var uLocal_299 = 0;
var uLocal_300 = 0;
var uLocal_301 = 0;
var uLocal_302 = 0;
int iLocal_303 = 0;
var uLocal_304 = 0;
var uLocal_305 = 0;
int iLocal_306[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
int iLocal_317 = 0;
bool bLocal_318 = 0;
bool bLocal_319 = 0;
bool bLocal_320 = 0;
int iLocal_321 = 0;
int iLocal_322 = 0;
int iLocal_323 = 0;
int iLocal_324 = 0;
int iLocal_325 = 0;
int iLocal_326 = 0;
float fLocal_327 = 0f;
float fLocal_328 = 0f;
int iLocal_329 = 0;
int iLocal_330 = 0;
int iLocal_331 = 0;
var uLocal_332 = 0;
var uLocal_333 = 0;
var uLocal_334 = 0;
var uLocal_335 = 0;
var uLocal_336 = 0;
var uLocal_337 = 0;
var uLocal_338 = 0;
var uLocal_339 = 0;
var uLocal_340 = 0;
var uLocal_341 = 0;
var uLocal_342 = 0;
var uLocal_343 = 0;
var uLocal_344 = 0;
var uLocal_345 = 0;
var uLocal_346 = 0;
int iLocal_347 = 0;
int iLocal_348 = 0;
var uLocal_349 = 0;
var uLocal_350 = 0;
int iLocal_351 = 0;
int iLocal_352 = 0;
int iLocal_353 = 0;
int iLocal_354[4] = { 0, 0, 0, 0 };
int iLocal_359 = 0;
int iLocal_360 = 0;
int iLocal_361 = 0;
int iLocal_362 = 0;
int iLocal_363[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
struct<12> Local_376 = { 5, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0 } ;
struct<70> Local_388 = { 5, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, -1, 0, 0, -15, -1, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
var uLocal_458 = 0;
var uLocal_459 = 0;
var uLocal_460 = 0;
var uLocal_461 = 0;
var uLocal_462 = 0;
var uLocal_463 = 0;
struct<4> Local_464[32];
var uLocal_593 = 0;
var uLocal_594 = 0;
int iLocal_595 = 0;
char* sLocal_596 = NULL;
int iLocal_597 = 0;
int iLocal_598 = 0;
var uLocal_599 = 0;
var uLocal_600 = 0;
struct<21> ScriptParam_0 = { 0, -1, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, -1 } ;
#endregion
void __EntryFunction__()//Position - 0x0
{
iLocal_2 = 1;
iLocal_3 = 134;
iLocal_4 = 134;
iLocal_5 = 1;
iLocal_6 = 1;
iLocal_7 = 1;
iLocal_8 = 134;
iLocal_9 = 1;
iLocal_10 = 12;
iLocal_11 = 12;
fLocal_12 = 0.001f;
iLocal_15 = -1;
sLocal_16 = "NULL";
fLocal_21 = 80f;
fLocal_22 = 140f;
fLocal_23 = 180f;
iLocal_26 = 3;
fLocal_27 = 0f;
fLocal_31 = -0.0375f;
fLocal_32 = 0.17f;
iLocal_37 = 1;
iLocal_38 = 65;
iLocal_39 = 49;
iLocal_40 = 64;
fLocal_59 = ((0.05f + 0.275f) - 0.01f);
fLocal_63 = 0f;
iLocal_122 = 1;
bLocal_124 = true;
bLocal_126 = true;
iLocal_131 = -1;
bLocal_319 = true;
bLocal_320 = true;
iLocal_323 = -1;
iLocal_324 = -1;
iLocal_348 = -1;
iLocal_351 = -1;
if (!func_566(ScriptParam_0))
{
func_562();
}
iLocal_363[0] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-891.3f, 807.9f, 188.1f));
iLocal_363[1] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-276.5f, -206.3f, 38.4f));
iLocal_363[2] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-1485.5f, -644.5f, 30.1f));
iLocal_363[3] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-1746.3f, -939.5f, 7.7f));
iLocal_363[4] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-2106.4f, -345.3f, 13f));
iLocal_363[5] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-1520f, 74.4f, 61.3f));
iLocal_363[6] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-1333f, -286f, 40.3f));
iLocal_363[7] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-1178.1f, 54.8f, 53.9f));
iLocal_363[8] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-1298.7f, -359.4f, 36.7f));
iLocal_363[9] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-355.2f, 147.5f, 75.8f));
iLocal_363[10] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-982.1f, -1064.7f, 2.2f));
iLocal_363[11] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(-1313.1f, -1560.2f, 4.3f));
while (true)
{
func_561();
bLocal_107 = false;
bLocal_109 = false;
bLocal_112 = false;
bLocal_115 = false;
bLocal_117 = false;
Global_2738934.f_1802 = 0;
if (func_554() || func_553())
{
func_562();
}
if (func_545())
{
if (!func_544())
{
if (!func_543())
{
if (func_541())
{
if (!iLocal_105)
{
func_537();
func_536(&Local_376, 5);
func_535();
bLocal_126 = true;
bLocal_127 = true;
if (BitTest(uLocal_593, 1))
{
MISC::CLEAR_BIT(&uLocal_593, 1);
}
iLocal_105 = 1;
iLocal_351 = -999;
}
}
}
}
else if (!func_543())
{
if (!bLocal_127)
{
if (!func_534(&uLocal_304))
{
func_533(&uLocal_304, 0, 0);
}
else if (func_532(&uLocal_304, 100, 0))
{
if (!BitTest(uLocal_593, 1))
{
if (func_541())
{
func_522(&Local_376, 5, Global_2359296[func_531() /*5570*/].f_681.f_37);
bLocal_126 = false;
bLocal_127 = true;
iLocal_105 = 1;
iLocal_351 = -999;
}
}
}
}
}
func_422();
func_418();
func_402();
func_395();
func_284();
func_182();
}
func_178();
func_143();
func_77();
func_74();
if (!iLocal_129)
{
if (SYSTEM::VDIST2(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), false), 471.9266f, -1308.5956f, 28.2359f) < 1000f)
{
ENTITY::CREATE_MODEL_HIDE(471.9266f, -1308.5956f, 28.2359f, 2f, joaat("v_ilev_uvcheetah"), true);
ENTITY::CREATE_MODEL_HIDE(471.9266f, -1308.5956f, 28.2359f, 2f, joaat("v_ilev_uventity"), true);
ENTITY::CREATE_MODEL_HIDE(471.9266f, -1308.5956f, 28.2359f, 2f, joaat("v_ilev_uvjb700"), true);
ENTITY::CREATE_MODEL_HIDE(471.9266f, -1308.5956f, 28.2359f, 2f, joaat("v_ilev_uventity"), true);
ENTITY::CREATE_MODEL_HIDE(471.9266f, -1308.5956f, 28.2359f, 2f, joaat("v_ilev_uvmonroe"), true);
ENTITY::CREATE_MODEL_HIDE(471.9266f, -1308.5956f, 28.2359f, 2f, joaat("v_ilev_uvtext"), true);
iLocal_129 = 1;
}
}
if (NETWORK::NETWORK_IS_HOST_OF_THIS_SCRIPT())
{
func_1();
}
}
}
void func_1()//Position - 0x410
{
int iVar0;
int iVar1;
if (!bLocal_124)
{
}
else
{
if (iLocal_125 >= 32)
{
iLocal_125 = 0;
MISC::CLEAR_BIT(&uLocal_593, 10);
MISC::CLEAR_BIT(&(Local_388.f_23), 7);
MISC::CLEAR_BIT(&uLocal_593, 11);
MISC::CLEAR_BIT(&uLocal_593, 23);
if (BitTest(Local_388.f_23, 0))
{
MISC::SET_BIT(&(Local_388.f_23), 1);
MISC::CLEAR_BIT(&(Local_388.f_23), 3);
}
}
iVar0 = iLocal_125;
if (Local_464[iVar0 /*4*/].f_1 == 2)
{
iVar1 = 0;
while (iVar1 < 5)
{
if (!Local_388[iVar1] == -1)
{
if (!Local_388.f_6[iVar1])
{
if (Local_388[iVar1] == Local_464[iVar0 /*4*/])
{
if (Local_388[iVar1] == Local_388.f_28)
{
func_73();
}
Local_388.f_33 = 0;
Local_388.f_32++;
}
}
}
iVar1++;
}
}
if (BitTest(Local_388.f_23, 0))
{
if (!BitTest(Local_388.f_23, 7))
{
if (NETWORK::NETWORK_IS_PARTICIPANT_ACTIVE(PLAYER::INT_TO_PARTICIPANTINDEX(iVar0)))
{
if (Local_464[iVar0 /*4*/].f_3 > 0 || func_72(NETWORK::NETWORK_GET_PLAYER_INDEX(PLAYER::INT_TO_PARTICIPANTINDEX(iVar0)), 6))
{
if (Local_464[iVar0 /*4*/].f_3 < 3)
{
MISC::SET_BIT(&(Local_388.f_23), 7);
}
}
}
}
}
if (BitTest(Local_388.f_23, 0))
{
if (!BitTest(uLocal_593, 11))
{
if (BitTest(Local_464[iVar0 /*4*/].f_2, 2))
{
MISC::SET_BIT(&uLocal_593, 11);
}
}
if (!BitTest(uLocal_593, 21))
{
if (!BitTest(uLocal_593, 3))
{
if (NETWORK::NETWORK_IS_PARTICIPANT_ACTIVE(PLAYER::INT_TO_PARTICIPANTINDEX(iVar0)))
{
if (BitTest(Local_464[iVar0 /*4*/].f_2, 3))
{
MISC::SET_BIT(&uLocal_593, 21);
}
}
}
}
}
iLocal_125++;
if (iLocal_125 >= 32)
{
MISC::SET_BIT(&uLocal_593, 10);
if (BitTest(Local_388.f_23, 7) || BitTest(uLocal_593, 23))
{
MISC::CLEAR_BIT(&(Local_388.f_23), 1);
}
if (BitTest(uLocal_593, 11))
{
MISC::SET_BIT(&(Local_388.f_23), 3);
}
if (BitTest(uLocal_593, 21))
{
MISC::SET_BIT(&(Local_388.f_23), 6);
}
}
}
if (func_71())
{
if (NETWORK::GET_TIME_DIFFERENCE(NETWORK::GET_NETWORK_TIME(), Local_388.f_29) > 180000)
{
func_70();
}
}
switch (Local_388.f_20)
{
case 0:
func_67();
Local_388.f_32++;
Local_388.f_20 = 1;
func_66();
break;
case 1:
if (func_65())
{
iLocal_347 = NETWORK::GET_NETWORK_TIME();
Local_388.f_20 = 2;
}
else if (Local_388.f_28 == -1)
{
func_73();
}
break;
case 2:
if (!Local_388.f_17 && NETWORK::GET_TIME_DIFFERENCE(NETWORK::GET_NETWORK_TIME(), iLocal_347) > Global_262145.f_11934 /* Tunable: TIME_SIMEON_SENDS_TEXT_MS */)
{
Local_388.f_20 = 0;
}
break;
case 3:
break;
}
func_2();
}
void func_2()//Position - 0x6B1
{
struct<3> Var0;
float fVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
switch (Local_388.f_26)
{
case 0:
if (!BitTest(Local_388.f_23, 0))
{
if (bLocal_319)
{
if (bLocal_320)
{
if (Global_2738934.f_1775)
{
MISC::CLEAR_BIT(&(Local_388.f_23), 2);
MISC::CLEAR_BIT(&(Local_388.f_23), 6);
MISC::CLEAR_BIT(&uLocal_593, 21);
NETWORK::RESERVE_NETWORK_MISSION_VEHICLES(0);
Local_388.f_34 = 0;
MISC::SET_BIT(&(Local_388.f_23), 0);
Global_2738934.f_1775 = 0;
}
}
else if (Local_388.f_27 == -15)
{
MISC::CLEAR_BIT(&(Local_388.f_23), 2);
MISC::CLEAR_BIT(&(Local_388.f_23), 6);
MISC::CLEAR_BIT(&uLocal_593, 21);
NETWORK::RESERVE_NETWORK_MISSION_VEHICLES(0);
Local_388.f_34 = 0;
iVar4 = func_64();
func_50(&(Local_388.f_27), func_63(iVar4), func_62(iVar4), func_61(iVar4), func_60(iVar4), func_59(iVar4), func_57(iVar4));
func_49(&(Local_388.f_27), 0, MISC::GET_RANDOM_INT_IN_RANGE(0, 60), MISC::GET_RANDOM_INT_IN_RANGE(0, 8), 1, 0, 0);
}
else if (!func_48(6))
{
if (!func_534(&uLocal_336))
{
func_533(&uLocal_336, 0, 0);
}
else if (func_532(&uLocal_336, 10000, 0))
{
func_47(&uLocal_336);
if (func_43(Local_388.f_27))
{
MISC::SET_BIT(&(Local_388.f_23), 0);
}
}
}
}
}
else if (Local_388.f_67 == 0)
{
if (func_37(1, 1, 1))
{
if (NETWORK::NETWORK_ENTITY_AREA_DOES_EXIST(Local_388.f_24))
{
NETWORK::NETWORK_REMOVE_ENTITY_AREA(Local_388.f_24);
}
Local_388.f_24 = -1;
iLocal_322 = MISC::GET_RANDOM_INT_IN_RANGE(0, 10);
iVar5 = func_34();
if (iVar5 != 0)
{
Local_388.f_67 = iVar5;
NETWORK::RESERVE_NETWORK_MISSION_VEHICLES(1);
Local_388.f_34 = 1;
}
}
}
else if (NETWORK::CAN_REGISTER_MISSION_VEHICLES(1))
{
if (!NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(Local_388.f_22))
{
if (func_23(&Var0, &fVar3))
{
if (func_22(Local_388.f_67))
{
if (func_19(&(Local_388.f_22), Local_388.f_67, Var0, fVar3, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0))
{
if (DECORATOR::DECOR_IS_REGISTERED_AS_TYPE("MPBitset", 3))
{
if (DECORATOR::DECOR_EXIST_ON(NETWORK::NET_TO_VEH(Local_388.f_22), "MPBitset"))
{
iVar6 = DECORATOR::DECOR_GET_INT(NETWORK::NET_TO_VEH(Local_388.f_22), "MPBitset");
}
MISC::SET_BIT(&iVar6, 5);
DECORATOR::DECOR_SET_INT(NETWORK::NET_TO_VEH(Local_388.f_22), "MPBitset", iVar6);
}
if (DECORATOR::DECOR_IS_REGISTERED_AS_TYPE("MPBitset", 3))
{
if (DECORATOR::DECOR_EXIST_ON(NETWORK::NET_TO_VEH(Local_388.f_22), "MPBitset"))
{
iVar7 = DECORATOR::DECOR_GET_INT(NETWORK::NET_TO_VEH(Local_388.f_22), "MPBitset");
}
MISC::SET_BIT(&iVar7, 10);
DECORATOR::DECOR_SET_INT(NETWORK::NET_TO_VEH(Local_388.f_22), "MPBitset", iVar7);
}
if (DECORATOR::DECOR_IS_REGISTERED_AS_TYPE("Not_Allow_As_Saved_Veh", 3))
{
DECORATOR::DECOR_SET_INT(NETWORK::NET_TO_VEH(Local_388.f_22), "Not_Allow_As_Saved_Veh", 1);
}
MISC::SET_BIT(&(Local_388.f_23), 0);
MISC::CLEAR_BIT(&(Local_388.f_23), 2);
MISC::CLEAR_BIT(&(Local_388.f_23), 4);
MISC::CLEAR_BIT(&(Local_388.f_23), 3);
MISC::CLEAR_BIT(&uLocal_593, 11);
MISC::CLEAR_BIT(&(Local_388.f_23), 6);
MISC::SET_BIT(&uLocal_593, 23);
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(Local_388.f_67);
Local_388.f_26 = 1;
func_47(&(Local_388.f_30));
func_533(&(Local_388.f_30), 0, 0);
VEHICLE::SET_VEHICLE_DOORS_LOCKED(NETWORK::NET_TO_VEH(Local_388.f_22), 7);
VEHICLE::SET_VEHICLE_NEEDS_TO_BE_HOTWIRED(NETWORK::NET_TO_VEH(Local_388.f_22), true);
VEHICLE::SET_VEHICLE_MODEL_IS_SUPPRESSED(Local_388.f_67, true);
NETWORK::SET_NETWORK_ID_PASS_CONTROL_IN_TUTORIAL(Local_388.f_22, true);
}
else
{
STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(Local_388.f_67);
}
}
}
}
}
break;
case 1:
if (!BitTest(Local_388.f_23, 2))
{
if (NETWORK::NETWORK_DOES_ENTITY_EXIST_WITH_NETWORK_ID(Local_388.f_22))
{
if (!VEHICLE::IS_VEHICLE_DRIVEABLE(NETWORK::NET_TO_VEH(Local_388.f_22), false))
{
Local_90.f_3 = -1117941225;
func_17(Local_90, func_18(1));
MISC::SET_BIT(&(Local_388.f_23), 2);
}
}
}
if (BitTest(uLocal_593, 3) || (BitTest(uLocal_593, 10) && BitTest(Local_388.f_23, 1)))
{
if (!BitTest(uLocal_593, 3))
{
if (!BitTest(Local_388.f_23, 2))
{
if (NETWORK::NETWORK_DOES_ENTITY_EXIST_WITH_NETWORK_ID(Local_388.f_22))
{
if (!VEHICLE::IS_VEHICLE_DRIVEABLE(NETWORK::NET_TO_VEH(Local_388.f_22), false))
{
Local_90.f_3 = -1117941225;
func_17(Local_90, func_18(1));
MISC::SET_BIT(&(Local_388.f_23), 2);
}
}
}
}
Local_388.f_26 = 2;
}
if (func_16(NETWORK::NET_TO_VEH(Local_388.f_22)))
{
Local_388.f_26 = 2;
Local_90.f_3 = -267741801;
func_17(Local_90, func_18(1));
}
if (!BitTest(Local_388.f_23, 4))
{
if (func_532(&(Local_388.f_30), 360000, 0))
{
MISC::SET_BIT(&(Local_388.f_23), 4);
func_47(&(Local_388.f_30));
func_533(&(Local_388.f_30), 0, 0);
}
}
else if (BitTest(uLocal_593, 10))
{
if (!BitTest(Local_388.f_23, 3))
{
if (func_534(&(Local_388.f_30)))
{
if (func_532(&(Local_388.f_30), 120000, 0))
{
Local_388.f_26 = 2;
Local_90.f_3 = -267741801;
func_17(Local_90, func_18(1));
}
}
else
{
func_533(&(Local_388.f_30), 0, 0);
}
}
else if (func_534(&(Local_388.f_30)))
{
func_47(&(Local_388.f_30));
}
}
if (BitTest(Local_388.f_23, 6))
{
if (!BitTest(uLocal_593, 3))
{
if (Local_388.f_26 == 1)
{
Local_388.f_26 = 2;
}
}
}
if (func_12(6))
{
if (Local_388.f_26 == 1)
{
Local_388.f_26 = 2;
}
}
break;
case 2:
if (NETWORK::NETWORK_DOES_ENTITY_EXIST_WITH_NETWORK_ID(Local_388.f_22))
{
if (func_11(Local_388.f_22))
{
func_10(&(Local_388.f_22));
Local_388.f_26 = 3;
}
}
else
{
Local_388.f_26 = 3;
}
break;
case 3:
if (BitTest(uLocal_593, 10))
{
if (BitTest(Local_388.f_23, 1))
{
Local_388.f_26 = 0;
MISC::CLEAR_BIT(&(Local_388.f_23), 0);
Local_388.f_27 = -15;
if (Local_388.f_67 != 0)
{
VEHICLE::SET_VEHICLE_MODEL_IS_SUPPRESSED(Local_388.f_67, false);
}
Local_388.f_67 = 0;
if (bLocal_320)
{
func_7(func_8(NETWORK::NETWORK_GET_HOST_OF_SCRIPT("AM_LAUNCHER", -1, 0)), 0);
}
}
}
break;
}
func_3();
}
void func_3()//Position - 0xC75
{
if (NETWORK::NETWORK_IS_HOST_OF_THIS_SCRIPT())
{
switch (Local_388.f_69)
{
case 0:
if (BitTest(Local_388.f_23, 8))
{
if (NETWORK::NETWORK_DOES_ENTITY_EXIST_WITH_NETWORK_ID(Local_388.f_22))
{
if (!func_6())
{
if (ENTITY::GET_ENTITY_COLLISION_DISABLED(NETWORK::NET_TO_VEH(Local_388.f_22)))
{
if (!ENTITY::IS_ENTITY_IN_ANGLED_AREA(NETWORK::NET_TO_VEH(Local_388.f_22), 1204.0526f, -3102.3105f, 1.770506f, 1204.2653f, -3121.9736f, 17.920322f, 31.625f, false, true, 0))
{
if (!BitTest(Local_388.f_23, 9))
{
MISC::SET_BIT(&(Local_388.f_23), 9);
}
}
}
}
else if (BitTest(Local_388.f_23, 9))
{
MISC::CLEAR_BIT(&(Local_388.f_23), 9);
}
}
}
break;
}
}
if (BitTest(Local_388.f_23, 9))
{
if (NETWORK::NETWORK_DOES_ENTITY_EXIST_WITH_NETWORK_ID(Local_388.f_22))
{
if (func_4(Local_388.f_22))
{
if (NETWORK::NETWORK_HAS_CONTROL_OF_NETWORK_ID(Local_388.f_22))
{
ENTITY::SET_ENTITY_COLLISION(NETWORK::NET_TO_VEH(Local_388.f_22), true, false);
VEHICLE::SET_VEHICLE_DOORS_LOCKED(NETWORK::NET_TO_VEH(Local_388.f_22), 1);
ENTITY::FREEZE_ENTITY_POSITION(NETWORK::NET_TO_VEH(Local_388.f_22), false);
NETWORK::NETWORK_FADE_IN_ENTITY(NETWORK::NET_TO_VEH(Local_388.f_22), true, 1);
MISC::CLEAR_BIT(&(Local_388.f_23), 9);
}
else
{
NETWORK::NETWORK_REQUEST_CONTROL_OF_NETWORK_ID(Local_388.f_22);
}
}
else
{
MISC::CLEAR_BIT(&(Local_388.f_23), 9);
}
}
else
{
MISC::CLEAR_BIT(&(Local_388.f_23), 9);
}
}
}
int func_4(int iParam0)//Position - 0xDCA
{
if (NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(iParam0))
{
return !func_5(NETWORK::NET_TO_VEH(iParam0));
}
return 0;
}
int func_5(int iParam0)//Position - 0xDEA
{
if (ENTITY::DOES_ENTITY_EXIST(iParam0))
{
if (ENTITY::IS_ENTITY_DEAD(iParam0, false))
{
return 1;
}
else if (!VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
{
return 1;
}
}
else
{
return 1;