This repository has been archived by the owner on Jan 1, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathagency_prep2amb.c
10898 lines (10295 loc) · 213 KB
/
agency_prep2amb.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;
float fLocal_19 = 0f;
var uLocal_20 = 0;
var uLocal_21 = 0;
var uLocal_22 = 0;
float fLocal_23 = 0f;
float fLocal_24 = 0f;
var uLocal_25 = 0;
var uLocal_26 = 0;
var uLocal_27 = 0;
float fLocal_28 = 0f;
float fLocal_29 = 0f;
float fLocal_30 = 0f;
var uLocal_31 = 0;
var uLocal_32 = 0;
int iLocal_33 = 0;
var uLocal_34 = 0;
int iLocal_35 = 0;
int iLocal_36 = 0;
int iLocal_37 = 0;
int iLocal_38 = 0;
int iLocal_39 = 0;
int iLocal_40 = 0;
int iLocal_41 = 0;
struct<9> Local_42 = { 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
char* sLocal_51[46] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
bool bLocal_98 = 0;
var uLocal_99[2] = { 0, 0 };
float fLocal_102 = 0f;
var uLocal_103 = 0;
struct<3> Local_104 = { 0, 0, 0 } ;
int iLocal_107 = 0;
struct<3> Local_108 = { 0, 0, 0 } ;
float fLocal_111 = 0f;
struct<67> Local_112 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 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;
int iLocal_190[10] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
int iLocal_201 = 0;
struct<261> Local_202[4];
char* sLocal_1247[13] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
char* sLocal_1261 = NULL;
int iLocal_1262 = 0;
int iLocal_1263 = 0;
int iLocal_1264 = 0;
int iLocal_1265 = 0;
int iLocal_1266 = 0;
int iLocal_1267 = 0;
int iLocal_1268 = 0;
int iLocal_1269 = 0;
char* sLocal_1270 = NULL;
var uLocal_1271 = 16;
var uLocal_1272 = 0;
var uLocal_1273 = 0;
var uLocal_1274 = 0;
var uLocal_1275 = 0;
var uLocal_1276 = 0;
var uLocal_1277 = 0;
var uLocal_1278 = 0;
var uLocal_1279 = 0;
var uLocal_1280 = 0;
var uLocal_1281 = 0;
var uLocal_1282 = 0;
var uLocal_1283 = 0;
var uLocal_1284 = 0;
var uLocal_1285 = 0;
var uLocal_1286 = 0;
var uLocal_1287 = 0;
var uLocal_1288 = 0;
var uLocal_1289 = 0;
var uLocal_1290 = 0;
var uLocal_1291 = 0;
var uLocal_1292 = 0;
var uLocal_1293 = 0;
var uLocal_1294 = 0;
var uLocal_1295 = 0;
var uLocal_1296 = 0;
var uLocal_1297 = 0;
var uLocal_1298 = 0;
var uLocal_1299 = 0;
var uLocal_1300 = 0;
var uLocal_1301 = 0;
var uLocal_1302 = 0;
var uLocal_1303 = 0;
var uLocal_1304 = 0;
var uLocal_1305 = 0;
var uLocal_1306 = 0;
var uLocal_1307 = 0;
var uLocal_1308 = 0;
var uLocal_1309 = 0;
var uLocal_1310 = 0;
var uLocal_1311 = 0;
var uLocal_1312 = 0;
var uLocal_1313 = 0;
var uLocal_1314 = 0;
var uLocal_1315 = 0;
var uLocal_1316 = 0;
var uLocal_1317 = 0;
var uLocal_1318 = 0;
var uLocal_1319 = 0;
var uLocal_1320 = 0;
var uLocal_1321 = 0;
var uLocal_1322 = 0;
var uLocal_1323 = 0;
var uLocal_1324 = 0;
var uLocal_1325 = 0;
var uLocal_1326 = 0;
var uLocal_1327 = 0;
var uLocal_1328 = 0;
var uLocal_1329 = 0;
var uLocal_1330 = 0;
var uLocal_1331 = 0;
var uLocal_1332 = 0;
var uLocal_1333 = 0;
var uLocal_1334 = 0;
var uLocal_1335 = 0;
var uLocal_1336 = 0;
var uLocal_1337 = 0;
var uLocal_1338 = 0;
var uLocal_1339 = 0;
var uLocal_1340 = 0;
var uLocal_1341 = 0;
var uLocal_1342 = 0;
var uLocal_1343 = 0;
var uLocal_1344 = 0;
var uLocal_1345 = 0;
var uLocal_1346 = 0;
var uLocal_1347 = 0;
var uLocal_1348 = 0;
var uLocal_1349 = 0;
var uLocal_1350 = 0;
var uLocal_1351 = 0;
var uLocal_1352 = 0;
var uLocal_1353 = 0;
var uLocal_1354 = 0;
var uLocal_1355 = 0;
var uLocal_1356 = 0;
var uLocal_1357 = 0;
var uLocal_1358 = 0;
var uLocal_1359 = 0;
var uLocal_1360 = 0;
var uLocal_1361 = 0;
var uLocal_1362 = 0;
var uLocal_1363 = 0;
var uLocal_1364 = 0;
var uLocal_1365 = 0;
var uLocal_1366 = 0;
var uLocal_1367 = 0;
var uLocal_1368 = 0;
var uLocal_1369 = 0;
var uLocal_1370 = 0;
var uLocal_1371 = 0;
var uLocal_1372 = 0;
var uLocal_1373 = 0;
var uLocal_1374 = 0;
var uLocal_1375 = 0;
var uLocal_1376 = 0;
var uLocal_1377 = 0;
var uLocal_1378 = 0;
var uLocal_1379 = 0;
var uLocal_1380 = 0;
var uLocal_1381 = 0;
var uLocal_1382 = 0;
var uLocal_1383 = 0;
var uLocal_1384 = 0;
var uLocal_1385 = 0;
var uLocal_1386 = 0;
var uLocal_1387 = 0;
var uLocal_1388 = 0;
var uLocal_1389 = 0;
var uLocal_1390 = 0;
var uLocal_1391 = 0;
var uLocal_1392 = 0;
var uLocal_1393 = 0;
var uLocal_1394 = 0;
var uLocal_1395 = 0;
var uLocal_1396 = 0;
var uLocal_1397 = 0;
var uLocal_1398 = 0;
var uLocal_1399 = 0;
var uLocal_1400 = 0;
var uLocal_1401 = 0;
var uLocal_1402 = 0;
var uLocal_1403 = 0;
var uLocal_1404 = 0;
var uLocal_1405 = 0;
var uLocal_1406 = 0;
var uLocal_1407 = 0;
var uLocal_1408 = 0;
var uLocal_1409 = 0;
var uLocal_1410 = 0;
var uLocal_1411 = 0;
var uLocal_1412 = 0;
var uLocal_1413 = 0;
var uLocal_1414 = 0;
var uLocal_1415 = 0;
var uLocal_1416 = 0;
var uLocal_1417 = 0;
var uLocal_1418 = 0;
var uLocal_1419 = 0;
var uLocal_1420 = 0;
var uLocal_1421 = 0;
var uLocal_1422 = 0;
var uLocal_1423 = 0;
var uLocal_1424 = 0;
var uLocal_1425 = 0;
var uLocal_1426 = 0;
var uLocal_1427 = 0;
var uLocal_1428 = 0;
var uLocal_1429 = 0;
var uLocal_1430 = 0;
var uLocal_1431 = 0;
var uLocal_1432 = 0;
var uLocal_1433 = 0;
var uLocal_1434 = 0;
var uLocal_1435 = 0;
int iLocal_1436 = 0;
#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_19 = 0f;
fLocal_23 = -0.0375f;
fLocal_24 = 0.17f;
fLocal_28 = 80f;
fLocal_29 = 140f;
fLocal_30 = 180f;
iLocal_33 = 3;
iLocal_41 = 145;
bLocal_98 = -1;
fLocal_102 = 0f;
Local_104 = { 0f, 0f, 0f };
Local_108 = { 0f, 0f, 0f };
fLocal_111 = 0f;
iLocal_201 = 1;
sLocal_1261 = "";
iLocal_1264 = -1;
iLocal_1267 = -1;
iLocal_1269 = -1;
iLocal_1436 = -1;
if (!func_282(32))
{
iLocal_35 = Global_114135.f_10053.f_128;
if (iLocal_35 == 2)
{
MISC::SET_BIT(&uLocal_103, 10);
Local_108 = { func_281(25) };
fLocal_111 = func_280(25);
if (func_279(&Local_112, 25))
{
if (!BitTest(uLocal_103, 14))
{
MISC::SET_BIT(&uLocal_103, 14);
}
}
}
}
else
{
func_277("AM_H_PREP8" /* GXT: A getaway vehicle is required for this setup. */, 2, 0, -1, 10000, 3, 0, 0, 0);
Global_114135.f_10053.f_128 = iLocal_35;
}
if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(82))
{
if (PLAYER::GET_CAUSE_OF_MOST_RECENT_FORCE_CLEANUP() == 2)
{
func_268(0);
func_266(32, 1);
}
else
{
func_266(32, 0);
}
}
func_261(1);
while (true)
{
if (func_260(69))
{
func_256("AM_H_PREP8" /* GXT: A getaway vehicle is required for this setup. */, 1);
func_266(32, 0);
}
if (!func_254(1))
{
if (func_253(PLAYER::PLAYER_PED_ID()))
{
func_245();
func_238();
func_237();
func_226();
switch (iLocal_35)
{
case 0:
func_141();
break;
case 2:
func_140();
break;
case 3:
func_131();
break;
case 4:
func_16(12);
break;
case 5:
break;
default:
break;
}
func_7();
}
else
{
func_1(46, 1);
}
}
SYSTEM::WAIT(0);
}
}
void func_1(int iParam0, bool bParam1)//Position - 0x1D1
{
int iVar0;
iVar0 = 0;
while (iVar0 <= (46 - 1))
{
if (iParam0 != iVar0 && iParam0 != 46)
{
func_4(iVar0);
}
iVar0++;
}
if (bParam1)
{
if (iParam0 != 46)
{
if ((!func_2(func_3(iParam0)) && !Global_112772) && !BitTest(uLocal_103, 15))
{
MISC::SET_BIT(&uLocal_103, 15);
HUD::CLEAR_HELP(true);
}
}
else if ((HUD::IS_HELP_MESSAGE_BEING_DISPLAYED() && !Global_112772) && !BitTest(uLocal_103, 15))
{
MISC::SET_BIT(&uLocal_103, 15);
HUD::CLEAR_HELP(true);
}
}
}
bool func_2(char* sParam0)//Position - 0x26E
{
HUD::BEGIN_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(sParam0);
return HUD::END_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(0);
}
var func_3(bool bParam0)//Position - 0x281
{
return sLocal_51[bParam0];
}
void func_4(bool bParam0)//Position - 0x28F
{
int iVar0;
iVar0 = func_6(bParam0);
MISC::CLEAR_BIT(&(uLocal_99[func_5(bParam0)]), iVar0);
}
int func_5(int iParam0)//Position - 0x2AF
{
int iVar0;
if (iParam0 < 32)
{
iVar0 = 0;
}
else
{
iVar0 = 1;
}
return iVar0;
}
int func_6(int iParam0)//Position - 0x2C9
{
if (iParam0 > 31)
{
return (iParam0 - 32);
}
return iParam0;
}
void func_7()//Position - 0x2E2
{
if (((BitTest(uLocal_103, 0) && !BitTest(uLocal_103, 1)) && !BitTest(uLocal_103, 14)) && func_13())
{
if (func_12(0, 172, 0) || func_12(0, 173, 0))
{
iLocal_1269 = MISC::GET_GAME_TIMER();
}
if (iLocal_1269 != -1)
{
if ((MISC::GET_GAME_TIMER() - iLocal_1269) < 200)
{
iLocal_41 = func_8();
}
else
{
iLocal_1269 = -1;
}
}
}
else
{
iLocal_41 = 145;
iLocal_1269 = -1;
}
}
int func_8()//Position - 0x35B
{
int iVar0;
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
iVar2 = 0;
iVar3 = 145;
if (Global_79539)
{
iVar3 = 145;
}
else if (GRAPHICS::HAS_SCALEFORM_MOVIE_LOADED(Global_21047) == 1)
{
if (func_11())
{
if (func_10())
{
iVar6 = 0;
GRAPHICS::BEGIN_SCALEFORM_MOVIE_METHOD(Global_21047, "GET_CURRENT_SELECTION");
iVar0 = GRAPHICS::END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE();
iVar4 = MISC::GET_GAME_TIMER();
while ((!GRAPHICS::IS_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_READY(iVar0) && iVar6 == 0) && GRAPHICS::HAS_SCALEFORM_MOVIE_LOADED(Global_21047) == 1)
{
SYSTEM::WAIT(0);
iVar5 = MISC::GET_GAME_TIMER();
if ((iVar5 - iVar4) > 1500)
{
iVar6 = 1;
}
}
iVar1 = GRAPHICS::GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_INT(iVar0);
if (iVar1 > func_9() || iVar1 < 0)
{
iVar1 = func_9();
}
iVar2 = Global_21072[iVar1];
iVar3 = iVar2;
if (GRAPHICS::HAS_SCALEFORM_MOVIE_LOADED(Global_21047) == 0)
{
iVar3 = 145;
}
if (iVar6 == 1)
{
iVar3 = 145;
}
}
else
{
iVar3 = 145;
}
}
else
{
iVar3 = 145;
}
}
else
{
iVar3 = 145;
}
return iVar3;
}
int func_9()//Position - 0x447
{
if (Global_33087 == 0 || Global_33087 == 2)
{
return 207;
}
return 161;
}
int func_10()//Position - 0x469
{
if (SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(joaat("cellphone_flashhand")) > 0)
{
return 1;
}
return 0;
}
int func_11()//Position - 0x483
{
if (SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(joaat("appcontacts")) > 0)
{
return 1;
}
return 0;
}
int func_12(int iParam0, int iParam1, int iParam2)//Position - 0x49D
{
if (PAD::IS_CONTROL_JUST_PRESSED(iParam0, iParam1) || (iParam2 == 1 && PAD::IS_DISABLED_CONTROL_JUST_PRESSED(iParam0, iParam1)))
{
if (MISC::IS_PC_VERSION())
{
if (MISC::UPDATE_ONSCREEN_KEYBOARD() == 0 || (NETWORK::NETWORK_TEXT_CHAT_IS_TYPING() && PAD::IS_USING_KEYBOARD_AND_MOUSE(2 /*FRONTEND_CONTROL*/)))
{
return 0;
}
}
if (HUD::IS_PAUSE_MENU_ACTIVE() || HUD::IS_WARNING_MESSAGE_ACTIVE())
{
return 0;
}
else
{
return 1;
}
}
return 0;
}
int func_13()//Position - 0x50F
{
if (func_15(0) && func_14())
{
return 1;
}
return 0;
}
int func_14()//Position - 0x52D
{
if (SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(joaat("appcontacts")) > 0)
{
return 1;
}
return 0;
}
int func_15(int iParam0)//Position - 0x54A
{
if (iParam0 == 1)
{
if (Global_21066.f_1 > 3)
{
if (BitTest(Global_8919, 14))
{
return 1;
}
else
{
return 0;
}
}
else
{
return 0;
}
}
if (SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(joaat("cellphone_flashhand")) > 0)
{
return 1;
}
if (Global_21066.f_1 > 3)
{
return 1;
}
return 0;
}
void func_16(int iParam0)//Position - 0x5A1
{
func_111();
if (iLocal_38 == 0)
{
switch (iLocal_39)
{
case 0:
func_110(1);
iLocal_1265 = GRAPHICS::REQUEST_SCALEFORM_MOVIE("MP_BIG_MESSAGE_FREEMODE");
func_1(46, 1);
iLocal_1266 = MISC::GET_GAME_TIMER() + 3000;
if (!BitTest(uLocal_103, 10))
{
func_94();
}
func_93(iParam0, 1);
iLocal_39 = 1;
break;
case 1:
if (MISC::GET_GAME_TIMER() > iLocal_1266)
{
if (GRAPHICS::HAS_SCALEFORM_MOVIE_LOADED(iLocal_1265))
{
GRAPHICS::BEGIN_SCALEFORM_MOVIE_METHOD(iLocal_1265, "SHOW_MISSION_PASSED_MESSAGE");
func_92("M_FB4P3_P" /* GXT: ~y~Mission Passed */);
func_92("M_FB4P3" /* GXT: Getaway Vehicle */);
GRAPHICS::SCALEFORM_MOVIE_METHOD_ADD_PARAM_INT(100);
GRAPHICS::SCALEFORM_MOVIE_METHOD_ADD_PARAM_BOOL(true);
GRAPHICS::SCALEFORM_MOVIE_METHOD_ADD_PARAM_INT(0);
GRAPHICS::SCALEFORM_MOVIE_METHOD_ADD_PARAM_BOOL(true);
GRAPHICS::END_SCALEFORM_MOVIE_METHOD();
iLocal_1266 = MISC::GET_GAME_TIMER() + 10000;
func_90(0);
iLocal_39 = 2;
}
}
break;
case 2:
if (GRAPHICS::HAS_SCALEFORM_MOVIE_LOADED(iLocal_1265) && AUDIO::IS_MISSION_COMPLETE_READY_FOR_UI())
{
if (MISC::GET_GAME_TIMER() < iLocal_1266)
{
GRAPHICS::DRAW_SCALEFORM_MOVIE(iLocal_1265, 0.5f, 0.3f, 1f, 1f, 255, 255, 255, 255, 0);
}
else if (MISC::GET_GAME_TIMER() < iLocal_1266 + 100)
{
GRAPHICS::BEGIN_SCALEFORM_MOVIE_METHOD(iLocal_1265, "TRANSITION_OUT");
GRAPHICS::END_SCALEFORM_MOVIE_METHOD();
iLocal_1266 = (iLocal_1266 - 100);
}
else if (MISC::GET_GAME_TIMER() < iLocal_1266 + 500)
{
GRAPHICS::DRAW_SCALEFORM_MOVIE(iLocal_1265, 0.5f, 0.3f, 1f, 1f, 255, 255, 255, 255, 0);
}
else
{
iLocal_39 = 3;
}
}
break;
case 3:
if (GRAPHICS::HAS_SCALEFORM_MOVIE_LOADED(iLocal_1265))
{
GRAPHICS::SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED(&iLocal_1265);
}
func_110(0);
if (iLocal_40 == 2)
{
func_89(108, 0);
}
if (func_87(iLocal_107))
{
VEHICLE::SET_VEHICLE_DOORS_LOCKED(iLocal_107, 1);
}
func_83("M_FHPE" /* GXT: Getaway Vehicle */, func_84());
func_80(2, 0);
break;
}
}
func_17();
}
void func_17()//Position - 0x743
{
int iVar0;
if (!BitTest(uLocal_103, 2))
{
if (!func_79(0f, 0f, 0f, Local_108, 0))
{
if (func_78(PLAYER::PLAYER_PED_ID(), Local_108, 100f, 1) && !func_77())
{
if (func_87(func_76(25)))
{
iLocal_107 = func_76(25);
ENTITY::SET_ENTITY_AS_MISSION_ENTITY(iLocal_107, true, true);
if (func_87(iLocal_107))
{
if (!DECORATOR::DECOR_EXIST_ON(iLocal_107, "GetawayVehicleValid"))
{
if (DECORATOR::DECOR_SET_BOOL(iLocal_107, "GetawayVehicleValid", true))
{
}
}
MISC::SET_BIT(&uLocal_103, 0);
MISC::SET_BIT(&uLocal_103, 2);
}
}
else if (!func_75(25, 0))
{
if (!func_87(func_76(25)))
{
func_70(1);
}
}
}
else if (func_87(iLocal_107))
{
if (!func_78(PLAYER::PLAYER_PED_ID(), Local_108, 100f, 1))
{
}
}
}
}
else
{
if (!func_79(0f, 0f, 0f, Local_108, 0))
{
if (!func_78(PLAYER::PLAYER_PED_ID(), Local_108, 100f, 1))
{
if (func_87(iLocal_107))
{
if (!PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iLocal_107, false))
{
func_21(iLocal_107, Local_108, fLocal_111, 25, 1);
MISC::CLEAR_BIT(&uLocal_103, 2);
VEHICLE::SET_VEHICLE_HAS_BEEN_DRIVEN_FLAG(iLocal_107, false);
func_20(&iLocal_107);
MISC::CLEAR_BIT(&uLocal_103, 0);
}
else
{
func_70(0);
}
}
else if (!func_75(25, 0))
{
func_70(1);
}
}
else if (!func_75(25, 0))
{
if (!func_87(iLocal_107))
{
func_70(1);
}
}
else if (!func_87(iLocal_107))
{
iVar0 = func_76(25);
if (func_87(iVar0) && iVar0 != iLocal_107)
{
iLocal_107 = iVar0;
}
}
}
func_18();
}
}
void func_18()//Position - 0x8E6
{
if (BitTest(uLocal_103, 2) && BitTest(uLocal_103, 0))
{
if (func_87(iLocal_107))
{
if (func_19(PLAYER::PLAYER_PED_ID(), iLocal_107, 10f, 1))
{
if (SYSTEM::VDIST2(ENTITY::GET_ENTITY_COORDS(iLocal_107, true), Local_108) >= 100f)
{
func_70(0);
}
}
}
else if (!func_75(25, 0))
{
if (func_87(iLocal_107))
{
VEHICLE::SET_VEHICLE_HAS_BEEN_DRIVEN_FLAG(iLocal_107, false);
}
func_20(&iLocal_107);
func_70(1);
}
}
}
bool func_19(int iParam0, int iParam1, float fParam2, bool bParam3)//Position - 0x960
{
return SYSTEM::VDIST2(ENTITY::GET_ENTITY_COORDS(iParam0, bParam3), ENTITY::GET_ENTITY_COORDS(iParam1, bParam3)) <= (fParam2 * fParam2);
}
void func_20(int* iParam0)//Position - 0x982
{
if (ENTITY::DOES_ENTITY_EXIST(*iParam0))
{
ENTITY::IS_ENTITY_DEAD(*iParam0, false);
if (ENTITY::IS_ENTITY_A_MISSION_ENTITY(*iParam0) && ENTITY::DOES_ENTITY_BELONG_TO_THIS_SCRIPT(*iParam0, true))
{
ENTITY::SET_VEHICLE_AS_NO_LONGER_NEEDED(iParam0);
}
}
}
void func_21(int iParam0, struct<3> Param1, float fParam4, int iParam5, bool bParam6)//Position - 0x9BA
{
struct<60> Var0;
if (ENTITY::DOES_ENTITY_EXIST(iParam0) && VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
{
if (iParam5 != 24 && iParam5 != 25)
{
return;
}
if (iParam5 == 24)
{
if (ENTITY::DOES_ENTITY_EXIST(Global_78329.f_484[25]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Global_78329.f_484[25], false))
{
if (Global_78329.f_484[25] == iParam0)
{
return;
}
}
}
if (!bParam6)
{
if ((VEHICLE::IS_BIG_VEHICLE(iParam0) || ENTITY::GET_ENTITY_MODEL(iParam0) == joaat("bus")) || ENTITY::GET_ENTITY_MODEL(iParam0) == joaat("tourbus"))
{
return;
}
}
func_69(iParam5);
Var0.f_9 = 49;
Var0.f_59 = 2;
func_64(iParam0, &Var0);
if (func_79(Param1, 0f, 0f, 0f, 0))
{
Param1 = { ENTITY::GET_ENTITY_COORDS(iParam0, true) };
fParam4 = ENTITY::GET_ENTITY_HEADING(iParam0);
}
if (iParam5 == 24)
{
if (MISC::GET_HASH_KEY(SCRIPT::GET_THIS_SCRIPT_NAME()) != joaat("vehicle_gen_controller"))
{
Global_79317 = MISC::GET_HASH_KEY(SCRIPT::GET_THIS_SCRIPT_NAME());
}
}
func_58(iParam5, &Var0, Param1, fParam4, func_63(iParam0));
func_22(iParam5, iParam0, 0);
}
}
void func_22(int iParam0, int iParam1, int iParam2)//Position - 0xAE3
{
int iVar0;
if (iParam0 == -1)
{
return;
}
if (!func_54(&(Global_78329.f_555[0 /*21*/]), iParam0))
{
return;
}
if (!BitTest(Global_78329.f_555[0 /*21*/].f_9, 12) && !BitTest(Global_78329.f_555[0 /*21*/].f_9, 10))
{
if (Global_78329.f_555[0 /*21*/].f_4 != ENTITY::GET_ENTITY_MODEL(iParam1))
{
return;
}
}
if (Global_79236 != -1 && Global_79236 != iParam0)
{
return;
}
if (ENTITY::DOES_ENTITY_EXIST(iParam1))
{
if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam1, false))
{
if (!ENTITY::IS_ENTITY_A_MISSION_ENTITY(iParam1))
{
ENTITY::SET_ENTITY_AS_MISSION_ENTITY(iParam1, true, true);
}
if (iParam0 == 24)
{
Global_114135.f_32754.f_4801 = func_43();
}
if (iParam1 != Global_78329.f_139[iParam0])
{
if (iParam0 == 24)
{
iVar0 = func_76(iParam0);
if ((ENTITY::DOES_ENTITY_EXIST(iVar0) && VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false)) && iParam1 != iVar0)
{
func_23(iVar0, 145);
}
}
Global_79235 = iParam1;
Global_79236 = iParam0;
Global_79237 = iParam2;
}
}
}
}
void func_23(int iParam0, int iParam1)//Position - 0xBFA
{
int iVar0;
int iVar1;
int iVar2;
if (!func_24(iParam0))
{
return;
}
if ((iParam1 != 0 && iParam1 != 1) && iParam1 != 2)
{
iVar0 = VEHICLE::GET_PED_IN_VEHICLE_SEAT(iParam0, -1, false);
if (!ENTITY::DOES_ENTITY_EXIST(iVar0))
{
iVar0 = VEHICLE::GET_LAST_PED_IN_VEHICLE_SEAT(iParam0, -1);
}
if (ENTITY::DOES_ENTITY_EXIST(iVar0) && !PED::IS_PED_INJURED(iVar0))
{
if (ENTITY::GET_ENTITY_MODEL(iVar0) == joaat("Player_Zero"))
{
iParam1 = 0;
}
else if (ENTITY::GET_ENTITY_MODEL(iVar0) == joaat("Player_One"))
{
iParam1 = 1;
}
else if (ENTITY::GET_ENTITY_MODEL(iVar0) == joaat("Player_Two"))
{
iParam1 = 2;
}
}
if ((iParam1 != 0 && iParam1 != 1) && iParam1 != 2)
{
iParam1 = Global_114135.f_2367.f_539.f_4321;
}
}
iVar1 = 0;
while (iVar1 < 3)
{
iVar2 = 0;
while (iVar2 < 2)
{
if (ENTITY::GET_ENTITY_MODEL(iParam0) == Global_114135.f_32754.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_66)
{
if (!MISC::IS_STRING_NULL_OR_EMPTY(&(Global_114135.f_32754.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_1)))
{
if (MISC::ARE_STRINGS_EQUAL(VEHICLE::GET_VEHICLE_NUMBER_PLATE_TEXT(iParam0), &(Global_114135.f_32754.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_1)))