#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;
	var uLocal_12 = 0;
	var uLocal_13 = 0;
	float fLocal_14 = 0f;
	var uLocal_15 = 0;
	var uLocal_16 = 0;
	int iLocal_17 = 0;
	var uLocal_18 = 0;
	var uLocal_19 = 0;
	char* sLocal_20 = NULL;
	float fLocal_21 = 0f;
	var uLocal_22 = 0;
	var uLocal_23 = 0;
	var uLocal_24 = 0;
	float fLocal_25 = 0f;
	float fLocal_26 = 0f;
	var uLocal_27 = 0;
	int iLocal_28 = 0;
	var uLocal_29 = 0;
	var uLocal_30 = 0;
	float fLocal_31 = 0f;
	float fLocal_32 = 0f;
	float fLocal_33 = 0f;
	var uLocal_34 = 0;
	var uLocal_35 = 0;
	var uLocal_36 = 0;
	var uLocal_37 = 0;
	var uLocal_38 = 0;
	int iLocal_39 = 0;
	int iLocal_40 = 0;
	int iLocal_41 = 0;
	int iLocal_42 = 0;
	var uLocal_43 = 0;
	var uLocal_44 = 0;
	vector3 vLocal_45 = { 0f, 0f, 0f };
	var uLocal_48 = 0;
	var uLocal_49 = 0;
	var uLocal_50 = 1132396544;
	var uLocal_51 = 1132396544;
	var uLocal_52 = 1132396544;
	var uLocal_53 = 0;
	var uLocal_54 = -1082130432;
	var uLocal_55 = 0;
	var uLocal_56 = 0;
	var uLocal_57 = 8;
	var uLocal_58 = 0;
	var uLocal_59 = 0;
	var uLocal_60 = 0;
	var uLocal_61 = 0;
	var uLocal_62 = 0;
	var uLocal_63 = 0;
	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;
	var uLocal_90 = 0;
	var uLocal_91 = 0;
	var uLocal_92 = 0;
	var uLocal_93 = 0;
	var uLocal_94 = 0;
	var uLocal_95 = 0;
	var uLocal_96 = 0;
	var uLocal_97 = 0;
	var uLocal_98 = 0;
	var uLocal_99 = 0;
	var uLocal_100 = 0;
	var uLocal_101 = 0;
	var uLocal_102 = 0;
	var uLocal_103 = 0;
	var uLocal_104 = 0;
	var uLocal_105 = 0;
	var uLocal_106 = 0;
	var uLocal_107 = 0;
	var uLocal_108 = 0;
	var uLocal_109 = 0;
	var uLocal_110 = 0;
	var uLocal_111 = 0;
	var uLocal_112 = 0;
	var uLocal_113 = 0;
	var uLocal_114 = -1;
	var uLocal_115 = 1092616192;
	var uLocal_116 = 0;
	var uLocal_117 = 0;
	int iLocal_118 = 0;
	int iLocal_119 = 0;
	int iLocal_120 = 0;
	int iLocal_121 = 0;
	vector3 vLocal_122 = { 0f, 0f, 15f };
	var uLocal_125 = 1500;
	var uLocal_126 = 45;
	var uLocal_127 = 1103626240;
	var uLocal_128 = 5;
	var uLocal_129 = 0;
	var uLocal_130 = 0;
	var uLocal_131 = 0;
	var uLocal_132 = 0;
	int iLocal_133 = 0;
	float fLocal_134 = 0f;
	float fLocal_135 = 0f;
	float fLocal_136 = 0f;
	int iLocal_137 = 0;
	int iLocal_138 = 0;
	int iLocal_139 = 0;
	var uLocal_140 = 0;
	var uLocal_141 = 0;
	int iLocal_142 = 0;
	var uLocal_143 = 0;
	int iLocal_144 = 0;
	int iLocal_145 = 0;
	int iLocal_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 = 3;
	var uLocal_183 = 0;
	var uLocal_184 = 0;
	var uLocal_185 = 0;
	var uLocal_186 = 1;
	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 = 2;
	var uLocal_204 = 0;
	var uLocal_205 = 0;
	var uLocal_206 = 0;
	var uLocal_207 = 13;
	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 = 13;
	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;
	var uLocal_303 = 0;
	var uLocal_304 = 0;
	var uLocal_305 = 0;
	var uLocal_306 = 0;
	var uLocal_307 = 0;
	var uLocal_308 = 0;
	var uLocal_309 = 0;
	var uLocal_310 = 0;
	var uLocal_311 = 0;
	var uLocal_312 = 0;
	var uLocal_313 = 0;
	var uLocal_314 = 0;
	var uLocal_315 = 0;
	var uLocal_316 = 0;
	var uLocal_317 = 0;
	var uLocal_318 = 0;
	var uLocal_319 = 0;
	var uLocal_320 = 0;
	var uLocal_321 = 0;
	var uLocal_322 = 0;
	var uLocal_323 = 0;
	var uLocal_324 = 0;
	var uLocal_325 = 0;
	var uLocal_326 = 0;
	var uLocal_327 = 0;
	var uLocal_328 = 0;
	var uLocal_329 = 0;
	var uLocal_330 = 0;
	var uLocal_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;
	var uLocal_347 = 0;
	var uLocal_348 = 0;
	var uLocal_349 = 0;
	var uLocal_350 = 0;
	var uLocal_351 = 0;
	var uLocal_352 = 0;
	var uLocal_353 = 0;
	var uLocal_354 = 0;
	var uLocal_355 = 0;
	var uLocal_356 = 0;
	var uLocal_357 = 0;
	var uLocal_358 = 0;
	var uLocal_359 = 0;
	var uLocal_360 = 0;
	var uLocal_361 = 0;
	var uLocal_362 = 0;
	var uLocal_363 = 0;
	var uLocal_364 = 0;
	var uLocal_365 = 0;
	var uLocal_366 = 0;
	var uLocal_367 = 0;
	var uLocal_368 = 0;
	var uLocal_369 = 0;
	var uLocal_370 = 0;
	var uLocal_371 = 0;
	var uLocal_372 = 0;
	var uLocal_373 = 0;
	var uLocal_374 = 0;
	var uLocal_375 = 0;
	var uLocal_376 = 0;
	var uLocal_377 = 0;
	var uLocal_378 = 0;
	var uLocal_379 = 0;
	var uLocal_380 = 0;
	var uLocal_381 = 0;
	var uLocal_382 = 0;
	var uLocal_383 = 0;
	var uLocal_384 = 0;
	var uLocal_385 = 0;
	var uLocal_386 = 0;
	var uLocal_387 = 0;
	var uLocal_388 = 0;
	var uLocal_389 = 0;
	var uLocal_390 = 0;
	var uLocal_391 = 0;
	var uLocal_392 = 0;
	var uLocal_393 = 0;
	var uLocal_394 = 0;
	var uLocal_395 = 0;
	var uLocal_396 = 0;
	var uLocal_397 = 0;
	var uLocal_398 = 0;
	var uLocal_399 = 0;
	var uLocal_400 = 0;
	var uLocal_401 = 0;
	var uLocal_402 = 0;
	var uLocal_403 = 0;
	var uLocal_404 = 0;
	var uLocal_405 = 0;
	var uLocal_406 = 0;
	var uLocal_407 = 0;
	var uLocal_408 = 0;
	var uLocal_409 = 0;
	var uLocal_410 = 0;
	var uLocal_411 = 0;
	var uLocal_412 = 0;
	var uLocal_413 = 0;
	var uLocal_414 = 0;
	var uLocal_415 = 0;
	var uLocal_416 = 0;
	var uLocal_417 = 0;
	var uLocal_418 = 0;
	var uLocal_419 = 0;
	var uLocal_420 = 0;
	var uLocal_421 = 0;
	var uLocal_422 = 0;
	var uLocal_423 = 0;
	var uLocal_424 = 0;
	var uLocal_425 = 0;
	var uLocal_426 = 0;
	var uLocal_427 = 0;
	var uLocal_428 = 0;
	var uLocal_429 = 0;
	var uLocal_430 = 13;
	var uLocal_431 = 0;
	var uLocal_432 = 0;
	var uLocal_433 = 0;
	var uLocal_434 = 0;
	var uLocal_435 = 0;
	var uLocal_436 = 0;
	var uLocal_437 = 0;
	var uLocal_438 = 0;
	var uLocal_439 = 0;
	var uLocal_440 = 0;
	var uLocal_441 = 0;
	var uLocal_442 = 0;
	var uLocal_443 = 0;
	var uLocal_444 = 0;
	var uLocal_445 = 0;
	var uLocal_446 = 0;
	var uLocal_447 = 0;
	var uLocal_448 = 0;
	var uLocal_449 = 0;
	var uLocal_450 = 0;
	var uLocal_451 = 0;
	var uLocal_452 = 0;
	var uLocal_453 = 0;
	var uLocal_454 = 0;
	var uLocal_455 = 0;
	var uLocal_456 = 0;
	var uLocal_457 = 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;
	var uLocal_464 = 0;
	var uLocal_465 = 0;
	var uLocal_466 = 0;
	var uLocal_467 = 0;
	var uLocal_468 = 0;
	var uLocal_469 = 0;
	var uLocal_470 = 0;
	var uLocal_471 = 0;
	var uLocal_472 = 0;
	var uLocal_473 = 0;
	var uLocal_474 = 0;
	var uLocal_475 = 0;
	var uLocal_476 = 0;
	var uLocal_477 = 0;
	var uLocal_478 = 0;
	var uLocal_479 = 0;
	var uLocal_480 = 0;
	var uLocal_481 = 0;
	var uLocal_482 = 0;
	var uLocal_483 = 0;
	var uLocal_484 = 0;
	var uLocal_485 = 0;
	var uLocal_486 = 0;
	var uLocal_487 = 0;
	var uLocal_488 = 0;
	var uLocal_489 = 0;
	var uLocal_490 = 0;
	var uLocal_491 = 0;
	var uLocal_492 = 0;
	var uLocal_493 = 0;
	var uLocal_494 = 0;
	var uLocal_495 = 0;
	var uLocal_496 = 0;
	var uLocal_497 = 0;
	var uLocal_498 = 0;
	var uLocal_499 = 0;
	var uLocal_500 = 0;
	var uLocal_501 = 0;
	var uLocal_502 = 0;
	var uLocal_503 = 0;
	var uLocal_504 = 0;
	var uLocal_505 = 0;
	var uLocal_506 = 0;
	var uLocal_507 = 0;
	var uLocal_508 = 0;
	var uLocal_509 = 0;
	var uLocal_510 = 0;
	var uLocal_511 = 0;
	var uLocal_512 = 0;
	var uLocal_513 = 0;
	var uLocal_514 = 0;
	var uLocal_515 = 0;
	var uLocal_516 = 0;
	var uLocal_517 = 0;
	var uLocal_518 = 0;
	var uLocal_519 = 0;
	var uLocal_520 = 0;
	var uLocal_521 = 0;
	var uLocal_522 = 0;
	var uLocal_523 = 0;
	var uLocal_524 = 0;
	var uLocal_525 = 0;
	var uLocal_526 = 0;
	var uLocal_527 = 0;
	var uLocal_528 = 0;
	var uLocal_529 = 0;
	var uLocal_530 = 0;
	var uLocal_531 = 0;
	var uLocal_532 = 0;
	var uLocal_533 = 0;
	var uLocal_534 = 0;
	var uLocal_535 = 0;
	var uLocal_536 = 0;
	var uLocal_537 = 0;
	var uLocal_538 = 0;
	var uLocal_539 = 0;
	var uLocal_540 = 0;
	var uLocal_541 = 0;
	var uLocal_542 = 0;
	var uLocal_543 = 0;
	var uLocal_544 = 0;
	var uLocal_545 = 0;
	var uLocal_546 = 0;
	var uLocal_547 = 0;
	var uLocal_548 = 0;
	var uLocal_549 = 0;
	var uLocal_550 = 0;
	var uLocal_551 = 0;
	var uLocal_552 = 0;
	var uLocal_553 = 0;
	var uLocal_554 = 0;
	var uLocal_555 = 0;
	var uLocal_556 = 0;
	var uLocal_557 = 0;
	var uLocal_558 = 0;
	var uLocal_559 = 0;
	var uLocal_560 = 0;
	var uLocal_561 = 0;
	var uLocal_562 = 0;
	var uLocal_563 = 0;
	var uLocal_564 = 0;
	var uLocal_565 = 0;
	var uLocal_566 = 0;
	var uLocal_567 = 0;
	var uLocal_568 = 0;
	var uLocal_569 = 0;
	var uLocal_570 = 0;
	var uLocal_571 = 0;
	var uLocal_572 = 0;
	var uLocal_573 = 0;
	var uLocal_574 = 0;
	var uLocal_575 = 0;
	var uLocal_576 = 0;
	var uLocal_577 = 0;
	var uLocal_578 = 0;
	var uLocal_579 = 0;
	var uLocal_580 = 0;
	var uLocal_581 = 0;
	var uLocal_582 = 0;
	var uLocal_583 = 0;
	var uLocal_584 = 0;
	var uLocal_585 = 0;
	var uLocal_586 = 0;
	var uLocal_587 = 0;
	var uLocal_588 = 0;
	var uLocal_589 = 0;
	var uLocal_590 = 0;
	var uLocal_591 = 0;
	var uLocal_592 = 0;
	var uLocal_593 = 0;
	var uLocal_594 = 0;
	var uLocal_595 = 0;
	var uLocal_596 = 0;
	var uLocal_597 = 0;
	var uLocal_598 = 0;
	var uLocal_599 = 0;
	var uLocal_600 = 0;
	var uLocal_601 = 0;
	var uLocal_602 = 0;
	var uLocal_603 = 0;
	var uLocal_604 = 0;
	var uLocal_605 = 0;
	var uLocal_606 = 0;
	var uLocal_607 = 0;
	var uLocal_608 = 0;
	var uLocal_609 = 0;
	var uLocal_610 = 0;
	var uLocal_611 = 0;
	var uLocal_612 = 0;
	var uLocal_613 = 0;
	var uLocal_614 = 0;
	var uLocal_615 = 0;
	var uLocal_616 = 0;
	var uLocal_617 = 0;
	var uLocal_618 = 0;
	var uLocal_619 = 0;
	var uLocal_620 = 0;
	var uLocal_621 = 0;
	var uLocal_622 = 0;
	var uLocal_623 = 0;
	var uLocal_624 = 0;
	var uLocal_625 = 0;
	var uLocal_626 = 0;
	var uLocal_627 = 0;
	var uLocal_628 = 0;
	var uLocal_629 = 0;
	var uLocal_630 = 0;
	var uLocal_631 = 0;
	var uLocal_632 = 0;
	var uLocal_633 = 0;
	var uLocal_634 = 0;
	var uLocal_635 = 0;
	var uLocal_636 = 0;
	var uLocal_637 = 0;
	var uLocal_638 = 0;
	var uLocal_639 = 13;
	var uLocal_640 = 0;
	var uLocal_641 = 0;
	var uLocal_642 = 0;
	var uLocal_643 = 0;
	var uLocal_644 = 0;
	var uLocal_645 = 0;
	var uLocal_646 = 0;
	var uLocal_647 = 0;
	var uLocal_648 = 0;
	var uLocal_649 = 0;
	var uLocal_650 = 0;
	var uLocal_651 = 0;
	var uLocal_652 = 0;
	var uLocal_653 = 13;
	var uLocal_654 = 0;
	var uLocal_655 = 0;
	var uLocal_656 = 0;
	var uLocal_657 = 0;
	var uLocal_658 = 0;
	var uLocal_659 = 0;
	var uLocal_660 = 0;
	var uLocal_661 = 0;
	var uLocal_662 = 0;
	var uLocal_663 = 0;
	var uLocal_664 = 0;
	var uLocal_665 = 0;
	var uLocal_666 = 0;
	var uLocal_667 = 13;
	var uLocal_668 = 0;
	var uLocal_669 = 0;
	var uLocal_670 = 0;
	var uLocal_671 = 0;
	var uLocal_672 = 0;
	var uLocal_673 = 0;
	var uLocal_674 = 0;
	var uLocal_675 = 0;
	var uLocal_676 = 0;
	var uLocal_677 = 0;
	var uLocal_678 = 0;
	var uLocal_679 = 0;
	var uLocal_680 = 0;
	var uLocal_681 = 13;
	var uLocal_682 = 0;
	var uLocal_683 = 0;
	var uLocal_684 = 0;
	var uLocal_685 = 0;
	var uLocal_686 = 0;
	var uLocal_687 = 0;
	var uLocal_688 = 0;
	var uLocal_689 = 0;
	var uLocal_690 = 0;
	var uLocal_691 = 0;
	var uLocal_692 = 0;
	var uLocal_693 = 0;
	var uLocal_694 = 0;
	var uLocal_695 = 0;
	var uLocal_696 = 0;
	var uLocal_697 = 0;
	var uLocal_698 = 0;
	var uLocal_699 = 0;
	var uLocal_700 = 0;
	var uLocal_701 = 0;
	var uLocal_702 = 0;
	var uLocal_703 = 0;
	var uLocal_704 = 0;
	var uLocal_705 = 0;
	var uLocal_706 = 0;
	var uLocal_707 = 0;
	var uLocal_708 = 0;
	var uLocal_709 = 0;
	var uLocal_710 = 0;
	var uLocal_711 = 0;
	var uLocal_712 = 0;
	var uLocal_713 = 0;
	var uLocal_714 = 0;
	var uLocal_715 = 0;
	var uLocal_716 = 0;
	var uLocal_717 = 0;
	var uLocal_718 = 0;
	var uLocal_719 = 0;
	var uLocal_720 = 0;
	var uLocal_721 = 0;
	var uLocal_722 = 0;
	var uLocal_723 = 0;
	var uLocal_724 = 0;
	var uLocal_725 = 0;
	struct<61> Local_726 = { 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
	var uLocal_787 = 0;
	var uLocal_788 = 0;
	var uLocal_789 = 0;
	var uLocal_790 = 0;
	var uLocal_791 = 0;
	var uLocal_792 = 0;
	var uLocal_793 = 0;
	var uLocal_794 = 0;
	int iLocal_795 = 0;
	int iLocal_796 = 0;
	var uLocal_797 = 16;
	var uLocal_798 = 0;
	var uLocal_799 = 0;
	var uLocal_800 = 0;
	var uLocal_801 = 0;
	var uLocal_802 = 0;
	var uLocal_803 = 0;
	var uLocal_804 = 0;
	var uLocal_805 = 0;
	var uLocal_806 = 0;
	var uLocal_807 = 0;
	var uLocal_808 = 0;
	var uLocal_809 = 0;
	var uLocal_810 = 0;
	var uLocal_811 = 0;
	var uLocal_812 = 0;
	var uLocal_813 = 0;
	var uLocal_814 = 0;
	var uLocal_815 = 0;
	var uLocal_816 = 0;
	var uLocal_817 = 0;
	var uLocal_818 = 0;
	var uLocal_819 = 0;
	var uLocal_820 = 0;
	var uLocal_821 = 0;
	var uLocal_822 = 0;
	var uLocal_823 = 0;
	var uLocal_824 = 0;
	var uLocal_825 = 0;
	var uLocal_826 = 0;
	var uLocal_827 = 0;
	var uLocal_828 = 0;
	var uLocal_829 = 0;
	var uLocal_830 = 0;
	var uLocal_831 = 0;
	var uLocal_832 = 0;
	var uLocal_833 = 0;
	var uLocal_834 = 0;
	var uLocal_835 = 0;
	var uLocal_836 = 0;
	var uLocal_837 = 0;
	var uLocal_838 = 0;
	var uLocal_839 = 0;
	var uLocal_840 = 0;
	var uLocal_841 = 0;
	var uLocal_842 = 0;
	var uLocal_843 = 0;
	var uLocal_844 = 0;
	var uLocal_845 = 0;
	var uLocal_846 = 0;
	var uLocal_847 = 0;
	var uLocal_848 = 0;
	var uLocal_849 = 0;
	var uLocal_850 = 0;
	var uLocal_851 = 0;
	var uLocal_852 = 0;
	var uLocal_853 = 0;
	var uLocal_854 = 0;
	var uLocal_855 = 0;
	var uLocal_856 = 0;
	var uLocal_857 = 0;
	var uLocal_858 = 0;
	var uLocal_859 = 0;
	var uLocal_860 = 0;
	var uLocal_861 = 0;
	var uLocal_862 = 0;
	var uLocal_863 = 0;
	var uLocal_864 = 0;
	var uLocal_865 = 0;
	var uLocal_866 = 0;
	var uLocal_867 = 0;
	var uLocal_868 = 0;
	var uLocal_869 = 0;
	var uLocal_870 = 0;
	var uLocal_871 = 0;
	var uLocal_872 = 0;
	var uLocal_873 = 0;
	var uLocal_874 = 0;
	var uLocal_875 = 0;
	var uLocal_876 = 0;
	var uLocal_877 = 0;
	var uLocal_878 = 0;
	var uLocal_879 = 0;
	var uLocal_880 = 0;
	var uLocal_881 = 0;
	var uLocal_882 = 0;
	var uLocal_883 = 0;
	var uLocal_884 = 0;
	var uLocal_885 = 0;
	var uLocal_886 = 0;
	var uLocal_887 = 0;
	var uLocal_888 = 0;
	var uLocal_889 = 0;
	var uLocal_890 = 0;
	var uLocal_891 = 0;
	var uLocal_892 = 0;
	var uLocal_893 = 0;
	var uLocal_894 = 0;
	var uLocal_895 = 0;
	var uLocal_896 = 0;
	var uLocal_897 = 0;
	var uLocal_898 = 0;
	var uLocal_899 = 0;
	var uLocal_900 = 0;
	var uLocal_901 = 0;
	var uLocal_902 = 0;
	var uLocal_903 = 0;
	var uLocal_904 = 0;
	var uLocal_905 = 0;
	var uLocal_906 = 0;
	var uLocal_907 = 0;
	var uLocal_908 = 0;
	var uLocal_909 = 0;
	var uLocal_910 = 0;
	var uLocal_911 = 0;
	var uLocal_912 = 0;
	var uLocal_913 = 0;
	var uLocal_914 = 0;
	var uLocal_915 = 0;
	var uLocal_916 = 0;
	var uLocal_917 = 0;
	var uLocal_918 = 0;
	var uLocal_919 = 0;
	var uLocal_920 = 0;
	var uLocal_921 = 0;
	var uLocal_922 = 0;
	var uLocal_923 = 0;
	var uLocal_924 = 0;
	var uLocal_925 = 0;
	var uLocal_926 = 0;
	var uLocal_927 = 0;
	var uLocal_928 = 0;
	var uLocal_929 = 0;
	var uLocal_930 = 0;
	var uLocal_931 = 0;
	var uLocal_932 = 0;
	var uLocal_933 = 0;
	var uLocal_934 = 0;
	var uLocal_935 = 0;
	var uLocal_936 = 0;
	var uLocal_937 = 0;
	var uLocal_938 = 0;
	var uLocal_939 = 0;
	var uLocal_940 = 0;
	var uLocal_941 = 0;
	var uLocal_942 = 0;
	var uLocal_943 = 0;
	var uLocal_944 = 0;
	var uLocal_945 = 0;
	var uLocal_946 = 0;
	var uLocal_947 = 0;
	var uLocal_948 = 0;
	var uLocal_949 = 0;
	var uLocal_950 = 0;
	var uLocal_951 = 0;
	var uLocal_952 = 0;
	var uLocal_953 = 0;
	var uLocal_954 = 0;
	var uLocal_955 = 0;
	var uLocal_956 = 0;
	var uLocal_957 = 0;
	var uLocal_958 = 0;
	var uLocal_959 = 0;
	var uLocal_960 = 0;
	var uLocal_961 = 0;
	var uLocal_962 = 0;
	var uLocal_963 = 0;
	var uLocal_964 = 0;
	var uLocal_965 = 0;
	var uLocal_966 = 0;
	var uLocal_967 = 0;
	var uLocal_968 = 0;
	var uLocal_969 = 0;
	var uLocal_970 = 0;
	var uLocal_971 = 0;
	var uLocal_972 = 0;
	var uLocal_973 = 0;
	var uLocal_974 = 0;
	var uLocal_975 = 0;
	var uLocal_976 = 0;
	var uLocal_977 = 0;
	var uLocal_978 = 0;
	var uLocal_979 = 0;
	var uLocal_980 = 0;
	var uLocal_981 = 12;
	var uLocal_982 = 0;
	var uLocal_983 = 0;
	var uLocal_984 = 0;
	var uLocal_985 = 0;
	var uLocal_986 = 0;
	var uLocal_987 = 0;
	var uLocal_988 = 0;
	var uLocal_989 = 0;
	var uLocal_990 = 0;
	var uLocal_991 = 0;
	var uLocal_992 = 0;
	var uLocal_993 = 0;
	var uLocal_994 = 0;
	var uLocal_995 = 0;
	var uLocal_996 = 0;
	var uLocal_997 = 0;
	var uLocal_998 = 0;
	var uLocal_999 = 0;
	var uLocal_1000 = 0;
	var uLocal_1001 = 0;
	var uLocal_1002 = 0;
	var uLocal_1003 = 0;
	var uLocal_1004 = 0;
	var uLocal_1005 = 0;
	var uLocal_1006 = 0;
	var uLocal_1007 = 0;
	var uLocal_1008 = 0;
	var uLocal_1009 = 0;
	var uLocal_1010 = 0;
	var uLocal_1011 = 0;
	var uLocal_1012 = 0;
	var uLocal_1013 = 0;
	var uLocal_1014 = 0;
	var uLocal_1015 = 0;
	var uLocal_1016 = 0;
	var uLocal_1017 = 0;
	char cLocal_1018[32] = "";
	var uLocal_1022 = 0;
	var uLocal_1023 = 0;
	var uLocal_1024 = 0;
	var uLocal_1025 = 0;
	int iLocal_1026 = 0;
	int iLocal_1027 = 0;
	int iLocal_1028 = 0;
	int iLocal_1029 = 0;
	int iLocal_1030 = 0;
	int iLocal_1031 = 0;
	int iLocal_1032 = 0;
	var uLocal_1033 = 0;
	int iLocal_1034 = 0;
	var uLocal_1035 = 0;
	var uLocal_1036 = 0;
	int iLocal_1037 = 0;
	var uLocal_1038 = 0;
	var uLocal_1039 = 0;
	int iLocal_1040 = 0;
	int iLocal_1041 = 0;
	int iLocal_1042 = 0;
	int iLocal_1043 = 0;
	struct<17> Local_1044 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 16 } ;
	var uLocal_1061 = 0;
	var uLocal_1062 = 0;
	var uLocal_1063 = 0;
	var uLocal_1064 = 0;
	var uLocal_1065 = 0;
	var uLocal_1066 = 0;
	var uLocal_1067 = 0;
	var uLocal_1068 = 0;
	var uLocal_1069 = 0;
	var uLocal_1070 = 0;
	var uLocal_1071 = 0;
	var uLocal_1072 = 0;
	var uLocal_1073 = 0;
	var uLocal_1074 = 0;
	var uLocal_1075 = 0;
	var uLocal_1076 = 0;
	var uLocal_1077 = 0;
	var uLocal_1078 = 0;
	var uLocal_1079 = 0;
	var uLocal_1080 = 0;
	var uLocal_1081 = 0;
	var uLocal_1082 = 0;
	var uLocal_1083 = 0;
	var uLocal_1084 = 0;
	var uLocal_1085 = 0;
	var uLocal_1086 = 0;
	var uLocal_1087 = 0;
	var uLocal_1088 = 0;
	var uLocal_1089 = 0;
	var uLocal_1090 = 0;
	var uLocal_1091 = 0;
	var uLocal_1092 = 0;
	var uLocal_1093 = 0;
	var uLocal_1094 = 0;
	var uLocal_1095 = 0;
	var uLocal_1096 = 0;
	var uLocal_1097 = 0;
	var uLocal_1098 = 0;
	var uLocal_1099 = 0;
	var uLocal_1100 = 0;
	var uLocal_1101 = 0;
	var uLocal_1102 = 0;
	var uLocal_1103 = 0;
	var uLocal_1104 = 0;
	var uLocal_1105 = 0;
	var uLocal_1106 = 0;
	var uLocal_1107 = 0;
	var uLocal_1108 = 0;
	var uLocal_1109 = 0;
	var uLocal_1110 = 0;
	var uLocal_1111 = 0;
	var uLocal_1112 = 0;
	var uLocal_1113 = 0;
	var uLocal_1114 = 0;
	var uLocal_1115 = 0;
	var uLocal_1116 = 0;
	var uLocal_1117 = 0;
	var uLocal_1118 = 0;
	var uLocal_1119 = 0;
	var uLocal_1120 = 0;
	var uLocal_1121 = 0;
	var uLocal_1122 = 0;
	var uLocal_1123 = 0;
	var uLocal_1124 = 0;
	var uLocal_1125 = 0;
	var uLocal_1126 = 0;
	var uLocal_1127 = 0;
	var uLocal_1128 = 0;
	var uLocal_1129 = 0;
	var uLocal_1130 = 0;
	var uLocal_1131 = 0;
	var uLocal_1132 = 0;
	var uLocal_1133 = 0;
	var uLocal_1134 = 0;
	var uLocal_1135 = 0;
	var uLocal_1136 = 0;
	var uLocal_1137 = 0;
	var uLocal_1138 = 0;
	var uLocal_1139 = 0;
	var uLocal_1140 = 0;
	var uLocal_1141 = 0;
	var uLocal_1142 = 0;
	var uLocal_1143 = 0;
	var uLocal_1144 = 0;
	var uLocal_1145 = 0;
	var uLocal_1146 = 0;
	var uLocal_1147 = 0;
	var uLocal_1148 = 0;
	var uLocal_1149 = 0;
	var uLocal_1150 = 0;
	var uLocal_1151 = 0;
	var uLocal_1152 = 0;
	var uLocal_1153 = 0;
	var uLocal_1154 = 0;
	var uLocal_1155 = 0;
	var uLocal_1156 = 0;
	var uLocal_1157 = 0;
	var uLocal_1158 = 0;
	var uLocal_1159 = 0;
	var uLocal_1160 = 0;
	var uLocal_1161 = 0;
	var uLocal_1162 = 0;
	var uLocal_1163 = 0;
	var uLocal_1164 = 0;
	var uLocal_1165 = 0;
	var uLocal_1166 = 0;
	var uLocal_1167 = 0;
	var uLocal_1168 = 0;
	var uLocal_1169 = 0;
	var uLocal_1170 = 0;
	var uLocal_1171 = 0;
	var uLocal_1172 = 0;
	var uLocal_1173 = 0;
	var uLocal_1174 = 0;
	var uLocal_1175 = 0;
	var uLocal_1176 = 0;
	var uLocal_1177 = 0;
	var uLocal_1178 = 0;
	var uLocal_1179 = 0;
	var uLocal_1180 = 0;
	var uLocal_1181 = 0;
	var uLocal_1182 = 0;
	var uLocal_1183 = 0;
	var uLocal_1184 = 0;
	var uLocal_1185 = 0;
	var uLocal_1186 = 0;
	var uLocal_1187 = 0;
	var uLocal_1188 = 0;
	var uLocal_1189 = 0;
	var uLocal_1190 = 0;
	var uLocal_1191 = 0;
	var uLocal_1192 = 0;
	var uLocal_1193 = 0;
	var uLocal_1194 = 0;
	var uLocal_1195 = 0;
	var uLocal_1196 = 0;
	var uLocal_1197 = 0;
	var uLocal_1198 = 0;
	var uLocal_1199 = 0;
	var uLocal_1200 = 0;
	var uLocal_1201 = 0;
	var uLocal_1202 = 0;
	var uLocal_1203 = 0;
	var uLocal_1204 = 0;
	var uLocal_1205 = 0;
	var uLocal_1206 = 0;
	var uLocal_1207 = 0;
	var uLocal_1208 = 0;
	var uLocal_1209 = 0;
	var uLocal_1210 = 0;
	var uLocal_1211 = 0;
	var uLocal_1212 = 0;
	var uLocal_1213 = 0;
	var uLocal_1214 = 0;
	var uLocal_1215 = 0;
	var uLocal_1216 = 0;
	var uLocal_1217 = 0;
	var uLocal_1218 = 0;
	var uLocal_1219 = 0;
	var uLocal_1220 = 0;
	var uLocal_1221 = 0;
	var uLocal_1222 = 0;
	var uLocal_1223 = 0;
	var uLocal_1224 = 0;
	var uLocal_1225 = 0;
	var uLocal_1226 = 0;
	var uLocal_1227 = 0;
	var uLocal_1228 = 0;
	var uLocal_1229 = 0;
	var uLocal_1230 = 0;
	struct<39> Local_1231 = { 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 } ;
	var uLocal_1270 = 0;
	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;
	var uLocal_1436 = 0;
	var uLocal_1437 = 0;
	var uLocal_1438 = 0;
	var uLocal_1439 = 0;
	var uLocal_1440 = 0;
	var uLocal_1441 = 0;
	int iLocal_1442 = 0;
	int iLocal_1443 = 0;
	float fLocal_1444 = 0f;
	var uLocal_1445 = 0;
	var uLocal_1446 = 0;
	var uLocal_1447 = 0;
	var uLocal_1448 = 0;
	var uLocal_1449 = 0;
	var uLocal_1450 = 0;
	var uLocal_1451 = 0;
	var uLocal_1452 = 0;
	var uLocal_1453 = 0;
	var uLocal_1454 = 0;
	var uLocal_1455 = 21;
	var uLocal_1456 = 6;
	var uLocal_1457 = 0;
	var uLocal_1458 = 0;
	var uLocal_1459 = 0;
	int iLocal_1460 = 0;
	int iLocal_1461 = 0;
	int iLocal_1462 = 0;
	int iLocal_1463 = 0;
	int iLocal_1464 = 0;
	vector3 vLocal_1465 = { 0f, 0f, 0f };
	vector3 vLocal_1468 = { 0f, 0f, 0f };
	float fLocal_1471 = 0f;
	float fLocal_1472 = 0f;
	var uLocal_1473 = 0;
	var uLocal_1474 = 0;
	vector3 vLocal_1475 = { 0f, 0f, 0f };
	vector3 vLocal_1478 = { 0f, 0f, 0f };
	int iLocal_1481 = 0;
	var uLocal_1482 = 0;
	var uLocal_1483 = 0;
	int iLocal_1484 = 0;
	var uLocal_1485 = 0;
	var uLocal_1486 = 0;
	int iLocal_1487 = 0;
	int iLocal_1488 = 0;
	int iLocal_1489 = 0;
	int iLocal_1490 = 0;
	vector3 vLocal_1491 = { 0f, 0f, 0f };
	vector3 vLocal_1494 = { 0f, 0f, 0f };
	int iLocal_1497 = 0;
	int iLocal_1498 = 0;
	int iLocal_1499 = 0;
	int iLocal_1500 = 0;
	struct<183> Local_1501 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 16, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
	struct<275> Local_1684 = { 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, 11, 0, 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, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 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, 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, 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, 4, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ;
	int iLocal_1959 = 0;
	int iLocal_1960 = 0;
	int iLocal_1961 = 0;
	int iLocal_1962 = 0;
	int iLocal_1963 = 0;
	int iLocal_1964 = 0;
	int iLocal_1965 = 0;
	int iLocal_1966 = 0;
	int iLocal_1967 = 0;
	int iLocal_1968 = 0;
	int iLocal_1969 = 0;
	int iLocal_1970 = 0;
	int iLocal_1971 = 0;
	int iLocal_1972 = 0;
	int iLocal_1973 = 0;
	int iLocal_1974 = 0;
	int iLocal_1975 = 0;
	int iLocal_1976 = 0;
	int iLocal_1977 = 0;
	int iLocal_1978 = 0;
	int iLocal_1979 = 0;
	int iLocal_1980 = 0;
	int iLocal_1981 = 0;
	int iLocal_1982 = 0;
	int iLocal_1983 = 0;
	int iLocal_1984 = 0;
	int iLocal_1985 = 0;
	int iLocal_1986 = 0;
	int iLocal_1987 = 0;
	var uLocal_1988 = 0;
	int iLocal_1989 = 0;
	int iLocal_1990 = 0;
	int iLocal_1991 = 0;
	int iLocal_1992 = 0;
	int iLocal_1993 = 0;
	int iLocal_1994 = 0;
	int iLocal_1995 = 0;
	int iLocal_1996 = 0;
	int iLocal_1997 = 0;
	int iLocal_1998 = 0;
	char* sLocal_1999 = NULL;
	char* sLocal_2000 = NULL;
	int iLocal_2001 = 0;
	var uLocal_2002 = 0;
	int iLocal_2003 = 0;
	int iLocal_2004 = 0;
	int iLocal_2005 = 0;
	int iLocal_2006 = 0;
	int iLocal_2007 = 0;
	float fLocal_2008 = 0f;
	int iLocal_2009 = 0;
	int iLocal_2010 = 0;
	int iLocal_2011 = 0;
	int iLocal_2012 = 0;
	int iLocal_2013 = 0;
	int iLocal_2014 = 0;
	vector3 vLocal_2015 = { 0f, 0f, 0f };
	vector3 vLocal_2018 = { 0f, 0f, 0f };
	vector3 vLocal_2021[2] = {{ 0f, 0f, 0f }, { 0f, 0f, 0f } };
	var uLocal_2028 = 0;
	var uLocal_2029 = 0;
	var uLocal_2030 = 0;
	vector3 vLocal_2031 = { 0f, 0f, 0f };
	vector3 vLocal_2034 = { 0f, 0f, 0f };
	vector3 vLocal_2037 = { 0f, 0f, 0f };
	vector3 vLocal_2040 = { 0f, 0f, 0f };
	vector3 vLocal_2043 = { 0f, 0f, 0f };
	float fLocal_2046 = 0f;
	vector3 vLocal_2047 = { 0f, 0f, 0f };
	float fLocal_2050 = 0f;
	vector3 vLocal_2051 = { 0f, 0f, 0f };
	float fLocal_2054 = 0f;
	float fLocal_2055 = 0f;
	char cLocal_2056[16] = "";
	var uLocal_2058 = 0;
	var uLocal_2059 = 0;
	char cLocal_2060[16] = "";
	var uLocal_2062 = 0;
	var uLocal_2063 = 0;
	int iLocal_2064 = 0;
	int iLocal_2065 = 0;
	var uLocal_2066 = 0;
	var uLocal_2067 = 0;
	int iLocal_2068 = 0;
	var uLocal_2069 = 0;
	var uLocal_2070 = 0;
	int iLocal_2071 = 0;
	var uLocal_2072 = 0;
	var uLocal_2073 = 0;
	int iLocal_2074 = 0;
	var uLocal_2075 = 0;
	var uLocal_2076 = 0;
	int iLocal_2077 = 0;
	var uLocal_2078 = 0;
	var uLocal_2079 = 0;
	int iLocal_2080 = 0;
	var uLocal_2081 = 0;
	var uLocal_2082 = 0;
	int iLocal_2083 = 0;
	var uLocal_2084 = 0;
	var uLocal_2085 = 0;
	int iLocal_2086 = 0;
	var uLocal_2087 = 0;
	var uLocal_2088 = 0;
	int iLocal_2089 = 0;
	var uLocal_2090 = 0;
	var uLocal_2091 = 0;
	int iLocal_2092 = 0;
	var uLocal_2093 = 0;
	var uLocal_2094 = 0;
	int iLocal_2095 = 0;
	var uLocal_2096 = 0;
	var uLocal_2097 = 0;
	int iLocal_2098 = 0;
	var uLocal_2099 = 0;
	var uLocal_2100 = 0;
	int iLocal_2101 = 0;
	var uLocal_2102 = 0;
	var uLocal_2103 = 0;
	var uLocal_2104 = -1;
	var uLocal_2105 = 0;
	var uLocal_2106 = 0;
	var uLocal_2107 = 0;
	var uLocal_2108 = 0;
	var uLocal_2109 = 0;
	var uLocal_2110 = 0;
	var uLocal_2111 = 1000;
	var uLocal_2112 = 1000;
	var uLocal_2113 = 0;
	var uLocal_2114 = 0;
	var uLocal_2115 = 0;
	var uLocal_2116 = 8;
	var uLocal_2117 = 0;
	var uLocal_2118 = 0;
	var uLocal_2119 = 0;
	var uLocal_2120 = 4;
	var uLocal_2121 = 0;
	var uLocal_2122 = 0;
	var uLocal_2123 = 0;
	var uLocal_2124 = 0;
	var uLocal_2125 = 0;
	var uLocal_2126 = 0;
	var uLocal_2127 = 0;
	var uLocal_2128 = 0;
	var uLocal_2129 = 0;
	var uLocal_2130 = 0;
	var uLocal_2131 = 0;
	var uLocal_2132 = 0;
	var uLocal_2133 = 0;
	var uLocal_2134 = 0;
	var uLocal_2135 = 4;
	var uLocal_2136 = 0;
	var uLocal_2137 = 0;
	var uLocal_2138 = 0;
	var uLocal_2139 = 0;
	var uLocal_2140 = 0;
	var uLocal_2141 = 0;
	var uLocal_2142 = 0;
	var uLocal_2143 = 0;
	var uLocal_2144 = 0;
	var uLocal_2145 = 0;
	var uLocal_2146 = 0;
	var uLocal_2147 = 0;
	var uLocal_2148 = 0;
	var uLocal_2149 = 0;
	var uLocal_2150 = 4;
	var uLocal_2151 = 0;
	var uLocal_2152 = 0;
	var uLocal_2153 = 0;
	var uLocal_2154 = 0;
	var uLocal_2155 = 0;
	var uLocal_2156 = 0;
	var uLocal_2157 = 0;
	var uLocal_2158 = 0;
	var uLocal_2159 = 0;
	var uLocal_2160 = 0;
	var uLocal_2161 = 0;
	var uLocal_2162 = 0;
	var uLocal_2163 = 0;
	var uLocal_2164 = 0;
	var uLocal_2165 = 4;
	var uLocal_2166 = 0;
	var uLocal_2167 = 0;
	var uLocal_2168 = 0;
	var uLocal_2169 = 0;
	var uLocal_2170 = 0;
	var uLocal_2171 = 0;
	var uLocal_2172 = 0;
	var uLocal_2173 = 0;
	var uLocal_2174 = 0;
	var uLocal_2175 = 0;
	var uLocal_2176 = 0;
	var uLocal_2177 = 0;
	var uLocal_2178 = 0;
	var uLocal_2179 = 0;
	var uLocal_2180 = 4;
	var uLocal_2181 = 0;
	var uLocal_2182 = 0;
	var uLocal_2183 = 0;
	var uLocal_2184 = 0;
	var uLocal_2185 = 0;
	var uLocal_2186 = 0;
	var uLocal_2187 = 0;
	var uLocal_2188 = 0;
	var uLocal_2189 = 0;
	var uLocal_2190 = 0;
	var uLocal_2191 = 0;
	var uLocal_2192 = 0;
	var uLocal_2193 = 0;
	var uLocal_2194 = 0;
	var uLocal_2195 = 4;
	var uLocal_2196 = 0;
	var uLocal_2197 = 0;
	var uLocal_2198 = 0;
	var uLocal_2199 = 0;
	var uLocal_2200 = 0;
	var uLocal_2201 = 0;
	var uLocal_2202 = 0;
	var uLocal_2203 = 0;
	var uLocal_2204 = 0;
	var uLocal_2205 = 0;
	var uLocal_2206 = 0;
	var uLocal_2207 = 0;
	var uLocal_2208 = 0;
	var uLocal_2209 = 0;
	var uLocal_2210 = 4;
	var uLocal_2211 = 0;
	var uLocal_2212 = 0;
	var uLocal_2213 = 0;
	var uLocal_2214 = 0;
	var uLocal_2215 = 0;
	var uLocal_2216 = 0;
	var uLocal_2217 = 0;
	var uLocal_2218 = 0;
	var uLocal_2219 = 0;
	var uLocal_2220 = 0;
	var uLocal_2221 = 0;
	var uLocal_2222 = 0;
	var uLocal_2223 = 0;
	var uLocal_2224 = 0;
	var uLocal_2225 = 4;
	var uLocal_2226 = 0;
	var uLocal_2227 = 0;
	var uLocal_2228 = 0;
	var uLocal_2229 = 0;
	var uLocal_2230 = 0;
	var uLocal_2231 = 0;
	var uLocal_2232 = 0;
	var uLocal_2233 = 0;
	var uLocal_2234 = 0;
	var uLocal_2235 = 0;
	var uLocal_2236 = 0;
	var uLocal_2237 = 0;
	int iLocal_2238 = 0;
	int iLocal_2239 = 0;
	var uLocal_2240 = 15;
	var uLocal_2241 = 0;
	var uLocal_2242 = 0;
	var uLocal_2243 = 0;
	var uLocal_2244 = 0;
	var uLocal_2245 = 0;
	var uLocal_2246 = 0;
	var uLocal_2247 = 0;
	var uLocal_2248 = 0;
	var uLocal_2249 = 0;
	var uLocal_2250 = 0;
	var uLocal_2251 = 0;
	var uLocal_2252 = 0;
	var uLocal_2253 = 0;
	var uLocal_2254 = 0;
	var uLocal_2255 = 0;
	var uLocal_2256 = 0;
	var uLocal_2257 = 0;
	var uLocal_2258 = 0;
	var uLocal_2259 = 0;
	var uLocal_2260 = 0;
	var uLocal_2261 = 0;
	var uLocal_2262 = 0;
	var uLocal_2263 = 0;
	var uLocal_2264 = 0;
	var uLocal_2265 = 0;
	var uLocal_2266 = 0;
	var uLocal_2267 = 0;
	var uLocal_2268 = 0;
	var uLocal_2269 = 0;
	var uLocal_2270 = 0;
	var uLocal_2271 = 0;
	var uLocal_2272 = 0;
	var uLocal_2273 = 0;
	var uLocal_2274 = 0;
	var uLocal_2275 = 0;
	var uLocal_2276 = 0;
	var uLocal_2277 = 0;
	var uLocal_2278 = 0;
	var uLocal_2279 = 0;
	var uLocal_2280 = 0;
	var uLocal_2281 = 0;
	var uLocal_2282 = 0;
	var uLocal_2283 = 0;
	var uLocal_2284 = 0;
	var uLocal_2285 = 0;
	var uLocal_2286 = 0;
	var uLocal_2287 = 0;
	var uLocal_2288 = 0;
	var uLocal_2289 = 0;
	var uLocal_2290 = 0;
	var uLocal_2291 = 0;
	var uLocal_2292 = 0;
	var uLocal_2293 = 0;
	var uLocal_2294 = 0;
	var uLocal_2295 = 0;
	var uLocal_2296 = 0;
	var uLocal_2297 = 0;
	var uLocal_2298 = 0;
	var uLocal_2299 = 0;
	var uLocal_2300 = 0;
	var uLocal_2301 = 0;
	var uLocal_2302 = 0;
	var uLocal_2303 = 0;
	var uLocal_2304 = 0;
	var uLocal_2305 = 0;
	var uLocal_2306 = 0;
	var uLocal_2307 = 0;
	var uLocal_2308 = 0;
	var uLocal_2309 = 0;
	var uLocal_2310 = 0;
	var uLocal_2311 = 0;
	var uLocal_2312 = 0;
	var uLocal_2313 = 0;
	var uLocal_2314 = 0;
	var uLocal_2315 = 0;
	var uLocal_2316 = 0;
	var uLocal_2317 = 0;
	var uLocal_2318 = 0;
	var uLocal_2319 = 0;
	var uLocal_2320 = 0;
	var uLocal_2321 = 0;
	var uLocal_2322 = 0;
	var uLocal_2323 = 0;
	var uLocal_2324 = 0;
	var uLocal_2325 = 0;
	var uLocal_2326 = 0;
	var uLocal_2327 = 0;
	var uLocal_2328 = 0;
	var uLocal_2329 = 0;
	var uLocal_2330 = 0;
	var uLocal_2331 = 0;
	var uLocal_2332 = 0;
	var uLocal_2333 = 0;
	var uLocal_2334 = 0;
	var uLocal_2335 = 0;
	var uLocal_2336 = 0;
	var uLocal_2337 = 0;
	var uLocal_2338 = 0;
	var uLocal_2339 = 0;
	var uLocal_2340 = 0;
	var uLocal_2341 = 0;
	var uLocal_2342 = 0;
	var uLocal_2343 = 0;
	var uLocal_2344 = 0;
	var uLocal_2345 = 0;
	var uLocal_2346 = 0;
	var uLocal_2347 = 0;
	var uLocal_2348 = 0;
	var uLocal_2349 = 0;
	var uLocal_2350 = 0;
	var uLocal_2351 = 0;
	var uLocal_2352 = 0;
	var uLocal_2353 = 0;
	var uLocal_2354 = 0;
	var uLocal_2355 = 0;
	var uLocal_2356 = 0;
	var uLocal_2357 = 0;
	var uLocal_2358 = 0;
	var uLocal_2359 = 0;
	var uLocal_2360 = 0;
	var uLocal_2361 = 0;
	var uLocal_2362 = 0;
	var uLocal_2363 = 0;
	var uLocal_2364 = 0;
	var uLocal_2365 = 0;
	var uLocal_2366 = 0;
	var uLocal_2367 = 0;
	var uLocal_2368 = 0;
	var uLocal_2369 = 0;
	var uLocal_2370 = 0;
	var uLocal_2371 = 0;
	var uLocal_2372 = 0;
	var uLocal_2373 = 0;
	var uLocal_2374 = 0;
	var uLocal_2375 = 0;
	var uLocal_2376 = 0;
	var uLocal_2377 = 0;
	var uLocal_2378 = 0;
	var uLocal_2379 = 0;
	var uLocal_2380 = 0;
	var uLocal_2381 = 0;
	var uLocal_2382 = 0;
	var uLocal_2383 = 0;
	var uLocal_2384 = 0;
	var uLocal_2385 = 0;
	var uLocal_2386 = 0;
	var uLocal_2387 = 0;
	var uLocal_2388 = 0;
	var uLocal_2389 = 0;
	var uLocal_2390 = 0;
	var uLocal_2391 = 0;
	var uLocal_2392 = 0;
	var uLocal_2393 = 0;
	var uLocal_2394 = 0;
	var uLocal_2395 = 0;
	var uLocal_2396 = 0;
	var uLocal_2397 = 0;
	var uLocal_2398 = 0;
	var uLocal_2399 = 0;
	var uLocal_2400 = 0;
	var uLocal_2401 = 0;
	var uLocal_2402 = 0;
	var uLocal_2403 = 0;
	var uLocal_2404 = 0;
	var uLocal_2405 = 0;
	var uLocal_2406 = 0;
	var uLocal_2407 = 0;
	var uLocal_2408 = 0;
	var uLocal_2409 = 0;
	var uLocal_2410 = 0;
	var uLocal_2411 = 0;
	var uLocal_2412 = 0;
	var uLocal_2413 = 0;
	var uLocal_2414 = 0;
	var uLocal_2415 = 0;
	var uLocal_2416 = 0;
	var uLocal_2417 = 0;
	var uLocal_2418 = 0;
	var uLocal_2419 = 0;
	var uLocal_2420 = 0;
	var uLocal_2421 = 0;
	var uLocal_2422 = 0;
	var uLocal_2423 = 0;
	var uLocal_2424 = 0;
	var uLocal_2425 = 0;
	var uLocal_2426 = 0;
	var uLocal_2427 = 0;
	var uLocal_2428 = 0;
	var uLocal_2429 = 0;
	var uLocal_2430 = 0;
	var uLocal_2431 = 0;
	var uLocal_2432 = 0;
	var uLocal_2433 = 0;
	var uLocal_2434 = 0;
	var uLocal_2435 = 0;
	var uLocal_2436 = 0;
	var uLocal_2437 = 0;
	var uLocal_2438 = 0;
	var uLocal_2439 = 0;
	var uLocal_2440 = 0;
	var uLocal_2441 = 0;
	var uLocal_2442 = 0;
	var uLocal_2443 = 0;
	var uLocal_2444 = 0;
	var uLocal_2445 = 0;
	var uLocal_2446 = 0;
	var uLocal_2447 = 0;
	var uLocal_2448 = 0;
	var uLocal_2449 = 0;
	var uLocal_2450 = 0;
	var uLocal_2451 = 0;
	var uLocal_2452 = 0;
	var uLocal_2453 = 0;
	var uLocal_2454 = 0;
	var uLocal_2455 = 0;
	var uLocal_2456 = 0;
	var uLocal_2457 = 0;
	var uLocal_2458 = 0;
	var uLocal_2459 = 0;
	var uLocal_2460 = 0;
	var uLocal_2461 = 0;
	var uLocal_2462 = 0;
	var uLocal_2463 = 0;
	var uLocal_2464 = 0;
	var uLocal_2465 = 0;
	var uLocal_2466 = 0;
	var uLocal_2467 = 0;
	var uLocal_2468 = 0;
	var uLocal_2469 = 0;
	var uLocal_2470 = 0;
	var uLocal_2471 = 0;
	var uLocal_2472 = 0;
	var uLocal_2473 = 0;
	var uLocal_2474 = 0;
	var uLocal_2475 = 0;
	var uLocal_2476 = 0;
	var uLocal_2477 = 0;
	var uLocal_2478 = 0;
	var uLocal_2479 = 0;
	var uLocal_2480 = 0;
	var uLocal_2481 = 0;
	var uLocal_2482 = 0;
	var uLocal_2483 = 0;
	var uLocal_2484 = 0;
	var uLocal_2485 = 0;
	var uLocal_2486 = 0;
	var uLocal_2487 = 0;
	var uLocal_2488 = 0;
	var uLocal_2489 = 0;
	var uLocal_2490 = 0;
	var uLocal_2491 = 0;
	var uLocal_2492 = 0;
	var uLocal_2493 = 0;
	var uLocal_2494 = 0;
	var uLocal_2495 = 0;
	var uLocal_2496 = 0;
	var uLocal_2497 = 0;
	var uLocal_2498 = 0;
	var uLocal_2499 = 0;
	var uLocal_2500 = 0;
	var uLocal_2501 = 0;
	var uLocal_2502 = 0;
	var uLocal_2503 = 0;
	var uLocal_2504 = 0;
	var uLocal_2505 = 0;
	var uLocal_2506 = 0;
	var uLocal_2507 = 0;
	var uLocal_2508 = 0;
	var uLocal_2509 = 0;
	var uLocal_2510 = 0;
	var uLocal_2511 = 0;
	var uLocal_2512 = 0;
	var uLocal_2513 = 1;
	int iLocal_2514 = 0;
	int iLocal_2515 = 0;
	int iLocal_2516 = 0;
	int iLocal_2517 = 0;
	int iLocal_2518 = 0;
	var uLocal_2519 = 0;
	var uLocal_2520 = 0;
	int iLocal_2521 = 0;
	var uLocal_2522 = 0;
	var uLocal_2523 = 0;
	int iLocal_2524 = 0;
	var uLocal_2525 = 4;
	var uLocal_2526 = 0;
	var uLocal_2527 = 0;
	var uLocal_2528 = 0;
	var uLocal_2529 = 0;
	var uLocal_2530 = 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_14 = 0.001f;
	iLocal_17 = -1;
	sLocal_20 = "NULL";
	fLocal_21 = 0f;
	fLocal_25 = -0.0375f;
	fLocal_26 = 0.17f;
	iLocal_28 = 3;
	fLocal_31 = 80f;
	fLocal_32 = 140f;
	fLocal_33 = 180f;
	iLocal_39 = 1;
	iLocal_40 = 65;
	iLocal_41 = 49;
	iLocal_42 = 64;
	vLocal_45 = { 500f, 500f, 500f };
	iLocal_145 = 100;
	iLocal_146 = 3;
	iLocal_795 = ui::_0x4A9923385BDB9DAD();
	iLocal_796 = ui::_get_blip_info_id_iterator();
	iLocal_1041 = 1;
	iLocal_1442 = -1;
	fLocal_1444 = 1f;
	vLocal_1465 = { 214.3677f, -853.6607f, 29.3826f };
	vLocal_1468 = { 214.1545f, -853.6061f, 29.3878f };
	fLocal_1471 = 346.6454f;
	fLocal_1472 = 40f;
	vLocal_1475 = { 215.2688f, -853.8094f, 30.9712f };
	vLocal_1478 = { -3.6234f, -0.0263f, 57.0304f };
	vLocal_1491 = { 0f, 0f, 0f };
	vLocal_1494 = { 0f, 0f, 0f };
	sLocal_2000 = "mini@hookers_spvanilla";
	fLocal_2008 = -1f;
	vLocal_2031 = { -442.3856f, -1704.355f, 17.89104f };
	vLocal_2034 = { -524.8151f, -1771.927f, 20.3315f };
	vLocal_2040 = { -694.3564f, -1607.845f, 21.08559f };
	vLocal_2043 = { 219.4298f, -851.6688f, 29.1372f };
	fLocal_2046 = 249.6805f;
	vLocal_2047 = { -558.4304f, -1825.678f, 22.0848f };
	fLocal_2050 = 68.2288f;
	vLocal_2051 = { -556.8734f, -1822.528f, 22.2149f };
	fLocal_2054 = 77.9792f;
	fLocal_2055 = 35f;
	iLocal_2238 = joaat("primo");
	iLocal_2239 = joaat("a_m_m_soucent_04");
	gameplay::set_mission_flag(1);
	if (player::has_force_cleanup_occurred(3))
	{
		func_451();
		audio::trigger_music_event("ASS3_FAIL");
		func_449(&(Global_101553.f_18818.f_1), 1024);
		func_447();
		if (entity::does_entity_exist(iLocal_1462))
		{
			entity::set_entity_visible(iLocal_1462, true, 0);
			entity::set_entity_collision(iLocal_1462, true, 0);
			entity::set_entity_can_be_damaged(iLocal_1462, true);
		}
		func_440(&uLocal_2240);
	}
	if (func_439())
	{
		iLocal_138 = true;
		iLocal_2003 = func_438();
		if (Global_85916)
		{
			iLocal_2003++;
		}
		if (func_437())
		{
			iLocal_1970 = true;
		}
		if (iLocal_1970)
		{
			func_435();
			while (!func_434())
			{
				system::wait(0);
			}
		}
		if (iLocal_1970)
		{
			if (iLocal_2003 == 0)
			{
				iLocal_2010 = func_393(vLocal_2043, fLocal_2046);
			}
			else if (iLocal_2003 == 1 || iLocal_2003 == 2)
			{
				iLocal_2010 = func_393(vLocal_2047, fLocal_2050);
			}
			else if (iLocal_2003 == 3)
			{
				iLocal_2010 = func_393(-385.7669f, -1720.941f, 17.9849f, 331.5191f);
			}
			if ((!vehicle::is_this_model_a_boat(entity::get_entity_model(iLocal_2010)) && !vehicle::is_this_model_a_plane(entity::get_entity_model(iLocal_2010))) && !vehicle::is_this_model_a_heli(entity::get_entity_model(iLocal_2010)))
			{
				vehicle::set_vehicle_on_ground_properly(iLocal_2010);
			}
			else
			{
				vehicle::delete_vehicle(&iLocal_2010);
			}
		}
		if (iLocal_2003 == 0)
		{
			func_392(213.5436f, -854.7532f, 29.3921f, 64.8106f, 1, 0);
		}
		else if (iLocal_2003 == 1 || iLocal_2003 == 2)
		{
			func_392(vLocal_2051, fLocal_2054, 1, 0);
		}
		else if (iLocal_2003 == 3)
		{
			func_392(-380.8187f, -1721.785f, 18.0069f, 331.5191f, 1, 0);
		}
		iLocal_1967 = true;
	}
	else
	{
		iLocal_1967 = false;
	}
	func_391();
	pathfind::set_roads_in_angled_area(-480.9742f, -1801.922f, 19.28045f, -712.8968f, -1671.164f, 29.93867f, 170f, 0, false, 1);
	pathfind::set_roads_in_angled_area(-662.6993f, -1645.326f, 24.07147f, -672.2144f, -1777.59f, 38.81248f, 45f, 0, false, 1);
	pathfind::set_roads_in_angled_area(-382.9608f, -1688.732f, 17.8985f, -431.2512f, -1811.23f, 37.6825f, 80f, 0, false, 1);
	pathfind::set_roads_in_angled_area(-674.8915f, -1683.639f, 9.116446f, -446.189f, -1807.7f, 31.72464f, 200f, 0, false, 1);
	vehicle::set_vehicle_density_multiplier_this_frame(0.4f);
	vehicle::set_vehicle_model_is_suppressed(joaat("peyote"), true);
	iLocal_1027 = vehicle::_0x2CE544C68FB812A0(-390.0703f, -1698.871f, 17.8068f, 10f, 0f, 0);
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
		ped::set_ped_config_flag(player::player_ped_id(), 32, false);
	}
	func_390();
	iLocal_1443 = 2;
	Local_1231 = { func_388(iLocal_1443) };
	iLocal_1041 = 1;
	gameplay::clear_area(-463.2923f, -1708.148f, 17.6777f, 50f, 1, 0, 0, false);
	iLocal_2064 = ped::add_scenario_blocking_area(Vector(17.6777f, -1708.148f, -463.2923f) - Vector(50f, 50f, 50f), Vector(17.6777f, -1708.148f, -463.2923f) + Vector(50f, 50f, 50f), 0, 1, 1, 1);
	while (true)
	{
		system::wait(0);
		func_385(&uLocal_2240);
		unk1::_0x208784099002BC30("M_ASS3", 0);
		func_383(&iLocal_2071, 7f, 1);
		if (func_382(&Local_1684))
		{
			if (func_381())
			{
				func_451();
				ped::remove_scenario_blocking_area(iLocal_2064, 0);
				audio::trigger_music_event("ASS3_FAIL");
				if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
				{
					Global_91406.f_12[0] = 1;
				}
				else
				{
					Global_91406.f_12[0] = 0;
				}
				func_380(&uLocal_2240);
			}
		}
		else if (!ped::is_ped_injured(player::player_ped_id()))
		{
			if (func_105(&Local_1044, &iLocal_2524))
			{
				if (func_104(&iLocal_1037))
				{
					Global_101553.f_18818.f_7 = func_101(&iLocal_1037);
					fLocal_134 = Global_101553.f_18818.f_7;
				}
				if (!iLocal_1490)
				{
					if (!iLocal_1029 && !Global_85916)
					{
						iLocal_137 = true;
						iLocal_1026 = 1;
					}
				}
				if (!iLocal_137)
				{
					iLocal_1026 = 0;
				}
				func_1(Local_1231, &uLocal_2114, &uLocal_2240);
			}
		}
	}
}

void func_1(struct<39> Param0, var uParam39, var uParam40)//Position - 0x5E1
{
	ui::clear_prints();
	switch (iLocal_1043)
	{
		case 0:
			if (!iLocal_139)
			{
				if (iLocal_1026 == 1)
				{
					func_100();
					iLocal_137 = true;
				}
				fLocal_134 = func_101(&iLocal_1037);
				func_93();
				iLocal_139 = 1;
				iLocal_1043 = 1;
			}
			break;
		
		case 1:
			if (!iLocal_1032)
			{
				audio::play_mission_complete_audio("FRANKLIN_BIG_01");
				iLocal_1032 = 1;
			}
			if (func_89(&uLocal_150, 1, 0) && audio::_0x6F259F82D873B8B8())
			{
				func_88(uParam39, 0, 0, 0, 1);
				func_87(uParam39, &(Local_726.f_60), 2, 215, 1, 1, 0);
				func_87(uParam39, "ES_XPAND", 2, 216, 1, 1, 0);
				func_85(1);
				system::settimera(0);
				iLocal_1043 = 2;
			}
			break;
		
		case 2:
			if (func_56(&uLocal_150, 0, 1065353216, 0, 0, 0))
			{
				iLocal_1031 = true;
			}
			if (!iLocal_1031)
			{
				func_48(uParam39, 1128792064, 1, 0, 1, 1065353216);
			}
			if (controls::is_control_just_pressed(2, 215) || controls::is_disabled_control_just_pressed(2, 200))
			{
				if (!iLocal_1031)
				{
					iLocal_1031 = true;
					func_47(&uLocal_150);
				}
			}
			if (iLocal_1031)
			{
				if (func_56(&uLocal_150, 0, 1065353216, 0, 0, 0))
				{
					func_45(&uLocal_150);
					func_85(0);
					Global_101553.f_18818++;
					func_44();
					func_41(0, 0);
					func_5(Param0);
					func_2();
					func_440(uParam40);
				}
			}
			break;
	}
}

void func_2()//Position - 0x740
{
	func_3();
}

bool func_3()//Position - 0x74D
{
	if (func_4(0))
	{
		return false;
	}
	if (Global_91445.f_8)
	{
		if (Global_91445.f_10 > 0)
		{
			return false;
		}
	}
	else if (Global_91445.f_10 > 1)
	{
		return false;
	}
	Global_91445.f_10++;
	return true;
}

int func_4(int iParam0)//Position - 0x798
{
	if (!iParam0 && script::_get_number_of_instances_of_streamed_script(joaat("benchmark")) > 0)
	{
		return true;
	}
	return gameplay::is_bit_set(Global_69865, 0);
}

void func_5(struct<25> Param0, var uParam25, var uParam26, var uParam27, var uParam28, var uParam29, var uParam30, var uParam31, var uParam32, var uParam33, var uParam34, var uParam35, var uParam36, var uParam37, var uParam38)//Position - 0x7C3
{
	float fVar0;
	
	fVar0 = (1f + func_40());
	fVar0 = (fVar0 * Param0.f_23);
	if (func_39(Global_101553.f_18818.f_1, 4194304))
	{
		fVar0 = (fVar0 + Param0.f_24);
	}
	func_6(func_34(), 96, system::round(fVar0), 0, 0);
}

void func_6(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4)//Position - 0x80E
{
	int iVar0;
	int iVar1;
	
	if (Global_101553.f_32740[iParam0 /*29*/].f_17 == 3)
	{
		return;
	}
	if (Global_101553.f_32740[iParam0 /*29*/].f_17 == 4)
	{
		return;
	}
	func_7(Global_101553.f_32740[iParam0 /*29*/].f_17, 1, iParam1, iParam2, 0);
	if (iParam3)
	{
		iVar0 = 0;
		if (iParam4)
		{
			switch (iParam0)
			{
				case 0:
					iVar1 = joaat("sp0_money_made_from_random_peds");
					break;
				
				case 1:
					iVar1 = joaat("sp1_money_made_from_random_peds");
					break;
				
				case 2:
					iVar1 = joaat("sp2_money_made_from_random_peds");
					break;
				
				default:
					return;
			}
		}
		else
		{
			switch (iParam0)
			{
				case 0:
					iVar1 = joaat("sp0_money_made_from_missions");
					break;
				
				case 1:
					iVar1 = joaat("sp1_money_made_from_missions");
					break;
				
				case 2:
					iVar1 = joaat("sp2_money_made_from_missions");
					break;
				
				default:
					return;
				}
		}
		stats::stat_get_int(iVar1, &iVar0, -1);
		iVar0 = (iVar0 + iParam2);
		stats::stat_set_int(iVar1, iVar0, 1);
	}
}

bool func_7(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4)//Position - 0x8F5
{
	float fVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	
	func_33();
	if (iParam3 < 1)
	{
		return false;
	}
	fVar0 = 1f;
	switch (iParam1)
	{
		case 0:
			switch (iParam0)
			{
				case 0:
					func_32(99, 1);
					func_31(joaat("sp0_money_total_spent"), iParam3);
					break;
				
				case 1:
					func_31(joaat("sp1_money_total_spent"), iParam3);
					break;
				
				case 2:
					func_31(joaat("sp2_money_total_spent"), iParam3);
					break;
			}
			func_15(0);
			switch (iParam2)
			{
				case 126:
				case 128:
				case 124:
				case 125:
				case 127:
					if (func_14(5))
					{
						fVar0 = 0.9f;
						iVar1 = 5;
					}
					break;
				
				case 63:
				case 64:
				case 65:
				case 66:
				case 67:
				case 68:
					switch (iParam0)
					{
						case 0:
							func_31(joaat("sp0_money_spent_on_tattoos"), iParam3);
							break;
						
						case 1:
							func_31(joaat("sp1_money_spent_on_tattoos"), iParam3);
							break;
						
						case 2:
							func_31(joaat("sp2_money_spent_on_tattoos"), iParam3);
							break;
					}
					if (func_14(1))
					{
						fVar0 = 0f;
						iVar1 = 1;
					}
					break;
				
				case 21:
					switch (iParam0)
					{
						case 0:
							func_31(joaat("sp0_money_spent_on_taxis"), iParam3);
							break;
						
						case 1:
							func_31(joaat("sp1_money_spent_on_taxis"), iParam3);
							break;
						
						case 2:
							func_31(joaat("sp2_money_spent_on_taxis"), iParam3);
							break;
					}
					break;
				
				case 25:
					switch (iParam0)
					{
						case 0:
							func_31(joaat("sp0_money_spent_in_strip_clubs"), iParam3);
							break;
						
						case 1:
							func_31(joaat("sp1_money_spent_in_strip_clubs"), iParam3);
							break;
						
						case 2:
							func_31(joaat("sp2_money_spent_in_strip_clubs"), iParam3);
							break;
					}
					break;
				
				case 98:
				case 99:
				case 100:
				case 101:
				case 103:
				case 104:
				case 105:
				case 106:
				case 107:
				case 108:
				case 109:
				case 110:
				case 111:
				case 112:
					switch (iParam0)
					{
						case 0:
							func_31(joaat("sp0_money_spent_property"), iParam3);
							break;
						
						case 1:
							func_31(joaat("sp1_money_spent_property"), iParam3);
							break;
						
						case 2:
							func_31(joaat("sp2_money_spent_property"), iParam3);
							break;
					}
					break;
				
				default:
					switch (script::_get_this_script_hash())
					{
						case joaat("clothes_shop_sp"):
							switch (iParam0)
							{
								case 0:
									func_31(joaat("sp0_money_spent_in_clothes"), iParam3);
									break;
								
								case 1:
									func_31(joaat("sp1_money_spent_in_clothes"), iParam3);
									break;
								
								case 2:
									func_31(joaat("sp2_money_spent_in_clothes"), iParam3);
									break;
							}
							break;
						
						case joaat("hairdo_shop_sp"):
							switch (iParam0)
							{
								case 0:
									func_31(joaat("sp0_money_spent_on_hairdos"), iParam3);
									break;
								
								case 1:
									func_31(joaat("sp1_money_spent_on_hairdos"), iParam3);
									break;
								
								case 2:
									func_31(joaat("sp2_money_spent_on_hairdos"), iParam3);
									break;
							}
							if (func_14(0))
							{
								fVar0 = 0f;
								iVar1 = 0;
							}
							break;
						
						case joaat("gunclub_shop"):
							switch (iParam0)
							{
								case 0:
									func_31(joaat("sp0_money_spent_in_buying_guns"), iParam3);
									break;
								
								case 1:
									func_31(joaat("sp1_money_spent_in_buying_guns"), iParam3);
									break;
								
								case 2:
									func_31(joaat("sp2_money_spent_in_buying_guns"), iParam3);
									break;
							}
							break;
						
						case joaat("carmod_shop"):
							switch (iParam0)
							{
								case 0:
									func_31(joaat("sp0_money_spent_car_mods"), iParam3);
									break;
								
								case 1:
									func_31(joaat("sp1_money_spent_car_mods"), iParam3);
									break;
								
								case 2:
									func_31(joaat("sp2_money_spent_car_mods"), iParam3);
									break;
							}
							func_13(iParam3);
							break;
					}
					break;
			}
			break;
		
		case 1:
			switch (iParam0)
			{
				case 0:
					func_32(95, iParam3);
					break;
				
				case 1:
					func_32(97, iParam3);
					break;
				
				case 2:
					func_32(96, iParam3);
					break;
			}
			func_32(98, iParam3);
			break;
	}
	iVar2 = iParam0;
	iParam3 = system::floor((fVar0 * system::to_float(iParam3)));
	iVar3 = 0;
	iVar4 = iParam3;
	if (fVar0 == 0f)
	{
		func_10(iVar1);
		return true;
	}
	else if (fVar0 != 1f)
	{
		func_10(iVar1);
	}
	iVar5 = (Global_52990[iVar2] + iParam3);
	switch (iParam1)
	{
		case 1:
			if (Global_52990[iVar2] >= 0 && iParam3 > 0)
			{
				if (iVar5 <= 0)
				{
					Global_52990[iVar2] = 2147483647;
				}
				else
				{
					Global_52990[iVar2] = (Global_52990[iVar2] + iParam3);
				}
			}
			switch (iParam0)
			{
				case 0:
					func_31(joaat("sp0_total_cash_earned"), iParam3);
					break;
				
				case 1:
					func_31(joaat("sp1_total_cash_earned"), iParam3);
					break;
				
				case 2:
					func_31(joaat("sp2_total_cash_earned"), iParam3);
					break;
			}
			break;
		
		case 0:
			if (!iParam4)
			{
				if ((Global_52990[iVar2] - iParam3) < 0)
				{
					return false;
				}
			}
			iVar3 = Global_52990[iVar2];
			Global_52990[iVar2] = (Global_52990[iVar2] - iParam3);
			if (iParam4)
			{
				iVar4 = iVar3;
			}
			break;
	}
	if (iParam2 == 1)
	{
		if (iVar4 > 20)
		{
		}
	}
	else
	{
		Global_101553.f_25254.f_233[iVar2 /*69*/].f_2[Global_101553.f_25254.f_233[iVar2 /*69*/].f_1 /*6*/] = iParam1;
		Global_101553.f_25254.f_233[iVar2 /*69*/].f_2[Global_101553.f_25254.f_233[iVar2 /*69*/].f_1 /*6*/].f_1 = iParam2;
		Global_101553.f_25254.f_233[iVar2 /*69*/].f_2[Global_101553.f_25254.f_233[iVar2 /*69*/].f_1 /*6*/].f_2 = iParam3;
		Global_101553.f_25254.f_233[iVar2 /*69*/]++;
		Global_101553.f_25254.f_233[iVar2 /*69*/].f_1++;
		if (Global_101553.f_25254.f_233[iVar2 /*69*/].f_1 > 10)
		{
			Global_101553.f_25254.f_233[iVar2 /*69*/].f_1 = 0;
		}
	}
	func_9(iParam0);
	if (Global_35775 == 15)
	{
		func_8(0);
	}
	return true;
}

void func_8(int iParam0)//Position - 0xEF4
{
	int iVar0;
	int iVar1;
	
	iVar0 = 0;
	iVar1 = 0;
	iVar0 = 0;
	while (iVar0 < 3)
	{
		iVar1 = 0;
		while (iVar1 < 11)
		{
			Global_101553.f_25254.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_3 = Global_101553.f_25254.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/];
			Global_101553.f_25254.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_4 = Global_101553.f_25254.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_1;
			Global_101553.f_25254.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_5 = Global_101553.f_25254.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_2;
			iVar1++;
		}
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < 10)
	{
		Global_52998[iVar0 /*3*/][0] = Global_101553.f_25254[iVar0];
		Global_52998.f_31[iVar0 /*3*/][0] = Global_101553.f_25254.f_11[iVar0];
		Global_52998.f_62[iVar0 /*3*/][0] = Global_101553.f_25254.f_22[iVar0];
		Global_52998.f_93[iVar0 /*3*/][0] = Global_101553.f_25254.f_33[iVar0];
		Global_52998.f_124[iVar0 /*3*/][0] = Global_101553.f_25254.f_44[iVar0];
		Global_52998.f_155[iVar0 /*3*/][0] = Global_101553.f_25254.f_55[iVar0];
		Global_52998.f_186[iVar0 /*3*/][0] = Global_101553.f_25254.f_66[iVar0];
		Global_52998.f_217[iVar0 /*3*/][0] = Global_101553.f_25254.f_77[iVar0];
		Global_52998.f_248[iVar0 /*3*/][0] = Global_101553.f_25254.f_88[iVar0];
		if (!iParam0)
		{
			Global_52998[iVar0 /*3*/][1] = Global_101553.f_25254[iVar0];
			Global_52998.f_31[iVar0 /*3*/][1] = Global_101553.f_25254.f_11[iVar0];
			Global_52998.f_62[iVar0 /*3*/][1] = Global_101553.f_25254.f_22[iVar0];
			Global_52998.f_93[iVar0 /*3*/][1] = Global_101553.f_25254.f_33[iVar0];
			Global_52998.f_124[iVar0 /*3*/][1] = Global_101553.f_25254.f_44[iVar0];
			Global_52998.f_155[iVar0 /*3*/][1] = Global_101553.f_25254.f_55[iVar0];
			Global_52998.f_186[iVar0 /*3*/][1] = Global_101553.f_25254.f_66[iVar0];
			Global_52998.f_217[iVar0 /*3*/][1] = Global_101553.f_25254.f_77[iVar0];
			Global_52998.f_248[iVar0 /*3*/][1] = Global_101553.f_25254.f_88[iVar0];
		}
		iVar0++;
	}
}

void func_9(int iParam0)//Position - 0x1176
{
	int iVar0;
	
	iVar0 = Global_52990[iParam0];
	switch (iParam0)
	{
		case 0:
			stats::stat_set_int(joaat("sp0_total_cash"), iVar0, 1);
			break;
		
		case 1:
			stats::stat_set_int(joaat("sp1_total_cash"), iVar0, 1);
			break;
		
		case 2:
			stats::stat_set_int(joaat("sp2_total_cash"), iVar0, 1);
			break;
	}
}

void func_10(int iParam0)//Position - 0x11D0
{
	int iVar0;
	char cVar1[64];
	
	iVar0 = false;
	if (!network::network_is_game_in_progress())
	{
		if (gameplay::is_bit_set(Global_101553.f_25254.f_471, iParam0))
		{
			iVar0 = true;
			gameplay::clear_bit(&(Global_101553.f_25254.f_471), iParam0);
		}
	}
	else if (gameplay::is_bit_set(Global_101553.f_25254.f_471, iParam0) || gameplay::is_bit_set(Global_2097152[func_12() /*10106*/].f_7120.f_10, iParam0))
	{
		iVar0 = true;
		gameplay::clear_bit(&(Global_101553.f_25254.f_471), iParam0);
		gameplay::clear_bit(&(Global_2097152[func_12() /*10106*/].f_7120.f_10), iParam0);
	}
	if (iVar0)
	{
		StringCopy(&cVar1, "CHAR_LIFEINVADER", 64);
		ui::_set_notification_text_entry("COUP_RED");
		ui::_add_text_component_item_string(func_11(iParam0));
		ui::_set_notification_message(&cVar1, &cVar1, 1, 0, "", 0);
	}
}

char* func_11(int iParam0)//Position - 0x1290
{
	switch (iParam0)
	{
		case 0:
			return "COUP_HAIRC";
		
		case 1:
			return "COUP_TATTOO";
		
		case 2:
			return "COUP_WARSTOCK";
		
		case 3:
			return "COUP_MOSPORT";
		
		case 4:
			return "COUP_ELITAS";
		
		case 5:
			return "COUP_MEDSPENS";
		
		case 6:
			return "COUP_SPRUNK";
		
		case 7:
			return "COUP_RESPRAY";
		
		default:
	}
	return "";
}

int func_12()//Position - 0x1302
{
	int iVar0;
	
	iVar0 = 0;
	return iVar0;
}

void func_13(int iParam0)//Position - 0x130F
{
	func_32(93, iParam0);
	func_32(29, iParam0);
	func_32(30, iParam0);
}

int func_14(int iParam0)//Position - 0x132F
{
	if (!network::network_is_game_in_progress())
	{
		return gameplay::is_bit_set(Global_101553.f_25254.f_471, iParam0);
	}
	return gameplay::is_bit_set(Global_2097152[func_12() /*10106*/].f_7120.f_10, iParam0);
}

bool func_15(int iParam0)//Position - 0x136B
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	iVar1 = 0;
	if (player::has_achievement_been_passed(27))
	{
		return false;
	}
	if (stats::stat_get_int(joaat("sp0_money_total_spent"), &iVar0, -1))
	{
		iVar1 = (iVar1 + iVar0);
	}
	if (stats::stat_get_int(joaat("sp1_money_total_spent"), &iVar0, -1))
	{
		iVar1 = (iVar1 + iVar0);
	}
	if (stats::stat_get_int(joaat("sp2_money_total_spent"), &iVar0, -1))
	{
		iVar1 = (iVar1 + iVar0);
	}
	if (iParam0)
	{
	}
	iVar2 = 0;
	stats::stat_get_int(joaat("num_cash_spent"), &iVar2, -1);
	if (iVar1 > 0 && (iVar2 / 2000000) != (iVar1 / 2000000))
	{
		stats::stat_set_int(joaat("num_cash_spent"), iVar1, 1);
		func_30(27, iVar1);
	}
	if (iVar1 < 200000000)
	{
		return false;
	}
	func_16(27, 1);
	return true;
}

int func_16(int iParam0, int iParam1)//Position - 0x1422
{
	if (iParam0 >= 70)
	{
		return 0;
	}
	return func_17(iParam0, iParam1);
}

bool func_17(int iParam0, int iParam1)//Position - 0x143D
{
	if (func_29(14) && !func_28(iParam0))
	{
		return false;
	}
	if (player::has_achievement_been_passed(iParam0) && iParam1 == 1)
	{
		return false;
	}
	if (Global_25431 != 0 && !Global_69617)
	{
		return false;
	}
	if (func_27(&Global_2578151))
	{
		if (func_25(&Global_2578151, iParam0))
		{
			return false;
		}
		if (func_18(&Global_2578151, iParam0))
		{
			return true;
		}
	}
	else
	{
		if (!player::give_achievement_to_player(iParam0))
		{
			return false;
		}
		if (player::has_achievement_been_passed(iParam0))
		{
			return true;
		}
		return false;
	}
	return false;
}

bool func_18(var uParam0, int iParam1)//Position - 0x14DA
{
	int iVar0;
	var uVar1[70];
	
	if (player::has_achievement_been_passed(iParam1))
	{
		return false;
	}
	if (func_29(14) && !func_28(iParam1))
	{
		return false;
	}
	if (func_25(uParam0, iParam1))
	{
		return false;
	}
	if (func_24(uParam0) < 0f)
	{
		func_23(uParam0, 0);
	}
	func_21(&uVar1);
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < (*uParam0 - 1))
	{
		uVar1[iVar0 + 1] = (*uParam0)[iVar0];
		iVar0++;
	}
	func_19(&uVar1, iParam1);
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		(*uParam0)[iVar0] = uVar1[iVar0];
		iVar0++;
	}
	return true;
}

bool func_19(var uParam0, int iParam1)//Position - 0x158B
{
	int iVar0;
	
	if (player::has_achievement_been_passed(iParam1))
	{
		return false;
	}
	if (func_29(14) && !func_28(iParam1))
	{
		return false;
	}
	if (func_25(uParam0, iParam1))
	{
		return false;
	}
	if (func_24(uParam0) < 0f)
	{
		func_23(uParam0, 0);
	}
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		if (func_20(uParam0, iVar0))
		{
			(*uParam0)[iVar0] = iParam1;
			return true;
		}
		iVar0++;
	}
	return false;
}

int func_20(var uParam0, int iParam1)//Position - 0x1606
{
	return (*uParam0)[iParam1] == 70;
}

void func_21(var uParam0)//Position - 0x1617
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		func_22(uParam0, iVar0);
		iVar0++;
	}
	func_23(uParam0, (Global_2578150 - 0.5f));
}

void func_22(var uParam0, int iParam1)//Position - 0x164B
{
	(*uParam0)[iParam1] = 70;
}

void func_23(var uParam0, float fParam1)//Position - 0x165B
{
	if (fParam1 == 0f)
	{
		uParam0->f_72 = 0f;
	}
	else
	{
		uParam0->f_72 = fParam1;
	}
}

var func_24(var uParam0)//Position - 0x1678
{
	return uParam0->f_72;
}

int func_25(var uParam0, int iParam1)//Position - 0x1684
{
	return func_26(uParam0, iParam1) != -1;
}

int func_26(var uParam0, int iParam1)//Position - 0x1696
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		if ((*uParam0)[iVar0] == iParam1)
		{
			return iVar0;
		}
		iVar0++;
	}
	return -1;
}

int func_27(var uParam0)//Position - 0x16C3
{
	return uParam0->f_71 == 1;
}

bool func_28(int iParam0)//Position - 0x16D1
{
	switch (iParam0)
	{
		case 60:
		case 61:
		case 62:
		case 63:
		case 64:
		case 65:
		case 66:
		case 67:
		case 68:
		case 69:
			return true;
		
		default:
	}
	return false;
}

int func_29(int iParam0)//Position - 0x1721
{
	return Global_35775 == iParam0;
}

int func_30(int iParam0, int iParam1)//Position - 0x172F
{
	int iVar0;
	
	if (iParam0 < 0)
	{
		return 0;
	}
	if (iParam0 > 70)
	{
		return 0;
	}
	if (iParam1 <= 0 || iParam1 > 100)
	{
		return 0;
	}
	iVar0 = player::_0x1C186837D0619335(iParam0);
	if (iParam1 > iVar0)
	{
		return player::_0xC2AFFFDABBDC2C5C(iParam0, iParam1);
	}
	return 0;
}

void func_31(int iParam0, int iParam1)//Position - 0x1780
{
	int iVar0;
	
	stats::stat_get_int(iParam0, &iVar0, -1);
	iVar0 = (iVar0 + iParam1);
	stats::stat_set_int(iParam0, iVar0, 1);
}

void func_32(int iParam0, int iParam1)//Position - 0x17A3
{
	int iVar0;
	
	if (iParam1 < 1)
	{
		return;
	}
	if (Global_51558[iParam0 /*7*/].f_2)
	{
		return;
	}
	if (network::network_is_game_in_progress())
	{
		return;
	}
	if (Global_51558[iParam0 /*7*/])
	{
		stats::stat_get_int(Global_51558[iParam0 /*7*/].f_1, &iVar0, -1);
		iVar0 = (iVar0 + iParam1);
		stats::stat_set_int(Global_51558[iParam0 /*7*/].f_1, iVar0, 1);
	}
}

void func_33()//Position - 0x1800
{
	int iVar0;
	
	if (network::network_is_signed_in())
	{
		stats::stat_get_int(joaat("sp0_total_cash"), &iVar0, -1);
		if (!Global_52990[0] == iVar0)
		{
			Global_52990[0] = iVar0;
		}
		stats::stat_get_int(joaat("sp1_total_cash"), &iVar0, -1);
		if (!Global_52990[1] == iVar0)
		{
			Global_52990[1] = iVar0;
		}
		stats::stat_get_int(joaat("sp2_total_cash"), &iVar0, -1);
		if (!Global_52990[2] == iVar0)
		{
			Global_52990[2] = iVar0;
		}
	}
}

var func_34()//Position - 0x1875
{
	func_35();
	return Global_101553.f_1991.f_539.f_3549;
}

void func_35()//Position - 0x188E
{
	int iVar0;
	
	if (entity::does_entity_exist(player::player_ped_id()))
	{
		if (func_38(Global_101553.f_1991.f_539.f_3549) != entity::get_entity_model(player::player_ped_id()))
		{
			iVar0 = func_37(player::player_ped_id());
			if (func_36(iVar0) && (!func_29(14) || Global_100505))
			{
				if (Global_101553.f_1991.f_539.f_3549 != iVar0 && func_36(Global_101553.f_1991.f_539.f_3549))
				{
					Global_101553.f_1991.f_539.f_3550 = Global_101553.f_1991.f_539.f_3549;
				}
				Global_101553.f_1991.f_539.f_3551 = iVar0;
				Global_101553.f_1991.f_539.f_3549 = iVar0;
				return;
			}
		}
		else
		{
			if (Global_101553.f_1991.f_539.f_3549 != 145)
			{
				Global_101553.f_1991.f_539.f_3551 = Global_101553.f_1991.f_539.f_3549;
			}
			return;
		}
	}
	Global_101553.f_1991.f_539.f_3549 = 145;
}

int func_36(int iParam0)//Position - 0x198B
{
	return iParam0 < 3;
}

int func_37(int iParam0)//Position - 0x1997
{
	int iVar0;
	int iVar1;
	
	if (entity::does_entity_exist(iParam0))
	{
		iVar1 = entity::get_entity_model(iParam0);
		iVar0 = 0;
		while (iVar0 <= 2)
		{
			if (func_38(iVar0) == iVar1)
			{
				return iVar0;
			}
			iVar0++;
		}
	}
	return 145;
}

int func_38(int iParam0)//Position - 0x19D4
{
	if (func_36(iParam0))
	{
		return Global_101553.f_32740[iParam0 /*29*/];
	}
	else if (iParam0 != 145)
	{
	}
	return 0;
}

int func_39(var uParam0, int iParam1)//Position - 0x19FE
{
	return (uParam0 && iParam1) != 0;
}

float func_40()//Position - 0x1A0D
{
	float fVar0;
	
	fVar0 = 0f;
	if (func_39(Global_101553.f_18818.f_1, 8192))
	{
		fVar0 = (fVar0 + 0.2f);
	}
	if (func_39(Global_101553.f_18818.f_1, 16384))
	{
		fVar0 = (fVar0 + 0.2f);
	}
	if (func_39(Global_101553.f_18818.f_1, 32768))
	{
		fVar0 = (fVar0 + 0.2f);
	}
	if (func_39(Global_101553.f_18818.f_1, 65536))
	{
		fVar0 = (fVar0 + 0.1f);
	}
	if (func_39(Global_101553.f_18818.f_1, 131072))
	{
		fVar0 = (fVar0 + 0.1f);
	}
	if (func_39(Global_101553.f_18818.f_1, 262144))
	{
		fVar0 = (fVar0 + 0.1f);
	}
	if (func_39(Global_101553.f_18818.f_1, 524288))
	{
		fVar0 = (fVar0 + 0.333f);
	}
	if (func_39(Global_101553.f_18818.f_1, 1048576))
	{
		fVar0 = (fVar0 + 0.333f);
	}
	if (func_39(Global_101553.f_18818.f_1, 2097152))
	{
		fVar0 = (fVar0 + 0.333f);
	}
	return fVar0;
}

void func_41(int iParam0, int iParam1)//Position - 0x1B26
{
	int iVar0;
	var uVar1;
	var uVar2;
	
	if (!Global_55818)
	{
		Global_55818 = iParam1;
	}
	if (iParam0)
	{
		if ((func_4(0) && Global_69863.f_1 == 1) && func_43(Global_69863))
		{
		}
		else
		{
			Global_55816 = 1;
		}
	}
	if (Global_101553.f_7940 || func_4(0))
	{
		iVar0 = func_42();
		uVar1 = Global_82491[iVar0 /*5*/];
		uVar2 = Global_69886.f_109[uVar1 /*4*/];
		if (iVar0 == -1)
		{
			if (Global_101553.f_7940)
			{
			}
			return;
		}
		if (gameplay::is_bit_set(Global_82491[iVar0 /*5*/].f_1, 4))
		{
			return;
		}
		if (gameplay::is_bit_set(Global_82491[iVar0 /*5*/].f_1, 5))
		{
			return;
		}
		gameplay::set_bit(&(Global_82491[iVar0 /*5*/].f_1), 4);
		gameplay::set_bit(&Global_69865, 1);
		Global_69881 = uVar2;
		Global_69882 = gameplay::get_game_timer();
	}
}

int func_42()//Position - 0x1BFC
{
	int iVar0;
	
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < 7)
	{
		if (gameplay::is_bit_set(Global_82491[iVar0 /*5*/].f_1, 2))
		{
			return iVar0;
		}
		iVar0++;
	}
	return -1;
}

bool func_43(int iParam0)//Position - 0x1C31
{
	switch (iParam0)
	{
		case 71:
			return true;
			break;
		
		case 86:
			return true;
			break;
		
		case 91:
			return true;
			break;
		
		default:
			return false;
			break;
	}
	return false;
}

void func_44()//Position - 0x1C6F
{
	func_449(&(Global_101553.f_18818.f_1), 2048);
}

void func_45(var uParam0)//Position - 0x1C87
{
	if (uParam0->f_1 != 0)
	{
		graphics::set_scaleform_movie_as_no_longer_needed(&(uParam0->f_1));
		uParam0->f_1 = 0;
	}
	if (uParam0->f_562 && uParam0->f_4 != 0)
	{
		if (gameplay::is_pc_version())
		{
			graphics::_push_scaleform_movie_function(uParam0->f_4, "TOGGLE_MOUSE_BUTTONS");
			graphics::_push_scaleform_movie_function_parameter_bool(false);
			graphics::_pop_scaleform_movie_function_void();
		}
		graphics::set_scaleform_movie_as_no_longer_needed(&(uParam0->f_4));
		uParam0->f_4 = 0;
	}
	if (uParam0->f_564)
	{
		script::set_no_loading_screen(false);
		uParam0->f_564 = 0;
	}
	if (!Global_69885)
	{
		if (!player::is_player_dead(player::get_player_index()))
		{
			if (!Global_69886)
			{
				if (cam::is_screen_faded_out() && !func_4(0))
				{
					cam::do_screen_fade_in(800);
				}
			}
		}
	}
	func_46(0);
}

void func_46(int iParam0)//Position - 0x1D2D
{
	Global_69877 = iParam0;
	Global_69878 = iParam0;
}

void func_47(var uParam0)//Position - 0x1D41
{
	if (uParam0->f_561 || uParam0->f_572 <= uParam0->f_558)
	{
		uParam0->f_561 = 0;
		uParam0->f_558 = (uParam0->f_572 - 1);
	}
}

void func_48(var uParam0, float fParam1, int iParam2, int iParam3, int iParam4, float fParam5)//Position - 0x1D74
{
	int iVar0;
	int iVar1;
	int iVar2;
	char* sVar3;
	int iVar4;
	int iVar5;
	int iVar6;
	int iVar7;
	float fVar8;
	
	if (((cam::is_screen_fading_out() || cam::is_screen_fading_in()) || cam::is_screen_faded_out()) || gameplay::is_frontend_fading())
	{
		if (!iParam3)
		{
			return;
		}
	}
	if (!func_55(uParam0))
	{
		return;
	}
	ui::hide_loading_on_fade_this_frame();
	graphics::_set_2d_layer(iParam2);
	if (!func_54(uParam0->f_1, 256) || (func_54(uParam0->f_1, 8192) && controls::_0x6CD79468A1E595C6(2)))
	{
		graphics::_push_scaleform_movie_function(*uParam0, "SET_CLEAR_SPACE");
		graphics::_push_scaleform_movie_function_parameter_float(fParam1);
		graphics::_pop_scaleform_movie_function_void();
		graphics::_push_scaleform_movie_function(*uParam0, "SET_MAX_WIDTH");
		graphics::_push_scaleform_movie_function_parameter_float(fParam5);
		graphics::_pop_scaleform_movie_function_void();
		graphics::_push_scaleform_movie_function(*uParam0, "SET_DATA_SLOT_EMPTY");
		graphics::_pop_scaleform_movie_function_void();
		if (gameplay::is_pc_version())
		{
			graphics::_push_scaleform_movie_function(*uParam0, "TOGGLE_MOUSE_BUTTONS");
			graphics::_push_scaleform_movie_function_parameter_bool(func_54(uParam0->f_1, 4096));
			graphics::_pop_scaleform_movie_function_void();
		}
		iVar5 = 0;
		iVar6 = 0;
		while (iVar6 < uParam0->f_123)
		{
			switch (uParam0->f_2[iVar6 /*15*/].f_2)
			{
				case 0:
					iVar4 = true;
					break;
				
				case 1:
					iVar4 = controls::_is_input_disabled(2);
					break;
				
				case 2:
					iVar4 = !controls::_is_input_disabled(2);
					break;
				
				default:
					iVar4 = false;
					break;
			}
			if (iVar4)
			{
				if (graphics::_push_scaleform_movie_function(*uParam0, "SET_DATA_SLOT"))
				{
					graphics::_push_scaleform_movie_function_parameter_int(iVar5);
					iVar5++;
					iVar7 = 0;
					while (iVar7 < uParam0->f_2[iVar6 /*15*/].f_14)
					{
						iVar0 = uParam0->f_2[iVar6 /*15*/].f_3[iVar7 /*2*/];
						iVar1 = uParam0->f_2[iVar6 /*15*/].f_3[iVar7 /*2*/].f_1;
						iVar2 = gameplay::is_bit_set(uParam0->f_2[iVar6 /*15*/].f_13, iVar7);
						if (!gameplay::is_bit_set(uParam0->f_2[iVar6 /*15*/].f_12, iVar7))
						{
							sVar3 = controls::_get_control_action_name(iVar0, iVar1, iVar2);
						}
						else
						{
							sVar3 = controls::_0x80C2FD58D720C801(iVar0, iVar1, iVar2);
						}
						if (!gameplay::is_string_null_or_empty(sVar3))
						{
							func_53(sVar3);
						}
						iVar7++;
					}
					if (!gameplay::is_string_null_or_empty(uParam0->f_2[iVar6 /*15*/]))
					{
						func_52(uParam0->f_2[iVar6 /*15*/]);
					}
					if (gameplay::is_pc_version())
					{
						if (func_54(uParam0->f_1, 4096))
						{
							if (uParam0->f_2[iVar6 /*15*/].f_1)
							{
								graphics::_push_scaleform_movie_function_parameter_bool(true);
								graphics::_push_scaleform_movie_function_parameter_int(uParam0->f_2[iVar6 /*15*/].f_3[0 /*2*/].f_1);
							}
							else
							{
								graphics::_push_scaleform_movie_function_parameter_bool(false);
								graphics::_push_scaleform_movie_function_parameter_int(-1);
							}
						}
					}
					graphics::_pop_scaleform_movie_function_void();
				}
			}
			iVar6++;
		}
		fVar8 = func_51(iParam4, func_51(func_54(uParam0->f_1, 32), 1f, 0f), -1f);
		graphics::_push_scaleform_movie_function(*uParam0, "DRAW_INSTRUCTIONAL_BUTTONS");
		graphics::_push_scaleform_movie_function_parameter_float(fVar8);
		graphics::_pop_scaleform_movie_function_void();
		graphics::_push_scaleform_movie_function(*uParam0, "SET_BACKGROUND_COLOUR");
		graphics::_push_scaleform_movie_function_parameter_float(0f);
		graphics::_push_scaleform_movie_function_parameter_float(0f);
		graphics::_push_scaleform_movie_function_parameter_float(0f);
		graphics::_push_scaleform_movie_function_parameter_float(80f);
		graphics::_pop_scaleform_movie_function_void();
		func_50(&(uParam0->f_1), 256);
		func_49(&(uParam0->f_1), 128);
	}
	graphics::draw_scaleform_movie_fullscreen(*uParam0, 255, 255, 255, 0, 0);
}

void func_49(var uParam0, int iParam1)//Position - 0x2030
{
	*uParam0 = (*uParam0 - (*uParam0 && iParam1));
}

void func_50(var uParam0, int iParam1)//Position - 0x2045
{
	*uParam0 = (*uParam0 || iParam1);
}

float func_51(int iParam0, float fParam1, float fParam2)//Position - 0x2056
{
	if (iParam0)
	{
		return fParam1;
	}
	return fParam2;
}

void func_52(char* sParam0)//Position - 0x206D
{
	graphics::_begin_text_component(sParam0);
	graphics::_end_text_component();
}

void func_53(char* sParam0)//Position - 0x207F
{
	graphics::_0xE83A3E3557A56640(sParam0);
}

int func_54(var uParam0, int iParam1)//Position - 0x208D
{
	return (uParam0 && iParam1) != 0;
}

bool func_55(var uParam0)//Position - 0x209C
{
	if (*uParam0 != 0)
	{
		if (graphics::has_scaleform_movie_loaded(*uParam0))
		{
			func_50(&(uParam0->f_1), 1);
			return true;
		}
	}
	return false;
}

int func_56(var uParam0, int iParam1, float fParam2, int iParam3, int iParam4, int iParam5)//Position - 0x20C3
{
	int iVar0;
	
	if (gameplay::get_frame_count() == uParam0->f_574)
	{
		return uParam0->f_575;
	}
	uParam0->f_574 = gameplay::get_frame_count();
	if (!network::network_is_game_in_progress())
	{
		if (ped::is_ped_dead_or_dying(player::get_player_ped(player::get_player_index()), 1))
		{
			uParam0->f_575 = 1;
			return true;
		}
		if (ai::is_ped_being_arrested(player::get_player_ped(player::get_player_index())))
		{
			uParam0->f_575 = 1;
			return true;
		}
	}
	if (!uParam0->f_564)
	{
		if (cam::is_screen_faded_out() || cam::is_screen_fading_out())
		{
			script::set_no_loading_screen(true);
			uParam0->f_564 = 1;
		}
	}
	if (player::is_player_playing(player::player_id()))
	{
		if (!network::network_is_game_in_progress())
		{
			if (player::is_special_ability_active(player::player_id()))
			{
				player::special_ability_deactivate(player::player_id());
			}
		}
	}
	ui::hide_hud_component_this_frame(7);
	ui::hide_hud_component_this_frame(8);
	ui::hide_hud_component_this_frame(9);
	ui::hide_hud_component_this_frame(6);
	ui::hide_hud_component_this_frame(19);
	controls::disable_control_action(2, 19, 1);
	controls::disable_control_action(0, 37, 1);
	controls::disable_control_action(0, 21, 1);
	controls::disable_control_action(0, 28, 1);
	controls::disable_control_action(0, 29, 1);
	controls::disable_control_action(0, 171, 1);
	func_80();
	if (controls::_is_input_disabled(2))
	{
		if (player::_is_player_cam_control_disabled() || (cam::is_screen_faded_out() && !cam::is_screen_fading_in()))
		{
			ui::_show_cursor_this_frame();
		}
	}
	Global_36325 = 1;
	if (!uParam0->f_563)
	{
		switch (func_37(player::get_player_ped(player::get_player_index())))
		{
			case 1:
				graphics::_start_screen_effect("SuccessFranklin", 1000, 0);
				break;
			
			case 2:
				graphics::_start_screen_effect("SuccessTrevor", 1000, 0);
				break;
			
			default:
				graphics::_start_screen_effect("SuccessMichael", 1000, 0);
				break;
		}
		uParam0->f_563 = 1;
	}
	if (uParam0->f_558 == 0)
	{
		uParam0->f_558 = (uParam0->f_572 + system::floor((15000f * fParam2)));
	}
	if (iParam4 && uParam0->f_572 >= (uParam0->f_558 - 1500))
	{
		uParam0->f_558 = uParam0->f_572 + 3000;
	}
	if (uParam0->f_560 == 0f)
	{
		uParam0->f_560 = (uParam0->f_560 + func_79(30f));
		uParam0->f_560 = (uParam0->f_560 + (IntToFloat(uParam0->f_56) * func_79(25f)));
		if (uParam0->f_56 > 0)
		{
			uParam0->f_560 = (uParam0->f_560 + func_79((25f * 0.5f)));
		}
		if (uParam0->f_549)
		{
			uParam0->f_560 = (uParam0->f_560 + (func_79(30f) - func_79(2f)));
		}
	}
	iVar0 = true;
	while (iVar0)
	{
		func_46(1);
		uParam0->f_572 = (uParam0->f_572 + system::round((0f + (1000f * system::timestep()))));
		func_59(uParam0, fParam2, iParam3);
		if (IntToFloat(uParam0->f_572) > (IntToFloat(uParam0->f_558 + 666) - (15000f * fParam2)))
		{
			if (uParam0->f_30 < 1f)
			{
				uParam0->f_30 = (uParam0->f_30 + (0f + ((1f / 0.225f) * system::timestep())));
			}
		}
		uParam0->f_30 = func_58(uParam0->f_30, 0f, 1f);
		if (uParam0->f_572 > (uParam0->f_558 - 333))
		{
			if (!uParam0->f_561)
			{
				if (uParam0->f_565)
				{
					uParam0->f_565 = 0;
					uParam0->f_566 = 0;
					uParam0->f_573 = 0.75f;
					graphics::_push_scaleform_movie_function(uParam0->f_1, "ROLL_UP_BACKGROUND");
					graphics::_pop_scaleform_movie_function_void();
				}
				uParam0->f_547 = (uParam0->f_547 - (0f + ((1f / 1.215f) * system::timestep())));
			}
		}
		uParam0->f_547 = func_58(uParam0->f_547, 0f, 1f);
		if ((uParam0->f_547 <= 0.7f && !uParam0->f_545) && uParam0->f_1 != 0)
		{
			graphics::_push_scaleform_movie_function(uParam0->f_1, "TRANSITION_OUT");
			graphics::_pop_scaleform_movie_function_void();
			uParam0->f_546 = uParam0->f_572;
			uParam0->f_545 = 1;
		}
		if (uParam0->f_572 > (uParam0->f_558 - 333))
		{
			if (!uParam0->f_561)
			{
				if (uParam0->f_548 < 1f)
				{
					uParam0->f_548 = (uParam0->f_548 + (0f + ((1f / 0.3f) * system::timestep())));
				}
			}
		}
		uParam0->f_548 = func_58(uParam0->f_548, 0f, 1f);
		if (uParam0->f_562)
		{
			if (controls::_0x6CD79468A1E595C6(2))
			{
				if (graphics::has_scaleform_movie_loaded(uParam0->f_4))
				{
					if (!uParam0->f_567)
					{
						func_57(uParam0, (!uParam0->f_565 && uParam0->f_56 > 0));
					}
				}
			}
		}
		if (controls::is_control_just_pressed(2, 216) && uParam0->f_558 > uParam0->f_572 + 333)
		{
			if (((!uParam0->f_566 && uParam0->f_56 != 0) && graphics::has_scaleform_movie_loaded(uParam0->f_4)) && IntToFloat(uParam0->f_572) > (IntToFloat(uParam0->f_558 + 1165) - (15000f * fParam2)))
			{
				if (!uParam0->f_565)
				{
					graphics::_push_scaleform_movie_function(uParam0->f_1, "ROLL_DOWN_BACKGROUND");
					graphics::_pop_scaleform_movie_function_void();
					uParam0->f_565 = 1;
					uParam0->f_573 = 0.75f;
					if (uParam0->f_572 > (uParam0->f_558 - 5000))
					{
						uParam0->f_558 = uParam0->f_572 + 5000;
					}
				}
				else if (iParam5)
				{
					graphics::_push_scaleform_movie_function(uParam0->f_1, "ROLL_UP_BACKGROUND");
					graphics::_pop_scaleform_movie_function_void();
					uParam0->f_565 = 0;
					uParam0->f_573 = 0.75f;
				}
				func_57(uParam0, (!uParam0->f_565 && uParam0->f_56 > 0));
			}
		}
		if ((uParam0->f_565 || uParam0->f_566) && uParam0->f_56 != 0)
		{
			if (IntToFloat(uParam0->f_572) > (IntToFloat(uParam0->f_558 + 1165) - (15000f * fParam2)))
			{
				if (uParam0->f_566 && !uParam0->f_565)
				{
					uParam0->f_565 = 1;
					uParam0->f_573 = 0.75f;
					graphics::_push_scaleform_movie_function(uParam0->f_1, "ROLL_DOWN_BACKGROUND");
					graphics::_pop_scaleform_movie_function_void();
				}
				uParam0->f_559 = func_58((uParam0->f_559 + (((1f / 0.3f) * uParam0->f_573) * system::timestep())), 0f, 1f);
				uParam0->f_573 = func_58((uParam0->f_573 + 0.07f), 0.75f, 1.15f);
			}
		}
		else
		{
			uParam0->f_559 = func_58((uParam0->f_559 - ((((1f / 0.3f) * uParam0->f_573) * 0.01f) * system::timestep())), 0f, 1f);
			uParam0->f_573 = func_58((uParam0->f_573 + 0.07f), 0.75f, 1.15f);
		}
		if (uParam0->f_572 > uParam0->f_558)
		{
			if (uParam0->f_561)
			{
				if (!uParam0->f_567)
				{
					if (controls::is_control_just_pressed(2, 215))
					{
						uParam0->f_561 = 0;
					}
				}
			}
			else if ((uParam0->f_572 - uParam0->f_546) > 1000 && uParam0->f_545)
			{
				iVar0 = false;
			}
		}
		uParam0->f_575 = !iVar0;
		if (iParam1)
		{
			system::wait(0);
		}
		else
		{
			if (!iVar0)
			{
				func_46(0);
			}
			return !iVar0;
		}
	}
	func_46(0);
	return true;
}

void func_57(var uParam0, int iParam1)//Position - 0x271B
{
	graphics::_push_scaleform_movie_function(uParam0->f_4, "CLEAR_ALL");
	graphics::_pop_scaleform_movie_function_void();
	if (gameplay::is_pc_version())
	{
		graphics::_push_scaleform_movie_function(uParam0->f_4, "TOGGLE_MOUSE_BUTTONS");
		graphics::_push_scaleform_movie_function_parameter_bool(true);
		graphics::_pop_scaleform_movie_function_void();
	}
	graphics::_push_scaleform_movie_function(uParam0->f_4, "SET_DATA_SLOT");
	graphics::_push_scaleform_movie_function_parameter_int(0);
	func_53(controls::_get_control_action_name(2, 215, true));
	func_52("ES_HELP");
	if (gameplay::is_pc_version())
	{
		graphics::_push_scaleform_movie_function_parameter_bool(true);
		graphics::_push_scaleform_movie_function_parameter_int(215);
	}
	graphics::_pop_scaleform_movie_function_void();
	if (iParam1)
	{
		graphics::_push_scaleform_movie_function(uParam0->f_4, "SET_DATA_SLOT");
		graphics::_push_scaleform_movie_function_parameter_int(1);
		func_53(controls::_get_control_action_name(2, 216, true));
		func_52("ES_XPAND");
		if (gameplay::is_pc_version())
		{
			graphics::_push_scaleform_movie_function_parameter_bool(true);
			graphics::_push_scaleform_movie_function_parameter_int(216);
		}
		graphics::_pop_scaleform_movie_function_void();
	}
	graphics::_push_scaleform_movie_function(uParam0->f_4, "DRAW_INSTRUCTIONAL_BUTTONS");
	graphics::_pop_scaleform_movie_function_void();
}

float func_58(float fParam0, float fParam1, float fParam2)//Position - 0x27DD
{
	if (fParam0 > fParam2)
	{
		return fParam2;
	}
	else if (fParam0 < fParam1)
	{
		return fParam1;
	}
	return fParam0;
}

void func_59(var uParam0, float fParam1, int iParam2)//Position - 0x2804
{
	int iVar0;
	float fVar1;
	float fVar2;
	float fVar3;
	float fVar4;
	float fVar5;
	float fVar6;
	float fVar7;
	float fVar8;
	float fVar9;
	float fVar10;
	float fVar11;
	float fVar12;
	int iVar13;
	int iVar14;
	int iVar15;
	int iVar16;
	int iVar17;
	float fVar18;
	float fVar19;
	float fVar20;
	float fVar21;
	float fVar22;
	char cVar23[16];
	char cVar27[32];
	int iVar35;
	int iVar36;
	int iVar37;
	int iVar38;
	float fVar39;
	float fVar40;
	float fVar41;
	float fVar42;
	float fVar43;
	
	iVar0 = system::round((uParam0->f_547 * 255f));
	fVar1 = (func_78() * 0.25f);
	if (graphics::has_scaleform_movie_loaded(uParam0->f_1))
	{
		if (uParam0->f_30 >= 0f)
		{
			if (!uParam0->f_2)
			{
				graphics::_push_scaleform_movie_function(uParam0->f_1, "SHOW_MISSION_PASSED_MESSAGE");
				func_52(&(uParam0->f_5));
				func_52(&(uParam0->f_13));
				graphics::_push_scaleform_movie_function_parameter_int(100);
				graphics::_push_scaleform_movie_function_parameter_bool(true);
				graphics::_push_scaleform_movie_function_parameter_int(uParam0->f_56);
				graphics::_push_scaleform_movie_function_parameter_bool(iParam2);
				graphics::_push_scaleform_movie_function_parameter_int(69);
				graphics::_pop_scaleform_movie_function_void();
				uParam0->f_2 = 1;
			}
			if ((uParam0->f_56 > 0 && !uParam0->f_3) && uParam0->f_572 > 600)
			{
				graphics::_push_scaleform_movie_function(uParam0->f_1, "TRANSITION_UP");
				graphics::_push_scaleform_movie_function_parameter_float(0.15f);
				graphics::_push_scaleform_movie_function_parameter_bool(true);
				graphics::_pop_scaleform_movie_function_void();
				uParam0->f_3 = 1;
			}
		}
		func_77();
		graphics::draw_scaleform_movie_fullscreen(uParam0->f_1, 255, 255, 255, 255, 0);
	}
	fVar2 = ((uParam0->f_560 * uParam0->f_559) * (1f - uParam0->f_548));
	fVar3 = 0f;
	if (uParam0->f_567)
	{
		fVar3 = (((0.1388889f + func_79((2f * 2f))) * uParam0->f_568) * (1f - uParam0->f_548));
		fVar2 = (fVar2 + (3f * fVar3));
	}
	if (uParam0->f_548 != 0f)
	{
		fVar4 = 0f;
		if (fVar2 < fVar4)
		{
			fVar2 = fVar4;
		}
	}
	else
	{
		fVar5 = 0f;
		if (uParam0->f_30 >= 0.975f)
		{
			if (fVar2 < fVar5)
			{
				fVar2 = fVar5;
			}
		}
	}
	fVar1 = (0.3f * func_78());
	if (uParam0->f_12)
	{
		fVar1 = 0.5f;
	}
	fVar6 = (*uParam0 * 2f);
	fVar7 = func_76(&(uParam0->f_13));
	if (fVar6 < fVar7)
	{
		fVar6 = (fVar7 + (3f * 0.006f));
	}
	if (graphics::_get_screen_aspect_ratio(0) < 1.4f)
	{
		fVar6 = (fVar6 * 1.3f);
	}
	fVar7 = func_76(&(uParam0->f_550));
	fVar8 = (((0.119f + 0.05f) / func_78()) / 2.5f);
	if ((uParam0->f_556 == 1 || uParam0->f_556 == 0) && uParam0->f_557 != 0)
	{
		if (fVar6 < (fVar7 + (2.6f * fVar8)))
		{
			fVar6 = (fVar7 + (2.6f * fVar8));
		}
	}
	else if (fVar6 < (fVar7 + (1.9f * fVar8)))
	{
		fVar6 = (fVar7 + (2f * fVar8));
	}
	fVar9 = ((0.499f - (fVar6 / 2f)) + 0.006f);
	fVar10 = ((0.499f + (fVar6 / 2f)) - 0.006f);
	controls::set_input_exclusive(2, 215);
	controls::set_input_exclusive(2, 216);
	controls::set_input_exclusive(2, 200);
	controls::disable_control_action(2, 200, 1);
	if (uParam0->f_562 || uParam0->f_567)
	{
		if ((IntToFloat(uParam0->f_558) - (14000f * fParam1)) < IntToFloat(uParam0->f_572) || ((uParam0->f_567 && uParam0->f_559 > 0.95f) && (uParam0->f_558 - 10000) < uParam0->f_572))
		{
			if (uParam0->f_567)
			{
				if (uParam0->f_570 < 0)
				{
					uParam0->f_570 = (uParam0->f_570 * -1);
					uParam0->f_570 = (uParam0->f_572 + uParam0->f_570);
				}
				if (uParam0->f_570 > 0)
				{
					if ((uParam0->f_570 - uParam0->f_572) > 0)
					{
						func_73((uParam0->f_570 - uParam0->f_572), "TIMER_TIME", 0, 0, -1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0);
					}
					else
					{
						uParam0->f_570 = 0;
						uParam0->f_569 = 1;
						uParam0->f_567 = 0;
						uParam0->f_561 = 0;
						uParam0->f_562 = 0;
						uParam0->f_558 = uParam0->f_572 + 500;
						uParam0->f_570 = 0;
					}
				}
				if (uParam0->f_568 < 1f)
				{
					uParam0->f_568 = (uParam0->f_568 + (0f + ((1f / 0.166f) * system::timestep())));
					if (uParam0->f_568 > 1f)
					{
						uParam0->f_568 = 1f;
					}
				}
			}
			if (cam::is_screen_faded_out())
			{
				ui::hide_loading_on_fade_this_frame();
			}
			if ((uParam0->f_4 != 0 && uParam0->f_548 < 0.1f) && uParam0->f_572 <= uParam0->f_558)
			{
				ui::hide_hud_component_this_frame(7);
				ui::hide_hud_component_this_frame(8);
				ui::hide_hud_component_this_frame(9);
				ui::hide_hud_component_this_frame(6);
				graphics::draw_scaleform_movie_fullscreen(uParam0->f_4, 255, 255, 255, iVar0, 0);
			}
			if (uParam0->f_567)
			{
				controls::disable_control_action(0, 140, 1);
				controls::disable_control_action(0, 141, 1);
				controls::disable_control_action(0, 142, 1);
				controls::disable_control_action(2, 188, 1);
				if (controls::is_disabled_control_just_pressed(2, 188))
				{
					audio::play_sound_frontend(-1, "CONTINUE", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0);
					uParam0->f_567 = 0;
					uParam0->f_561 = 0;
					uParam0->f_562 = 0;
					uParam0->f_558 = uParam0->f_572 + 500;
					uParam0->f_569 = 3;
					uParam0->f_570 = 0;
					audio::play_sound_frontend(-1, "continue", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0);
				}
				controls::disable_control_action(2, 187, 1);
				if (controls::is_disabled_control_just_pressed(2, 187))
				{
					audio::play_sound_frontend(-1, "CONTINUE", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0);
					uParam0->f_567 = 0;
					uParam0->f_561 = 0;
					uParam0->f_562 = 0;
					uParam0->f_558 = uParam0->f_572 + 500;
					uParam0->f_569 = 4;
					uParam0->f_570 = 0;
					audio::play_sound_frontend(-1, "continue", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0);
				}
				controls::disable_control_action(2, 202, 1);
				if (controls::is_disabled_control_just_pressed(2, 202))
				{
					audio::play_sound_frontend(-1, "CONTINUE", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0);
					uParam0->f_567 = 0;
					uParam0->f_561 = 0;
					uParam0->f_562 = 0;
					uParam0->f_558 = uParam0->f_572 + 500;
					uParam0->f_569 = 2;
					uParam0->f_570 = 0;
					audio::play_sound_frontend(-1, "continue", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0);
				}
			}
			else if (uParam0->f_562)
			{
				ui::hide_hud_component_this_frame(7);
				ui::hide_hud_component_this_frame(8);
				ui::hide_hud_component_this_frame(9);
				ui::hide_hud_component_this_frame(6);
				controls::disable_control_action(0, 140, 1);
				controls::disable_control_action(0, 141, 1);
				controls::disable_control_action(0, 142, 1);
				if (controls::is_control_just_pressed(2, 215) || controls::is_disabled_control_just_pressed(2, 200))
				{
					audio::play_sound_frontend(-1, "CONTINUE", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0);
					uParam0->f_562 = 0;
					uParam0->f_561 = 0;
					uParam0->f_558 = uParam0->f_572 + 500;
					audio::play_sound_frontend(-1, "continue", "HUD_FRONTEND_DEFAULT_SOUNDSET", 0);
				}
			}
		}
	}
	ui::get_hud_colour(1, &iVar13, &iVar14, &iVar15, &iVar16);
	ui::set_text_colour(iVar13, iVar14, iVar15, iVar0);
	ui::set_text_wrap(fVar9, fVar10);
	ui::set_text_justification(0);
	ui::set_text_scale(1f, 0.4f);
	fVar1 = (fVar1 - func_79(6f));
	fVar1 = (fVar1 + (func_79(30f) - func_79((2f * 2f))));
	fVar11 = (fVar2 - func_79((2f * 14f)));
	if (fVar11 >= 0f)
	{
		fVar12 = func_58((fVar11 / (0.6f * func_79(25f))), 0f, 1f);
		func_77();
		graphics::draw_rect(0.5f, (fVar1 - (func_79((2f - 0.5f)) - 0.001388889f)), fVar6, func_72(1f), iVar13, iVar14, iVar15, system::round((fVar12 * IntToFloat(iVar16))), 0);
	}
	else
	{
		return;
	}
	fVar1 = (fVar1 + func_79((2f * 0.3f)));
	if (uParam0->f_56 > 0)
	{
		fVar1 = (fVar1 + func_79((25f * 0.2f)));
	}
	iVar17 = 0;
	iVar17 = 0;
	while (iVar17 < uParam0->f_56)
	{
		fVar11 = (fVar2 - (fVar1 - (0.3f * func_78())));
		if (fVar11 >= 0f)
		{
			fVar12 = func_58((fVar11 / (0.8f * func_79(25f))), 0f, 1f);
			func_69(uParam0, iVar17, (fVar1 + func_79(2f)), fVar9, fVar10, system::round((IntToFloat(iVar0) * fVar12)));
		}
		else
		{
			return;
		}
		fVar1 = (fVar1 + func_79(25f));
		iVar17++;
	}
	if (uParam0->f_56 > 0)
	{
		fVar1 = (fVar1 + func_79((25f * 0.2f)));
		fVar11 = (fVar2 - (fVar1 - (0.3f * func_78())));
		if (fVar11 >= 0f)
		{
			fVar1 = (fVar1 + func_79(2f));
			fVar12 = func_58((fVar11 / (0.6f * func_79(25f))), 0f, 1f);
			func_77();
			graphics::draw_rect(0.5f, (fVar1 + func_79((2f * 0.5f))), fVar6, func_72(1f), iVar13, iVar14, iVar15, system::round((fVar12 * IntToFloat(iVar16))), 0);
		}
	}
	if (uParam0->f_549)
	{
		fVar1 = (fVar1 + func_79((25f * 0.2f)));
		fVar11 = (fVar2 - (fVar1 - (0.3f * func_78())));
		if (fVar11 >= 0f)
		{
			fVar12 = func_58((fVar11 / (0.8f * func_79(25f))), 0f, 1f);
			ui::set_text_colour(iVar13, iVar14, iVar15, system::round((fVar12 * IntToFloat(iVar0))));
			func_62(7, 0, 1, &fVar18, &fVar19, 0);
			fVar20 = fVar9;
			fVar21 = fVar10;
			if (unk::_get_ui_language_id() == 0)
			{
				fVar20 = (fVar9 + ((0.119f / func_78()) / 2.5f));
				fVar21 = (fVar10 - ((0.119f / func_78()) / 2.5f));
				if (uParam0->f_556 == 1)
				{
					fVar20 = (fVar9 + (((0.119f + 0.05f) / func_78()) / 2.5f));
					fVar21 = (fVar10 - (((0.119f + 0.05f) / func_78()) / 2.5f));
				}
			}
			if (uParam0->f_557 == 0)
			{
				fVar20 = (fVar20 + (((fVar18 * 0.28f) + 0.006f) / 2f));
				fVar21 = (fVar21 + (((fVar18 * 0.28f) + 0.006f) / 2f));
			}
			ui::set_text_wrap(fVar20, fVar21);
			ui::set_text_justification(1);
			ui::set_text_scale(1f, 0.4f);
			func_61(&(uParam0->f_550), fVar20, (fVar1 + func_79((2f * 2f))), 0, 0, 0);
			ui::set_text_wrap(fVar20, fVar21);
			ui::set_text_justification(2);
			ui::set_text_scale(1f, 0.4f);
			ui::set_text_centre(0);
			func_77();
			fVar22 = fVar21;
			StringCopy(&cVar23, "MPHud", 16);
			StringCopy(&cVar27, "MissionPassedMedal", 32);
			fVar22 = (fVar22 - ((fVar18 * 0.28f) + 0.006f));
			ui::set_text_wrap(fVar20, fVar22);
			ui::set_text_colour(iVar13, iVar14, iVar15, system::round((fVar12 * IntToFloat(iVar0))));
			switch (uParam0->f_556)
			{
				case 0:
					ui::_set_text_entry("PERCENTAGE");
					ui::add_text_component_integer(uParam0->f_554);
					ui::_draw_text(fVar20, (fVar1 + func_79((2f * 2f))), 0);
					break;
				
				case 1:
					ui::_set_text_entry("FO_TWO_NUM");
					ui::add_text_component_integer(uParam0->f_554);
					ui::add_text_component_integer(uParam0->f_555);
					ui::_draw_text(fVar20, (fVar1 + func_79((2f * 2f))), 0);
					break;
				
				case 2:
					ui::_set_text_entry("MTPHPER_XPNO");
					ui::add_text_component_integer(uParam0->f_554);
					ui::_draw_text(fVar20, (fVar1 + func_79((2f * 2f))), 0);
					break;
			}
			if (uParam0->f_557 != 0)
			{
				iVar35 = 255;
				iVar36 = 255;
				iVar37 = 255;
				iVar38 = iVar0;
				switch (uParam0->f_557)
				{
					case 1:
						ui::get_hud_colour(107, &iVar35, &iVar36, &iVar37, &iVar38);
						break;
					
					case 3:
						ui::get_hud_colour(109, &iVar35, &iVar36, &iVar37, &iVar38);
						break;
					
					case 2:
						ui::get_hud_colour(108, &iVar35, &iVar36, &iVar37, &iVar38);
						break;
				}
				fVar39 = (0.001388889f * 5f);
				fVar40 = ((0.00078125f * 16f) * 2f);
				fVar41 = ((0.001388889f * 16f) * 2f);
				fVar42 = ((fVar21 + func_60(4f)) - 0.006f);
				fVar43 = ((fVar1 + func_79(10f)) + fVar39);
				if (uParam0->f_556 == -1)
				{
					fVar42 = (fVar42 - (0.006f * 6f));
				}
				fVar40 = (fVar40 * 0.65f);
				fVar41 = (fVar41 * 0.65f);
				graphics::draw_sprite(&cVar23, &cVar27, fVar42, fVar43, fVar40, fVar41, 0f, iVar35, iVar36, iVar37, system::round((fVar12 * IntToFloat(iVar0))), 0);
			}
			fVar1 = (fVar1 + (func_79(30f) - 2f));
		}
	}
}

float func_60(float fParam0)//Position - 0x32F0
{
	return (fParam0 * 0.00078125f);
}

void func_61(char* sParam0, float fParam1, float fParam2, int iParam3, int iParam4, int iParam5)//Position - 0x3300
{
	ui::set_text_centre(iParam3);
	ui::set_text_font(iParam5);
	func_77();
	if (iParam4)
	{
		ui::_set_text_entry("STRING");
		ui::add_text_component_substring_player_name(sParam0);
	}
	else
	{
		ui::_set_text_entry(sParam0);
	}
	ui::_draw_text(fParam1, fParam2, 0);
}

bool func_62(int iParam0, int iParam1, int iParam2, float fParam3, float fParam4, int iParam5)//Position - 0x333D
{
	char cVar0[64];
	char cVar16[64];
	int iVar32;
	int iVar33;
	float fVar34;
	float fVar35;
	float fVar36;
	vector3 vVar37;
	
	StringCopy(&cVar0, func_68(iParam0), 64);
	StringCopy(&cVar16, func_65(iParam0, iParam1), 64);
	if (gameplay::get_hash_key(&cVar16) != 0)
	{
		fVar34 = 1f;
		if (iParam5)
		{
			graphics::_get_screen_active_resolution(&iVar32, &iVar33);
			fVar35 = graphics::_get_screen_aspect_ratio(0);
			if (func_64())
			{
				iVar32 = system::round((system::to_float(iVar33) * fVar35));
			}
			fVar36 = (system::to_float(iVar32) / system::to_float(iVar33));
			fVar34 = (fVar36 / fVar35);
			if (func_64())
			{
				fVar34 = 1f;
			}
			if (script::_get_number_of_instances_of_streamed_script(joaat("director_mode")) > 0)
			{
				graphics::get_screen_resolution(&iVar32, &iVar33);
			}
			iVar32 = system::round((system::to_float(iVar32) / fVar34));
			iVar33 = system::round((system::to_float(iVar33) / fVar34));
		}
		else
		{
			graphics::get_screen_resolution(&iVar32, &iVar33);
		}
		vVar37 = { graphics::get_texture_resolution(&cVar0, &cVar16) };
		vVar37.x = (vVar37.x * (func_63(iParam0) / fVar34));
		vVar37.y = (vVar37.y * (func_63(iParam0) / fVar34));
		if (!iParam2)
		{
			vVar37.x = (vVar37.x - 2f);
			vVar37.y = (vVar37.y - 2f);
		}
		if (iParam0 == 30)
		{
			vVar37.x = 288f;
			vVar37.y = 106f;
		}
		if (iParam0 == 29 && gameplay::get_hash_key(&(Global_17290.f_6703[29 /*16*/])) == -1487683087)
		{
			vVar37.x = 106f;
			vVar37.y = 106f;
		}
		*fParam3 = ((vVar37.x / IntToFloat(iVar32)) * IntToFloat((iVar32 / iVar33)));
		*fParam4 = (((vVar37.y / IntToFloat(iVar33)) / (vVar37.x / IntToFloat(iVar32))) * *fParam3);
		if (!iParam5)
		{
			if (!graphics::get_is_widescreen() && iParam0 != 30)
			{
				*fParam3 = (*fParam3 * 1.33f);
			}
		}
		if (iParam0 == 29)
		{
			if (*fParam3 > Global_17289)
			{
				*fParam4 = (*fParam4 * (Global_17289 / *fParam3));
				*fParam3 = Global_17289;
			}
		}
		return true;
	}
	return false;
}

float func_63(int iParam0)//Position - 0x34EE
{
	switch (iParam0)
	{
		case 33:
		case 4:
		case 11:
		case 31:
		case 20:
		case 15:
		case 10:
		case 12:
		case 13:
		case 32:
		case 9:
		case 5:
		case 6:
		case 7:
		case 14:
		case 18:
		case 19:
		case 17:
		case 28:
		case 26:
		case 27:
		case 49:
			return 0.5f;
			break;
	}
	return 1f;
}

bool func_64()//Position - 0x358D
{
	int iVar0;
	int iVar1;
	float fVar2;
	
	graphics::_get_screen_active_resolution(&iVar0, &iVar1);
	fVar2 = (system::to_float(iVar0) / system::to_float(iVar1));
	if (fVar2 > 3.5f)
	{
		return true;
	}
	return false;
}

var func_65(int iParam0, int iParam1)//Position - 0x35BF
{
	char* sVar0[2];
	var uVar3;
	struct<13> Var19;
	
	if (!gameplay::is_string_null_or_empty(&(Global_17290.f_6703[iParam0 /*16*/])))
	{
		if (gameplay::get_hash_key(&(Global_17290.f_6703[iParam0 /*16*/])) == -1487683087)
		{
			Var19 = { func_67(player::player_id()) };
			if (network::_0x5835D9CD92E83184(&Var19, &uVar3))
			{
				return func_66(&uVar3);
			}
		}
		else
		{
			return func_66(&(Global_17290.f_6703[iParam0 /*16*/]));
		}
	}
	switch (iParam0)
	{
		case 3:
			sVar0[0] = "MP_hostCrown";
			sVar0[1] = "MP_hostCrown";
			break;
		
		case 21:
			sVar0[0] = "MP_SpecItem_Coke";
			sVar0[1] = "MP_SpecItem_Coke";
			break;
		
		case 22:
			sVar0[0] = "MP_SpecItem_Heroin";
			sVar0[1] = "MP_SpecItem_Heroin";
			break;
		
		case 23:
			sVar0[0] = "MP_SpecItem_Weed";
			sVar0[1] = "MP_SpecItem_Weed";
			break;
		
		case 24:
			sVar0[0] = "MP_SpecItem_Meth";
			sVar0[1] = "MP_SpecItem_Meth";
			break;
		
		case 25:
			sVar0[0] = "MP_SpecItem_Cash";
			sVar0[1] = "MP_SpecItem_Cash";
			break;
		
		case 1:
			sVar0[0] = "shop_NEW_Star";
			sVar0[1] = "shop_NEW_Star";
			break;
		
		case 2:
			sVar0[0] = "shop_NEW_Star";
			sVar0[1] = "shop_NEW_Star";
			break;
		
		case 4:
			sVar0[0] = "Shop_Tick_Icon";
			sVar0[1] = "Shop_Tick_Icon";
			break;
		
		case 6:
			sVar0[0] = "Shop_Box_CrossB";
			sVar0[1] = "Shop_Box_Cross";
			break;
		
		case 7:
			sVar0[0] = "Shop_Box_BlankB";
			sVar0[1] = "Shop_Box_Blank";
			break;
		
		case 5:
			sVar0[0] = "Shop_Box_TickB";
			sVar0[1] = "Shop_Box_Tick";
			break;
		
		case 8:
			sVar0[0] = "shop_NEW_Star";
			sVar0[1] = "shop_NEW_Star";
			break;
		
		case 9:
			sVar0[0] = "Shop_Clothing_Icon_B";
			sVar0[1] = "Shop_Clothing_Icon_A";
			break;
		
		case 10:
			sVar0[0] = "Shop_GunClub_Icon_B";
			sVar0[1] = "Shop_GunClub_Icon_A";
			break;
		
		case 17:
			sVar0[0] = "Shop_Ammo_Icon_B";
			sVar0[1] = "Shop_Ammo_Icon_A";
			break;
		
		case 18:
			sVar0[0] = "Shop_Armour_Icon_B";
			sVar0[1] = "Shop_Armour_Icon_A";
			break;
		
		case 19:
			sVar0[0] = "Shop_Health_Icon_B";
			sVar0[1] = "Shop_Health_Icon_A";
			break;
		
		case 20:
			sVar0[0] = "Shop_MakeUp_Icon_B";
			sVar0[1] = "Shop_MakeUp_Icon_A";
			break;
		
		case 11:
			sVar0[0] = "Shop_Tattoos_Icon_B";
			sVar0[1] = "Shop_Tattoos_Icon_A";
			break;
		
		case 12:
			sVar0[0] = "Shop_Garage_Icon_B";
			sVar0[1] = "Shop_Garage_Icon_A";
			break;
		
		case 13:
			sVar0[0] = "Shop_Garage_Bike_Icon_B";
			sVar0[1] = "Shop_Garage_Bike_Icon_A";
			break;
		
		case 14:
			sVar0[0] = "Shop_Barber_Icon_B";
			sVar0[1] = "Shop_Barber_Icon_A";
			break;
		
		case 15:
			sVar0[0] = "shop_Lock";
			sVar0[1] = "shop_Lock";
			break;
		
		case 16:
			sVar0[0] = "Shop_Tick_Icon";
			sVar0[1] = "Shop_Tick_Icon";
			break;
		
		case 26:
			sVar0[0] = "arrowleft";
			sVar0[1] = "arrowleft";
			break;
		
		case 27:
			sVar0[0] = "arrowright";
			sVar0[1] = "arrowright";
			break;
		
		case 28:
			sVar0[0] = "MP_AlertTriangle";
			sVar0[1] = "MP_AlertTriangle";
			break;
		
		case 29:
			sVar0[0] = "shop_NEW_Star";
			sVar0[1] = "shop_NEW_Star";
			break;
		
		case 31:
			sVar0[0] = "Shop_Michael_Icon_B";
			sVar0[1] = "Shop_Michael_Icon_A";
			break;
		
		case 32:
			sVar0[0] = "Shop_Franklin_Icon_B";
			sVar0[1] = "Shop_Franklin_Icon_A";
			break;
		
		case 33:
			sVar0[0] = "Shop_Trevor_Icon_B";
			sVar0[1] = "Shop_Trevor_Icon_A";
			break;
		
		case 48:
			sVar0[0] = "SaleIcon";
			sVar0[1] = "SaleIcon";
			break;
		
		case 49:
			sVar0[0] = "Shop_Tick_Icon";
			sVar0[1] = "Shop_Tick_Icon";
			break;
		
		case 0:
			sVar0[0] = "";
			sVar0[1] = "";
			break;
	}
	if (iParam1)
	{
		return sVar0[0];
	}
	return sVar0[1];
}

var func_66(var uParam0)//Position - 0x39F4
{
	return uParam0;
}

struct<13> func_67(int iParam0)//Position - 0x39FE
{
	struct<13> Var0;
	
	network::network_handle_from_player(iParam0, &Var0, 13);
	return Var0;
}

char* func_68(int iParam0)//Position - 0x3A15
{
	var uVar0;
	struct<13> Var16;
	
	if (!gameplay::is_string_null_or_empty(&(Global_17290.f_5886[iParam0 /*16*/])))
	{
		if (gameplay::get_hash_key(&(Global_17290.f_5886[iParam0 /*16*/])) == -1487683087)
		{
			Var16 = { func_67(player::player_id()) };
			network::_0x5835D9CD92E83184(&Var16, &uVar0);
			return func_66(&uVar0);
		}
		else
		{
			return func_66(&(Global_17290.f_5886[iParam0 /*16*/]));
		}
	}
	if (iParam0 == 48)
	{
		return "MPShopSale";
	}
	return "CommonMenu";
}

void func_69(var uParam0, int iParam1, float fParam2, float fParam3, float fParam4, int iParam5)//Position - 0x3A8A
{
	int iVar0;
	int iVar1;
	int iVar2;
	var uVar3;
	float fVar4;
	float fVar5;
	float fVar6;
	
	ui::get_hud_colour(1, &iVar0, &iVar1, &iVar2, &uVar3);
	ui::set_text_colour(iVar0, iVar1, iVar2, iParam5);
	ui::set_text_wrap(fParam3, fParam4);
	ui::set_text_justification(1);
	ui::set_text_scale(1f, func_71(14f));
	ui::set_text_centre(0);
	ui::set_text_font(0);
	func_77();
	if (uParam0->f_531[iParam1])
	{
		ui::_set_text_entry("STRING");
		ui::add_text_component_substring_player_name(&(uParam0->f_71[iParam1 /*16*/]));
	}
	else
	{
		ui::_set_text_entry(&(uParam0->f_71[iParam1 /*16*/]));
		if (uParam0->f_57[iParam1] == 16 || uParam0->f_57[iParam1] == 17)
		{
			ui::add_text_component_integer(uParam0->f_489[iParam1]);
		}
	}
	ui::_draw_text(fParam3, fParam2, 0);
	fVar4 = fParam4;
	switch (uParam0->f_517[iParam1])
	{
		case 0:
			break;
		
		case 1:
			func_62(7, 0, 1, &fVar5, &fVar6, 0);
			graphics::draw_sprite("CommonMenu", func_65(7, 0), (fParam4 - 0.006f), ((fParam2 + func_79(2f)) + (0.25f * fVar6)), fVar5, fVar6, 0f, 255, 255, 255, iParam5, 0);
			fVar4 = (fVar4 - ((fVar5 * 0.38f) + 0.006f));
			break;
		
		case 2:
			func_62(5, 0, 1, &fVar5, &fVar6, 0);
			graphics::draw_sprite("CommonMenu", func_65(5, 0), (fParam4 - 0.006f), ((fParam2 + func_79(2f)) + (0.25f * fVar6)), fVar5, fVar6, 0f, 255, 255, 255, iParam5, 0);
			fVar4 = (fVar4 - ((fVar5 * 0.38f) + 0.006f));
			break;
		
		case 3:
			func_62(6, 0, 1, &fVar5, &fVar6, 0);
			graphics::draw_sprite("CommonMenu", func_65(6, 0), (fParam4 - 0.006f), ((fParam2 + func_79(2f)) + (0.25f * fVar6)), fVar5, fVar6, 0f, 255, 255, 255, iParam5, 0);
			fVar4 = (fVar4 - ((fVar5 * 0.38f) + 0.006f));
			break;
	}
	if (uParam0->f_57[iParam1] == 0)
	{
		return;
	}
	if (uParam0->f_57[iParam1] == 15)
	{
		ui::set_text_justification(1);
	}
	else
	{
		ui::set_text_justification(2);
	}
	ui::set_text_scale(1f, func_71(14f));
	if (uParam0->f_57[iParam1] == 5 || uParam0->f_57[iParam1] == 4)
	{
		ui::set_text_wrap(fParam3, (fVar4 - (0.00078125f * 3f)));
	}
	else
	{
		ui::set_text_wrap(fParam3, (fVar4 + (0.00078125f * 2f)));
	}
	ui::set_text_colour(iVar0, iVar1, iVar2, iParam5);
	func_70(uParam0->f_489[iParam1], uParam0->f_503[iParam1], fParam4, fParam2, &(uParam0->f_280[iParam1 /*16*/]), uParam0->f_57[iParam1]);
}

void func_70(int iParam0, int iParam1, float fParam2, float fParam3, char* sParam4, int iParam5)//Position - 0x3D15
{
	int iVar0;
	float fVar1;
	float fVar2;
	float fVar3;
	int iVar4;
	int iVar5;
	int iVar6;
	
	iVar0 = 1;
	ui::set_text_centre(0);
	ui::set_text_font(0);
	func_77();
	fVar1 = 0f;
	fVar2 = (8f * 0.00078125f);
	fVar3 = (16f * 0.001388889f);
	iVar4 = 93;
	iVar5 = 182;
	iVar6 = 229;
	if (iParam5 == 4)
	{
		iVar4 = 194;
		iVar5 = 80;
		iVar6 = 80;
	}
	switch (iParam5)
	{
		case 4:
		case 5:
			ui::set_text_scale(1f, func_71(18f));
			ui::set_text_font(4);
			if (iParam0 < 0)
			{
				ui::_set_text_entry_for_width("ESMINDOLLA");
				ui::_add_text_component_substring_cash((-1 * iParam0), 1);
				fVar1 = ui::_get_text_screen_width(0);
			}
			else
			{
				ui::_set_text_entry_for_width("ESDOLLA");
				ui::_add_text_component_substring_cash(iParam0, 1);
				fVar1 = ui::_get_text_screen_width(0);
			}
			fVar1 = (fVar1 - (fVar1 % 0.00078125f));
			graphics::draw_sprite("CommonMenu", "BettingBox_Left", (fParam2 - fVar1), ((fParam3 + (fVar3 * 0.6f)) + (0.001388889f * 2f)), fVar2, fVar3, 0f, iVar4, iVar5, iVar6, 255, 0);
			graphics::draw_sprite("CommonMenu", "BettingBox_Centre", ((fParam2 - (fVar1 * 0.5f)) - (0.00078125f * 2f)), ((fParam3 + (fVar3 * 0.6f)) + (0.001388889f * 2f)), (fVar1 - (fVar2 * 0.5f)), fVar3, 0f, iVar4, iVar5, iVar6, 255, 0);
			graphics::draw_sprite("CommonMenu", "BettingBox_Right", (fParam2 - (0.00078125f * 4f)), ((fParam3 + (fVar3 * 0.6f)) + (0.001388889f * 2f)), fVar2, fVar3, 0f, iVar4, iVar5, iVar6, 255, 0);
			ui::set_text_scale(1f, func_71(14f));
			break;
	}
	ui::_0x39BBF623FC803EAC(iVar0);
	switch (iParam5)
	{
		case 11:
			ui::_set_text_entry("PERCENTAGE");
			ui::add_text_component_integer(iParam0);
			break;
		
		case 1:
			ui::set_text_font(5);
			ui::_set_text_entry("FO_NUM");
			ui::add_text_component_integer(iParam0);
			break;
		
		case 2:
			ui::set_text_font(5);
			ui::_set_text_entry("FO_TWO_NUM");
			ui::add_text_component_integer(iParam0);
			ui::add_text_component_integer(iParam1);
			break;
		
		case 4:
		case 5:
			ui::set_text_scale(1f, func_71(18f));
		
		case 3:
			if (iParam0 < 0)
			{
				ui::_set_text_entry("ESMINDOLLA");
				ui::_add_text_component_substring_cash((-1 * iParam0), 1);
			}
			else
			{
				ui::_set_text_entry("ESDOLLA");
				ui::_add_text_component_substring_cash(iParam0, 1);
			}
			break;
		
		case 6:
			ui::_set_text_entry(sParam4);
			break;
		
		case 7:
			ui::_set_text_entry("STRING");
			ui::add_text_component_substring_player_name(sParam4);
			break;
		
		case 8:
			ui::set_text_font(5);
			ui::_set_text_entry("STRING");
			ui::add_text_component_substring_time(iParam0, 14);
			break;
		
		case 9:
			ui::set_text_font(5);
			ui::_set_text_entry("STRING");
			ui::add_text_component_substring_time(iParam0, 6);
			break;
		
		case 10:
			ui::set_text_font(5);
			ui::_set_text_entry("STRING");
			ui::add_text_component_substring_time(iParam0, 2055);
			break;
		
		case 18:
			ui::set_text_font(5);
			ui::_set_text_entry("STRING");
			ui::add_text_component_substring_time(iParam0, 2055);
			break;
		
		case 12:
			ui::_set_text_entry("AHD_DIST");
			ui::add_text_component_integer(iParam0);
			break;
		
		case 13:
			ui::_set_text_entry(sParam4);
			ui::add_text_component_integer(iParam0);
			ui::add_text_component_integer(iParam1);
			break;
		
		case 15:
		case 14:
			ui::_set_text_entry(sParam4);
			ui::add_text_component_integer(iParam0);
			ui::add_text_component_integer(iParam1);
			break;
		
		case 16:
			ui::_set_text_entry(sParam4);
			ui::add_text_component_integer(iParam1);
			break;
	}
	if (iParam5 != 17)
	{
		if (iParam5 == 4 || iParam5 == 5)
		{
			ui::_draw_text((fParam2 - (0.00078125f * 4f)), fParam3, 0);
			ui::set_text_scale(1f, func_71(14f));
		}
		else
		{
			ui::_draw_text(fParam2, fParam3, 0);
		}
	}
}

float func_71(float fParam0)//Position - 0x4090
{
	return (fParam0 * 0.025f);
}

float func_72(float fParam0)//Position - 0x40A0
{
	return (fParam0 * 0.0009259259f);
}

void func_73(int iParam0, char* sParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8, int iParam9, int iParam10, int iParam11, int iParam12, int iParam13, int iParam14, int iParam15, int iParam16)//Position - 0x40B0
{
	int iVar0;
	int iVar1;
	
	iVar0 = -1;
	iVar1 = 0;
	while (iVar1 <= 9)
	{
		if (iVar0 == -1)
		{
			if (func_75(7, iVar1) == 0)
			{
				iVar0 = iVar1;
			}
		}
		iVar1++;
	}
	if (iVar0 > -1)
	{
		Global_1344178.f_1 = 1;
		func_74(7, iVar0);
		Global_1344178.f_4131[iVar0] = iParam0;
		StringCopy(&(Global_1344178.f_4131.f_11[iVar0 /*16*/]), sParam1, 64);
		Global_1344178.f_4131.f_172[iVar0] = iParam2;
		Global_1344178.f_4131.f_216[iVar0] = iParam3;
		Global_1344178.f_4131.f_183[iVar0] = iParam4;
		Global_1344178.f_4131.f_194[iVar0] = iParam5;
		Global_1344178.f_4131.f_249[iVar0] = iParam6;
		Global_1344178.f_4131.f_260[iVar0] = iParam7;
		Global_1344178.f_4131.f_205[iVar0] = iParam8;
		Global_1344178.f_4131.f_314[iVar0] = iParam9;
		Global_1344178.f_4131.f_325[iVar0] = iParam10;
		Global_1344178.f_4131.f_357[iVar0] = iParam11;
		Global_1344178.f_4131.f_238[iVar0] = iParam12;
		Global_1344178.f_4131.f_271[iVar0] = iParam13;
		Global_1344178.f_4131.f_368[iVar0] = iParam14;
		Global_1344178.f_4131.f_379[iVar0] = iParam15;
		Global_1344178.f_4131.f_390[iVar0] = iParam16;
	}
}

void func_74(int iParam0, int iParam1)//Position - 0x41FE
{
	gameplay::set_bit(&(Global_1344178.f_5139[iParam0]), iParam1);
}

int func_75(int iParam0, int iParam1)//Position - 0x4217
{
	return gameplay::is_bit_set(Global_1344178.f_5139[iParam0], iParam1);
}

float func_76(char* sParam0)//Position - 0x4230
{
	ui::_set_text_entry_for_width(sParam0);
	return (ui::_get_text_screen_width(1) / 2f);
}

void func_77()//Position - 0x4245
{
	graphics::_set_2d_layer(1);
	if (cam::is_screen_fading_out() || cam::is_screen_faded_out())
	{
		graphics::_set_2d_layer(7);
	}
	graphics::_0xC6372ECD45D73BCD(0);
}

float func_78()//Position - 0x426D
{
	float fVar0;
	
	fVar0 = 1f;
	if (gameplay::is_pc_version())
	{
	}
	return fVar0;
}

float func_79(float fParam0)//Position - 0x4281
{
	return (fParam0 * 0.001388889f);
}

void func_80()//Position - 0x4291
{
	if (!Global_14443.f_1 == 1)
	{
		if (func_84(0))
		{
			func_81(0);
		}
		gameplay::set_bit(&Global_2314, 2);
	}
}

void func_81(int iParam0)//Position - 0x42B9
{
	if (Global_14604)
	{
		func_83(0, 0);
	}
	if (Global_14443.f_1 == 10 || Global_14443.f_1 == 9)
	{
		gameplay::set_bit(&Global_2314, 16);
	}
	if (audio::is_mobile_phone_call_ongoing())
	{
		audio::stop_scripted_conversation(false);
	}
	Global_15745 = 5;
	if (iParam0 == 1)
	{
		gameplay::set_bit(&Global_2313, 30);
	}
	else
	{
		gameplay::clear_bit(&Global_2313, 30);
	}
	if (!func_82())
	{
		Global_14443.f_1 = 3;
	}
}

bool func_82()//Position - 0x4329
{
	if (Global_14443.f_1 == 1 || Global_14443.f_1 == 0)
	{
		return true;
	}
	return false;
}

void func_83(int iParam0, int iParam1)//Position - 0x4350
{
	if (iParam0)
	{
		if (func_84(0))
		{
			Global_14604 = 1;
			if (iParam1)
			{
				mobile::get_mobile_phone_position(&Global_14380);
			}
			Global_14371 = { Global_14389[Global_14388 /*3*/] };
			mobile::set_mobile_phone_position(Global_14371);
		}
	}
	else if (Global_14604 == 1)
	{
		Global_14604 = 0;
		Global_14371 = { Global_14396[Global_14388 /*3*/] };
		if (iParam1)
		{
			mobile::set_mobile_phone_position(Global_14380);
		}
		else
		{
			mobile::set_mobile_phone_position(Global_14371);
		}
	}
}

bool func_84(int iParam0)//Position - 0x43C4
{
	if (iParam0 == 1)
	{
		if (Global_14443.f_1 > 3)
		{
			if (gameplay::is_bit_set(Global_2313, 14))
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else
		{
			return false;
		}
	}
	if (script::_get_number_of_instances_of_streamed_script(joaat("cellphone_flashhand")) > 0)
	{
		return true;
	}
	if (Global_14443.f_1 > 3)
	{
		return true;
	}
	return false;
}

void func_85(int iParam0)//Position - 0x441E
{
	if (iParam0)
	{
		func_86();
		if (Global_14443.f_1 == 10 || Global_14443.f_1 == 9)
		{
			gameplay::set_bit(&Global_2314, 16);
		}
		Global_14443.f_1 = 1;
		if (func_84(0))
		{
			func_81(0);
		}
	}
	else if (Global_14443.f_1 == 1)
	{
		if (!Global_14443.f_1 == 0)
		{
			Global_14443.f_1 = 3;
		}
	}
}

void func_86()//Position - 0x4481
{
	if (Global_14443.f_1 == 9 || Global_14443.f_1 == 10)
	{
		Global_15798 = 0;
		Global_15794 = 1;
	}
}

bool func_87(var uParam0, char* sParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x44AA
{
	int iVar0;
	int iVar1;
	
	if (*uParam0 == 0)
	{
		return false;
	}
	iVar0 = 0;
	if (iParam5 == 1)
	{
		iVar0 = 1;
	}
	iVar1 = uParam0->f_123;
	if (iVar1 < 8)
	{
		uParam0->f_2[iVar1 /*15*/] = sParam1;
		uParam0->f_2[iVar1 /*15*/].f_1 = iVar0;
		uParam0->f_2[iVar1 /*15*/].f_2 = iParam6;
		uParam0->f_2[iVar1 /*15*/].f_12 = 0;
		uParam0->f_2[iVar1 /*15*/].f_13 = 0;
		uParam0->f_2[iVar1 /*15*/].f_14 = 0;
		uParam0->f_2[iVar1 /*15*/].f_3[0 /*2*/] = iParam2;
		uParam0->f_2[iVar1 /*15*/].f_3[0 /*2*/].f_1 = iParam3;
		if (iParam4 == 1)
		{
			gameplay::set_bit(&(uParam0->f_2[iVar1 /*15*/].f_13), 0);
		}
		uParam0->f_2[iVar1 /*15*/].f_14++;
		uParam0->f_123++;
		return true;
	}
	return false;
}

void func_88(var uParam0, int iParam1, int iParam2, int iParam3, int iParam4)//Position - 0x4573
{
	if (*uParam0 == 0)
	{
		*uParam0 = graphics::request_scaleform_movie_instance("instructional_buttons");
	}
	uParam0->f_1 = 0;
	uParam0->f_123 = 0;
	if (iParam1)
	{
		func_50(&(uParam0->f_1), 32);
	}
	if (graphics::has_scaleform_movie_loaded(*uParam0))
	{
		func_50(&(uParam0->f_1), 1);
		if (iParam2)
		{
			graphics::set_scaleform_movie_to_use_system_time(*uParam0, 1);
		}
	}
	if (gameplay::is_pc_version())
	{
		if (iParam3)
		{
			func_50(&(uParam0->f_1), 4096);
		}
	}
	if (iParam4)
	{
		func_50(&(uParam0->f_1), 8192);
	}
}

bool func_89(var uParam0, int iParam1, int iParam2)//Position - 0x45ED
{
	uParam0->f_12 = iParam2;
	func_92(uParam0);
	func_91(uParam0);
	if (gameplay::are_strings_equal(&(uParam0->f_550), "SPR_RESULT") || (gameplay::are_strings_equal(&(uParam0->f_550), "") && uParam0->f_56 > 0))
	{
		uParam0->f_566 = 1;
	}
	if (uParam0->f_1 == 0)
	{
		graphics::request_streamed_texture_dict("CommonMenu", false);
		graphics::request_streamed_texture_dict("MPLeaderboard", false);
		graphics::request_streamed_texture_dict("MPHud", false);
		uParam0->f_1 = unk_0x67D02A194A2FC2BD("MP_BIG_MESSAGE_FREEMODE");
		uParam0->f_2 = 0;
		uParam0->f_3 = 0;
	}
	uParam0->f_4 = graphics::request_scaleform_movie_instance("INSTRUCTIONAL_BUTTONS");
	if (iParam1)
	{
		while (((!graphics::has_scaleform_movie_loaded(uParam0->f_1) || !graphics::has_streamed_texture_dict_loaded("CommonMenu")) || !graphics::has_streamed_texture_dict_loaded("MPLeaderboard")) || !graphics::has_streamed_texture_dict_loaded("MPHud"))
		{
			system::wait(0);
		}
		if (uParam0->f_562 || uParam0->f_567)
		{
			while (!graphics::has_scaleform_movie_loaded(uParam0->f_4))
			{
				system::wait(0);
			}
		}
	}
	else
	{
		if (((!graphics::has_scaleform_movie_loaded(uParam0->f_1) || !graphics::has_streamed_texture_dict_loaded("CommonMenu")) || !graphics::has_streamed_texture_dict_loaded("MPLeaderboard")) || !graphics::has_streamed_texture_dict_loaded("MPHud"))
		{
			return false;
		}
		if (uParam0->f_562)
		{
			if (!graphics::has_scaleform_movie_loaded(uParam0->f_4))
			{
				return false;
			}
		}
	}
	if (uParam0->f_562)
	{
		if (uParam0->f_567)
		{
			func_90(uParam0);
		}
		else if (uParam0->f_56 != 0)
		{
			func_57(uParam0, 1);
		}
		else
		{
			func_57(uParam0, 0);
		}
	}
	Global_69878 = 1;
	return true;
}

void func_90(var uParam0)//Position - 0x477C
{
	graphics::_push_scaleform_movie_function(uParam0->f_4, "CLEAR_ALL");
	graphics::_pop_scaleform_movie_function_void();
	if (gameplay::is_pc_version())
	{
		graphics::_push_scaleform_movie_function(uParam0->f_4, "TOGGLE_MOUSE_BUTTONS");
		graphics::_push_scaleform_movie_function_parameter_bool(true);
		graphics::_pop_scaleform_movie_function_void();
	}
	graphics::_push_scaleform_movie_function(uParam0->f_4, "SET_DATA_SLOT");
	graphics::_push_scaleform_movie_function_parameter_int(2);
	func_53(controls::_get_control_action_name(2, 188, true));
	func_52("ES_HELP_TU");
	graphics::_pop_scaleform_movie_function_void();
	graphics::_push_scaleform_movie_function(uParam0->f_4, "SET_DATA_SLOT");
	graphics::_push_scaleform_movie_function_parameter_int(1);
	func_53(controls::_get_control_action_name(2, 187, true));
	func_52("ES_HELP_TD");
	graphics::_pop_scaleform_movie_function_void();
	graphics::_push_scaleform_movie_function(uParam0->f_4, "SET_DATA_SLOT");
	graphics::_push_scaleform_movie_function_parameter_int(0);
	func_53(controls::_get_control_action_name(2, 202, true));
	func_52("ES_HELP_AB");
	graphics::_pop_scaleform_movie_function_void();
	graphics::_push_scaleform_movie_function(uParam0->f_4, "DRAW_INSTRUCTIONAL_BUTTONS");
	graphics::_pop_scaleform_movie_function_void();
}

void func_91(var uParam0)//Position - 0x4840
{
	float fVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	
	fVar0 = 0f;
	ui::set_text_justification(0);
	ui::set_text_scale(1f, func_71(16f));
	if (uParam0->f_31 == 0)
	{
		if (uParam0->f_29)
		{
			ui::_set_text_entry_for_width("STRING");
			ui::add_text_component_substring_player_name(&(uParam0->f_13));
			fVar0 = ui::_get_text_screen_width(1);
		}
		else
		{
			ui::_set_text_entry_for_width(&(uParam0->f_13));
			fVar0 = ui::_get_text_screen_width(1);
		}
	}
	else
	{
		ui::_set_text_entry_for_width("STRING");
		iVar1 = 0;
		iVar2 = 0;
		iVar3 = 0;
		iVar3 = 0;
		while (iVar3 < uParam0->f_31)
		{
			switch (uParam0->f_32[iVar3])
			{
				case 0:
					ui::add_text_component_integer(uParam0->f_53[iVar1]);
					iVar1++;
					break;
				
				case 1:
					ui::_add_text_component_item_string(&(uParam0->f_36[iVar2 /*16*/]));
					iVar2++;
					break;
				
				case 2:
					ui::add_text_component_substring_player_name(&(uParam0->f_36[iVar2 /*16*/]));
					iVar2++;
					break;
			}
			iVar3++;
		}
		fVar0 = ui::_get_text_screen_width(1);
	}
	if (fVar0 > ((0.1125f * 2f) - (0.006f * 2f)))
	{
		*uParam0 = ((fVar0 / 2f) + (0.006f * 2f));
	}
}

void func_92(var uParam0)//Position - 0x4948
{
	uParam0->f_547 = 1f;
	uParam0->f_546 = 0;
	uParam0->f_568 = 0f;
	uParam0->f_558 = 0;
	uParam0->f_30 = 0f;
	uParam0->f_548 = 0f;
	uParam0->f_559 = 0f;
	uParam0->f_560 = 0f;
	uParam0->f_545 = 0;
	uParam0->f_563 = 0;
	uParam0->f_572 = 0;
	uParam0->f_564 = 0;
	uParam0->f_565 = 0;
	uParam0->f_566 = 0;
	*uParam0 = 0.1125f;
	uParam0->f_2 = 0;
	uParam0->f_3 = 0;
	uParam0->f_574 = 0;
	uParam0->f_575 = 0;
	uParam0->f_573 = 1f;
}

void func_93()//Position - 0x49C7
{
	int iVar0;
	int iVar1;
	
	if (!iLocal_139)
	{
		func_99(&uLocal_150, &Local_726, &Global_55831, 0);
		fLocal_134 = (fLocal_134 * 1000f);
		if (Global_85916)
		{
			func_98(&uLocal_150, 6, &(Local_726.f_12), "MTPHPERSKI", system::floor(fLocal_134), 0, 3, 0);
			func_98(&uLocal_150, 6, &(Local_726.f_24), "MTPHPERSKI", 0, 0, 3, 0);
			func_98(&uLocal_150, 6, &(Local_726.f_30), "MTPHPERSKI", system::round((fLocal_136 + fLocal_135)), 0, 3, 0);
			func_97();
		}
		else
		{
			if (iLocal_138)
			{
				func_98(&uLocal_150, 6, &(Local_726.f_12), "MTPHPERRET", system::floor(fLocal_134), 0, 3, 0);
			}
			else
			{
				func_98(&uLocal_150, 9, &(Local_726.f_12), "", system::floor(fLocal_134), 0, 0, 0);
			}
			if (!gameplay::is_string_null_or_empty(&(Local_726.f_18)))
			{
				if (iLocal_137)
				{
					func_98(&uLocal_150, 6, &(Local_726.f_24), "", 0, 0, 2, 0);
					func_98(&uLocal_150, 3, &(Local_726.f_30), "", system::round((fLocal_136 + fLocal_135)), 0, 2, 0);
				}
				else
				{
					func_98(&uLocal_150, 6, &(Local_726.f_24), "", 0, 0, 1, 0);
					func_98(&uLocal_150, 3, &(Local_726.f_30), "", system::round(fLocal_135), 0, 0, 0);
				}
			}
			else
			{
				func_98(&uLocal_150, 3, &(Local_726.f_30), "", system::round(fLocal_135), 0, 0, 0);
			}
		}
		iVar0 = 0;
		if (Global_85916)
		{
			iVar1 = 0;
			while (iVar1 < Global_67911)
			{
				if (Global_67912[iVar1 /*9*/] >= 0 && !Global_56041[Global_67912[iVar1 /*9*/] /*13*/].f_7)
				{
					if (Global_67912[iVar1 /*9*/].f_3 == 2)
					{
						iVar0 = 1;
					}
				}
				iVar1++;
			}
		}
		if (iVar0 == 1)
		{
			iLocal_145 = 50;
			iLocal_146 = 1;
			func_96(&uLocal_150, 1, &(Local_726.f_48), iLocal_145, 0, 0, 1);
		}
		else if (iLocal_137)
		{
			if (iLocal_138)
			{
				iLocal_145 = 75;
				iLocal_146 = 2;
				func_96(&uLocal_150, 1, &(Local_726.f_42), iLocal_145, 0, 0, 2);
			}
			else
			{
				iLocal_145 = 100;
				iLocal_146 = 3;
				func_96(&uLocal_150, 1, &(Local_726.f_36), iLocal_145, 0, 0, 3);
			}
		}
		else if (!iLocal_137 && !iLocal_138)
		{
			iLocal_145 = 75;
			iLocal_146 = 2;
			func_96(&uLocal_150, 1, &(Local_726.f_42), iLocal_145, 0, 0, 2);
		}
		else
		{
			iLocal_145 = 50;
			iLocal_146 = 1;
			func_96(&uLocal_150, 1, &(Local_726.f_48), iLocal_145, 0, 0, 1);
		}
		func_94();
		iLocal_139 = 1;
	}
}

void func_94()//Position - 0x4C01
{
	if (script::_get_number_of_instances_of_streamed_script(joaat("assassin_valet")) == 1)
	{
		func_95(38, system::floor(fLocal_134), 1);
		if (iLocal_137)
		{
			func_95(39, 1, 1);
		}
		else
		{
			func_95(39, 0, 1);
		}
		if (iLocal_137)
		{
			func_95(40, system::round((fLocal_136 + fLocal_135)), 1);
		}
		else
		{
			func_95(40, system::round(fLocal_135), 1);
		}
		func_95(41, iLocal_145, 1);
		func_95(42, iLocal_146, 1);
	}
	else if (script::_get_number_of_instances_of_streamed_script(joaat("assassin_multi")) == 1)
	{
		func_95(52, system::floor(fLocal_134), 1);
		if (iLocal_137)
		{
			func_95(53, 1, 1);
		}
		else
		{
			func_95(53, 0, 1);
		}
		if (iLocal_137)
		{
			func_95(56, system::round((fLocal_136 + fLocal_135)), 1);
		}
		else
		{
			func_95(56, system::round(fLocal_135), 1);
		}
		func_95(54, iLocal_145, 1);
		func_95(55, iLocal_146, 1);
	}
	else if (script::_get_number_of_instances_of_streamed_script(joaat("assassin_hooker")) == 1)
	{
		func_95(66, system::floor(fLocal_134), 1);
		if (iLocal_137)
		{
			func_95(67, 1, 1);
		}
		else
		{
			func_95(67, 0, 1);
		}
		if (iLocal_137)
		{
			func_95(68, system::round((fLocal_136 + fLocal_135)), 1);
		}
		else
		{
			func_95(68, system::round(fLocal_135), 1);
		}
		func_95(69, iLocal_145, 1);
		func_95(70, iLocal_146, 1);
	}
	else if (script::_get_number_of_instances_of_streamed_script(joaat("assassin_bus")) == 1)
	{
		func_95(81, system::floor(fLocal_134), 1);
		if (iLocal_137)
		{
			func_95(82, 1, 1);
		}
		else
		{
			func_95(82, 0, 1);
		}
		if (iLocal_137)
		{
			func_95(83, system::round((fLocal_136 + fLocal_135)), 1);
		}
		else
		{
			func_95(83, system::round(fLocal_135), 1);
		}
		func_95(84, iLocal_145, 1);
		func_95(85, iLocal_146, 1);
	}
	else if (script::_get_number_of_instances_of_streamed_script(joaat("assassin_construction")) == 1)
	{
		func_95(97, system::floor(fLocal_134), 1);
		if (iLocal_137)
		{
			func_95(98, 1, 1);
		}
		else
		{
			func_95(98, 0, 1);
		}
		if (iLocal_137)
		{
			func_95(99, system::round((fLocal_136 + fLocal_135)), 1);
		}
		else
		{
			func_95(99, system::round(fLocal_135), 1);
		}
		func_95(100, iLocal_145, 1);
		func_95(101, iLocal_146, 1);
	}
}

void func_95(int iParam0, int iParam1, int iParam2)//Position - 0x4E25
{
	int iVar0;
	
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < Global_67911)
	{
		if (Global_67912[iVar0 /*9*/] == iParam0)
		{
			if (iParam2)
			{
				Global_67912[iVar0 /*9*/].f_1 = iParam1;
			}
			else
			{
				Global_67912[iVar0 /*9*/].f_1 = (Global_67912[iVar0 /*9*/].f_1 + iParam1);
			}
			return;
		}
		iVar0++;
	}
	if (Global_67912[iVar0 /*9*/] != -1)
	{
		if (Global_56041[Global_67912[iVar0 /*9*/] /*13*/] == 3)
		{
			if (Global_67912[iVar0 /*9*/].f_1 > 1)
			{
				Global_67912[iVar0 /*9*/].f_1 = 1;
			}
			if (Global_67912[iVar0 /*9*/].f_1 < 0)
			{
				Global_67912[iVar0 /*9*/].f_1 = 0;
			}
		}
	}
}

void func_96(var uParam0, int iParam1, char* sParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x4ECF
{
	uParam0->f_549 = iParam1;
	StringCopy(&(uParam0->f_550), sParam2, 16);
	uParam0->f_554 = iParam3;
	uParam0->f_555 = iParam4;
	uParam0->f_556 = iParam5;
	uParam0->f_557 = iParam6;
}

void func_97()//Position - 0x4F03
{
	Global_85915 = 0;
	Global_85916 = 0;
}

void func_98(var uParam0, int iParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6, int iParam7)//Position - 0x4F15
{
	var uVar0;
	
	if (uParam0->f_56 == 13)
	{
		return;
	}
	uVar0 = uParam0->f_56;
	uParam0->f_57[uVar0] = iParam1;
	StringCopy(&(uParam0->f_71[uVar0 /*16*/]), sParam2, 64);
	StringCopy(&(uParam0->f_280[uVar0 /*16*/]), sParam3, 64);
	uParam0->f_489[uVar0] = iParam4;
	uParam0->f_503[uVar0] = iParam5;
	uParam0->f_517[uVar0] = iParam6;
	uParam0->f_531[uVar0] = iParam7;
	uParam0->f_56++;
}

void func_99(var uParam0, char* sParam1, char* sParam2, int iParam3)//Position - 0x4F88
{
	StringCopy(&(uParam0->f_5), sParam1, 16);
	StringCopy(&(uParam0->f_13), sParam2, 64);
	uParam0->f_29 = iParam3;
	uParam0->f_11 = 0;
}

void func_100()//Position - 0x4FAB
{
	func_449(&(Global_101553.f_18818.f_1), 4194304);
}

float func_101(int iParam0)//Position - 0x4FC4
{
	if (func_104(iParam0))
	{
		if (func_103(iParam0))
		{
			return iParam0->f_2;
		}
		else
		{
			return (func_102(gameplay::is_bit_set(*iParam0, 4)) - iParam0->f_1);
		}
	}
	return iParam0->f_1;
}

float func_102(int iParam0)//Position - 0x5003
{
	float fVar0;
	float fVar1;
	int iVar2;
	float fVar3;
	float fVar4;
	
	if (iParam0)
	{
		fVar0 = system::to_float(gameplay::get_game_timer());
		fVar1 = (fVar0 / 1000f);
		return fVar1;
	}
	if (network::network_is_game_in_progress())
	{
		iVar2 = network::get_network_time();
		fVar3 = system::to_float(iVar2);
		fVar4 = (fVar3 / 1000f);
		return fVar4;
	}
	return (system::to_float(gameplay::get_game_timer()) / 1000f);
}

int func_103(var uParam0)//Position - 0x505B
{
	return gameplay::is_bit_set(*uParam0, 2);
}

int func_104(int iParam0)//Position - 0x506B
{
	return gameplay::is_bit_set(*iParam0, 1);
}

bool func_105(var uParam0, int iParam1)//Position - 0x507B
{
	if (!entity::is_entity_dead(uParam0->f_7, 0))
	{
		if ((((entity::is_entity_playing_anim(uParam0->f_7, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_intro_f", 3) || entity::is_entity_playing_anim(uParam0->f_7, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_f", 3)) || entity::is_entity_playing_anim(uParam0->f_7, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_outro_f", 3)) || entity::is_entity_playing_anim(uParam0->f_7, "ODDJOBS@ASSASSINATE@VICE@SEX", "FrontSeat_CarSex_Normal_Outro_f", 3)) || entity::is_entity_playing_anim(uParam0->f_7, "ODDJOBS@assassinate@vice@incar", "passenger_KO_female_f", 3))
		{
			func_378();
		}
	}
	if (!entity::is_entity_dead(*uParam0, 0))
	{
		if ((((entity::is_entity_playing_anim(*uParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_intro_m", 3) || entity::is_entity_playing_anim(*uParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_m", 3)) || entity::is_entity_playing_anim(*uParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_outro_m", 3)) || entity::is_entity_playing_anim(uParam0->f_7, "ODDJOBS@ASSASSINATE@VICE@SEX", "FrontSeat_CarSex_Normal_Outro_m", 3)) || entity::is_entity_playing_anim(*uParam0, "ODDJOBS@assassinate@vice@incar", "passenger_KO_female_m", 3))
		{
			func_378();
		}
	}
	switch (iLocal_1041)
	{
		case 1:
			if (func_439())
			{
				if (func_437())
				{
					iLocal_1970 = true;
				}
				iLocal_1967 = true;
				iLocal_1041 = 4;
				break;
			}
			func_356(uParam0);
			break;
		
		case 4:
			func_351();
			if (iLocal_1970)
			{
				func_340(&Local_1684, &uLocal_2240, 1);
			}
			else
			{
				func_340(&Local_1684, &uLocal_2240, 0);
			}
			if (iLocal_1967)
			{
				if (Global_101553.f_18818.f_7 != 0f)
				{
					func_339(&iLocal_1037, Global_101553.f_18818.f_7);
				}
				if (iLocal_2003 == 0)
				{
					func_338();
				}
				else if (iLocal_2003 == 1)
				{
					func_337();
				}
				else if (iLocal_2003 == 2)
				{
					func_335();
				}
				else if (iLocal_2003 == 3)
				{
					func_328();
				}
				func_327(500);
			}
			else
			{
				if (!func_104(&iLocal_1037))
				{
					func_326(&iLocal_1037);
					Global_101553.f_18818.f_7 = 0f;
				}
				func_325(&Local_1684, &Local_1044, 1);
				func_324();
				func_323(&(uParam0->f_2), Local_1044.f_3, Local_1044.f_6);
				iLocal_1041 = 6;
			}
			break;
		
		case 6:
			if (!player::is_player_wanted_level_greater(player::player_id(), 0))
			{
				func_322(&(Local_1684.f_63[0 /*6*/]), 7500, 1);
				iLocal_1968 = 1;
			}
			else
			{
				ui::remove_blip(&(uParam0->f_2));
				func_322("ASS_HK_COPS", 7500, 1);
			}
			func_262(0, "assassin_hooker_locate_hooker", 0, 0, 0, 1);
			func_249(iLocal_2010);
			func_324();
			func_248(&(uParam0->f_16), 1, player::player_ped_id(), "FRANKLIN", 0, 1);
			iLocal_1041 = 7;
			break;
		
		case 7:
			func_247();
			func_246();
			if (!iLocal_1995)
			{
				if (func_244(Local_1684.f_18, 1) < 250f)
				{
					if (func_243())
					{
						func_242(&Local_1044, &iLocal_2524);
						func_238(&Local_1684, &Local_1044, 1);
						iLocal_1995 = 1;
					}
				}
			}
			if (func_237(uParam0, iParam1, 0))
			{
				func_236(&Local_1044, &iLocal_2524, 0);
				func_226(Local_1501, &Local_1684, 2);
			}
			if (ui::does_blip_exist(uParam0->f_2))
			{
				func_223();
				if ((!func_237(uParam0, iParam1, 1) && !func_215(iLocal_1028, uParam0->f_8, &vLocal_122, &iLocal_133, 1, func_222(iLocal_1028), 0, 1, 1)) && !func_215(Local_1044.f_7, uParam0->f_8, &vLocal_122, &iLocal_133, 1, func_222(Local_1044.f_7), 0, 1, 1))
				{
					if (func_214(vLocal_2021[0 /*3*/], 35f, vLocal_2021[1 /*3*/], 35f) || (entity::does_entity_exist(Local_1044.f_7) && func_213(Local_1044.f_7, 0) <= 35f))
					{
						if ((iLocal_1995 && ((!entity::is_entity_dead(Local_1044.f_7, 0) && entity::is_entity_on_screen(Local_1044.f_7)) && !entity::is_entity_occluded(Local_1044.f_7))) && (!entity::is_entity_dead(player::player_ped_id(), 0) && !entity::is_entity_in_angled_area(player::player_ped_id(), -545.7833f, -1804.772f, 20.57166f, -566.8466f, -1792.359f, 28.83384f, 17.25f, 0, true, 0)))
						{
							ui::remove_blip(&(uParam0->f_2));
							if (!entity::is_entity_dead(player::player_ped_id(), 0))
							{
								if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
								{
									audio::trigger_music_event("ASS3_RADIO_FADE_OUT");
								}
							}
							iLocal_1041 = 8;
						}
					}
				}
				if (player::is_player_wanted_level_greater(player::player_id(), 0))
				{
					if (func_244(Local_1684.f_18, 1) > 100f)
					{
						func_212(uParam0->f_2, "ASS_HK_COPS");
					}
					else
					{
						func_226(Local_1501, &Local_1684, 2);
					}
				}
			}
			else if (!player::is_player_wanted_level_greater(player::player_id(), 0))
			{
				func_325(&Local_1684, &Local_1044, 1);
				if (!iLocal_1968)
				{
					func_322("ASS_HK_WAIT", 7500, 1);
					iLocal_1968 = 1;
				}
			}
			else
			{
				func_211();
				if (func_244(vLocal_2021[0 /*3*/], 1) < 50f || func_237(uParam0, iParam1, 0))
				{
					func_236(&Local_1044, &iLocal_2524, 0);
					func_226(Local_1501, &Local_1684, 2);
				}
			}
			break;
		
		case 8:
			func_210(uParam0, 1);
			iLocal_1041 = 9;
			break;
		
		case 9:
			iLocal_1041 = 10;
			break;
		
		case 10:
			func_207(uParam0);
			func_205(uParam0);
			if (iLocal_1983 && func_204(&Local_1044, &Local_1684))
			{
				func_236(&Local_1044, &iLocal_2524, 1);
				func_203(iParam1);
				if (ui::does_blip_exist(uParam0->f_2))
				{
					ui::remove_blip(&(uParam0->f_2));
				}
				func_202(uParam0->f_7);
				if (!entity::is_entity_dead(uParam0->f_1, 0))
				{
					if (entity::is_entity_dead(*uParam0, 0) && ped::is_ped_in_vehicle(*uParam0, uParam0->f_1, 0))
					{
						vehicle::start_vehicle_horn(uParam0->f_1, 100000, 0, 0);
					}
					vehicle::set_vehicle_doors_locked(uParam0->f_1, 1);
				}
				func_201(&uLocal_2102, 0, 0);
				func_248(&(uParam0->f_16), 1, player::player_ped_id(), "FRANKLIN", 0, 1);
				func_200(&iLocal_1489, &(uParam0->f_16), "OJASAUD", "OJAS_VICOM", 9, 1, 0, 0);
				iLocal_1041 = 11;
			}
			else
			{
				func_122(&Local_1044, &iLocal_2524);
			}
			break;
		
		case 11:
			if (!func_121())
			{
				if (!iLocal_1990)
				{
					func_120();
					if (!func_104(&iLocal_2098))
					{
						func_326(&iLocal_2098);
					}
					else
					{
						func_119(&iLocal_2098);
					}
					func_322("ASS_HK_LEAVE", 7500, 1);
					iLocal_1990 = 1;
				}
				if (func_104(&iLocal_2098))
				{
					if (func_101(&iLocal_2098) > 30f)
					{
						if (player::get_player_wanted_level(player::player_id()) == 0)
						{
							player::set_player_wanted_level(player::player_id(), 2, 0);
							player::set_player_wanted_level_now(player::player_id(), 0);
						}
					}
				}
				if (!iLocal_1490)
				{
					if (player::get_player_wanted_level(player::player_id()) > 0)
					{
						iLocal_1490 = true;
					}
				}
			}
			else
			{
				if (audio::prepare_music_event("ASS3_RADIO_PASS"))
				{
					audio::trigger_music_event("ASS3_RADIO_PASS");
				}
				iLocal_1041 = 12;
			}
			func_200(&iLocal_1489, &(uParam0->f_16), "OJASAUD", "OJAS_VICOM", 9, 1, 0, 0);
			break;
		
		case 12:
			func_200(&iLocal_1489, &(uParam0->f_16), "OJASAUD", "OJAS_VICOM", 9, 1, 0, 0);
			if (!func_118())
			{
				if (player::get_player_wanted_level(player::player_id()) == 0)
				{
					if (func_104(&iLocal_2089))
					{
						if (func_101(&iLocal_2089) > 3f)
						{
							if (func_106(uParam0))
							{
								return true;
							}
						}
					}
					else
					{
						func_326(&iLocal_2089);
					}
				}
				else if (!iLocal_1029)
				{
					func_322("ASS_HK_COPS", 7500, 1);
					iLocal_1029 = true;
				}
			}
			break;
	}
	return false;
}

bool func_106(var uParam0)//Position - 0x57B8
{
	if (!iLocal_1985)
	{
		func_248(&(uParam0->f_16), 3, 0, "LESTER", 0, 1);
		func_248(&(uParam0->f_16), 1, player::player_ped_id(), "Franklin", 0, 1);
		if (func_108(&(uParam0->f_16), 12, "OJASAUD", "OJAS_VICE_C", 14, 1, 0, 0, 0))
		{
			iLocal_1985 = 1;
		}
	}
	if (iLocal_1985 && func_107())
	{
		return true;
	}
	return false;
}

bool func_107()//Position - 0x5820
{
	if (Global_15745 == 0)
	{
		return true;
	}
	return false;
}

int func_108(var uParam0, int iParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8)//Position - 0x5837
{
	func_117(uParam0, iParam1, sParam2, iParam6, iParam7, 0);
	Global_15793 = 0;
	Global_15752 = 1;
	Global_15759 = 0;
	Global_15754 = 0;
	Global_16736 = 0;
	Global_16738 = 0;
	Global_16742 = 0;
	Global_15750 = 0;
	Global_15797 = 0;
	Global_15799 = 0;
	if (iParam5 == 1)
	{
		Global_15757 = 1;
	}
	else
	{
		Global_15757 = 0;
	}
	Global_2621441 = 0;
	return func_109(sParam3, iParam4, iParam8);
}

bool func_109(char* sParam0, int iParam1, int iParam2)//Position - 0x5896
{
	Global_15746 = 0;
	if (Global_15745 == 0 || Global_15747 == 2)
	{
		if (Global_15745 != 0)
		{
			if (iParam1 > Global_15747)
			{
				if (Global_15752 == 0)
				{
					audio::stop_scripted_conversation(false);
					Global_14443.f_1 = 3;
					Global_15745 = 0;
					Global_15746 = 1;
					Global_15798 = 0;
					Global_15741 = 0;
					Global_15742 = 0;
					Global_15756 = 0;
					Global_15755 = 0;
					Global_14442 = 0;
				}
				else
				{
					func_116();
					return false;
				}
			}
			else
			{
				return false;
			}
		}
		if (audio::is_scripted_conversation_ongoing())
		{
			return false;
		}
		if (func_115(8, -1))
		{
			return false;
		}
		Global_15821 = { Global_15815 };
		func_114();
		Global_15034 = { Global_15199 };
		Global_15751 = Global_15752;
		Global_15758 = Global_15759;
		Global_2621442 = Global_2621441;
		Global_15760 = { Global_15776 };
		Global_15753 = Global_15754;
		Global_16735 = Global_16736;
		Global_16743 = { Global_16749 };
		Global_16737 = Global_16738;
		Global_16739 = Global_16740;
		Global_16741 = Global_16742;
		Global_15364.f_370 = Global_16734;
		Global_15364.f_368 = Global_16732;
		Global_15364.f_369 = Global_16733;
		Global_15741 = Global_15742;
		if (Global_15751)
		{
			gameplay::clear_bit(&Global_2313, 20);
			gameplay::clear_bit(&Global_2314, 17);
			gameplay::clear_bit(&Global_2315, 0);
			if (iParam2)
			{
				func_113();
				if (Global_3118[Global_14443 /*2811*/][0 /*281*/].f_259 == 2)
				{
					if (iParam1 == 13)
					{
					}
					else
					{
						return false;
					}
				}
				if (Global_14443.f_1 > 3)
				{
					return false;
				}
			}
			if (Global_14409 == 1)
			{
				return false;
			}
			if (player::is_player_playing(player::player_id()))
			{
				if (ped::is_ped_in_melee_combat(player::player_ped_id()))
				{
					return false;
				}
				if (func_112())
				{
					return false;
				}
				if (ai::is_ped_sprinting(player::player_ped_id()))
				{
					return false;
				}
				if (ped::is_ped_ragdoll(player::player_ped_id()))
				{
					return false;
				}
				if (ped::is_ped_in_parachute_free_fall(player::player_ped_id()))
				{
					return false;
				}
				if (weapon::get_is_ped_gadget_equipped(player::player_ped_id(), joaat("gadget_parachute")))
				{
					return false;
				}
				if (!Global_69617)
				{
					if (entity::is_entity_in_water(player::player_ped_id()))
					{
						return false;
					}
					if (player::is_player_climbing(player::player_id()))
					{
						return false;
					}
					if (ped::is_ped_planting_bomb(player::player_ped_id()))
					{
						return false;
					}
					if (player::is_special_ability_active(player::player_id()))
					{
						return false;
					}
				}
			}
			if (func_82())
			{
				return false;
			}
			else
			{
				switch (Global_14443.f_1)
				{
					case 7:
						return false;
						break;
					
					case 8:
						return false;
						break;
					
					case 9:
						break;
					
					case 10:
						break;
					
					default:
						break;
				}
				if (gameplay::is_bit_set(Global_2313, 9))
				{
					return false;
				}
			}
			func_111();
			Global_15755 = iParam2;
		}
		Global_15747 = iParam1;
		StringCopy(&Global_15364, sParam0, 24);
		Global_14611 = 0;
		func_110();
		return true;
	}
	if (Global_15745 == 5)
	{
		return false;
	}
	if (iParam1 < Global_15747 || iParam1 == Global_15747)
	{
		return false;
	}
	if (iParam1 == 2)
	{
	}
	else
	{
		func_116();
	}
	return false;
}

void func_110()//Position - 0x5B62
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 <= 69)
	{
		StringCopy(&(Global_14613[iVar0 /*6*/]), "", 24);
		iVar0++;
	}
	audio::stop_scripted_conversation(false);
	Global_15745 = 1;
}

void func_111()//Position - 0x5B93
{
	Global_15798 = Global_15797;
	Global_15792 = Global_15793;
	Global_15839 = { Global_15827 };
	Global_15845 = { Global_15833 };
	Global_15800 = Global_15799;
	Global_15869 = { Global_15851 };
	Global_15875 = { Global_15857 };
	Global_15881 = { Global_15863 };
	Global_15887 = { Global_15893 };
	Global_1628 = Global_1629;
	Global_1630 = Global_1631;
	Global_15756 = Global_15757;
	Global_15758 = Global_15759;
	Global_15760 = { Global_15776 };
	Global_15749 = Global_15750;
	Global_16761 = 0;
	Global_15794 = 0;
	Global_15795 = 0;
	gameplay::clear_bit(&Global_2314, 16);
}

bool func_112()//Position - 0x5C28
{
	int iVar0;
	int iVar1;
	
	if (Global_69617)
	{
		iVar0 = 0;
		weapon::get_current_ped_weapon(player::player_ped_id(), &iVar1, 1);
		if (player::is_player_playing(player::player_id()))
		{
			if ((iVar1 == joaat("weapon_sniperrifle") || iVar1 == joaat("weapon_heavysniper")) || iVar1 == joaat("weapon_remotesniper"))
			{
				iVar0 = 1;
			}
		}
		if (cam::is_aim_cam_active() && iVar0 == 1)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	if (player::is_player_playing(player::player_id()))
	{
		if (ped::get_ped_config_flag(player::player_ped_id(), 78, 1))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	return true;
}

void func_113()//Position - 0x5CC1
{
	if (func_29(14))
	{
		if (!entity::is_entity_dead(player::player_ped_id(), 0))
		{
			if (entity::get_entity_model(player::player_ped_id()) == Global_101553.f_32740[0 /*29*/])
			{
				Global_14443 = 0;
			}
			else if (entity::get_entity_model(player::player_ped_id()) == Global_101553.f_32740[1 /*29*/])
			{
				Global_14443 = 1;
			}
			else if (entity::get_entity_model(player::player_ped_id()) == Global_101553.f_32740[2 /*29*/])
			{
				Global_14443 = 2;
			}
			else
			{
				Global_14443 = 0;
			}
		}
	}
	else
	{
		Global_14443 = func_34();
		if (Global_14443 == 145)
		{
			Global_14443 = 3;
		}
		if (Global_69617)
		{
			Global_14443 = 3;
		}
		if (Global_14443 > 3)
		{
			Global_14443 = 3;
		}
	}
}

void func_114()//Position - 0x5D63
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 <= 15)
	{
		Global_15034[iVar0 /*10*/] = 0;
		StringCopy(&(Global_15034[iVar0 /*10*/].f_1), "", 24);
		Global_15034[iVar0 /*10*/].f_7 = 0;
		Global_15034[iVar0 /*10*/].f_8 = 0;
		iVar0++;
	}
	Global_15034.f_161 = -99;
	Global_15034.f_162 = { 0f, 0f, 0f };
}

int func_115(int iParam0, int iParam1)//Position - 0x5DBA
{
	switch (iParam0)
	{
		case 5:
			if (iParam1 > -1)
			{
				return Global_1342783.f_203[iParam1];
			}
			break;
	}
	return gameplay::is_bit_set(Global_1342783.f_982, iParam0);
}

void func_116()//Position - 0x5DF5
{
	audio::restart_scripted_conversation();
	Global_16756 = 0;
	if ((audio::is_mobile_phone_call_ongoing() || Global_14443.f_1 == 9) || Global_14442 == 1)
	{
		audio::stop_scripted_conversation(false);
		Global_15745 = 6;
		Global_14443.f_1 = 3;
		return;
	}
	if (audio::is_scripted_conversation_ongoing())
	{
		audio::stop_scripted_conversation(true);
		Global_15745 = 6;
		return;
	}
}

void func_117(var uParam0, int iParam1, char* sParam2, int iParam3, int iParam4, int iParam5)//Position - 0x5E4C
{
	Global_15199 = { *uParam0 };
	Global_1629 = iParam1;
	StringCopy(&Global_15815, sParam2, 24);
	Global_16734 = iParam5;
	if (iParam3 == 0)
	{
		Global_16732 = 1;
		Global_16730 = 0;
	}
	else
	{
		Global_16732 = 0;
		Global_16730 = 1;
	}
	if (iParam4 == 0)
	{
		Global_16733 = 1;
		Global_16731 = 0;
	}
	else
	{
		Global_16733 = 0;
		Global_16731 = 1;
	}
}

bool func_118()//Position - 0x5EA2
{
	if (Global_15745 != 0 || audio::is_scripted_conversation_ongoing())
	{
		return true;
	}
	return false;
}

void func_119(int iParam0)//Position - 0x5EC4
{
	func_339(iParam0, 0f);
}

void func_120()//Position - 0x5ED3
{
	if (cam::does_cam_exist(iLocal_142))
	{
		cam::set_cam_active(iLocal_142, false);
		cam::render_script_cams(false, false, 3000, 1, 0, 0);
		ui::display_hud(true);
		ui::display_radar(true);
		cam::destroy_cam(iLocal_142, 0);
	}
}

bool func_121()//Position - 0x5F08
{
	vector3 vVar0;
	float fVar3;
	
	if (!iLocal_1994)
	{
		if (!entity::is_entity_dead(player::player_ped_id(), 0))
		{
			vLocal_2037 = { entity::get_entity_coords(player::player_ped_id(), 1) };
			iLocal_1994 = 1;
		}
	}
	if (!entity::is_entity_dead(player::player_ped_id(), 0))
	{
		vVar0 = { entity::get_entity_coords(player::player_ped_id(), 1) };
	}
	fVar3 = system::vdist2(vLocal_2037, vVar0);
	if (fVar3 != 0f)
	{
		if (fVar3 > 30625f)
		{
			return true;
		}
	}
	return false;
}

void func_122(int iParam0, int iParam1)//Position - 0x5F76
{
	int iVar0;
	vector3 vVar1;
	int iVar4;
	vector3 vVar5;
	vector3 vVar8;
	vector3 vVar11;
	float fVar14;
	
	func_199();
	if (!iLocal_1964)
	{
		if (!iLocal_1965)
		{
			if (func_198())
			{
				iLocal_1965 = true;
			}
		}
		if (iLocal_1460 >= 3 && iLocal_1460 < 7)
		{
			if (iLocal_1460 == 4 || (!entity::is_entity_dead(iParam0->f_7, 0) && ai::get_script_task_status(iParam0->f_7, -1794415470) == 1))
			{
				if (func_104(&iLocal_2083))
				{
					func_197(&iLocal_2083);
				}
			}
			else if (func_195(iParam0->f_1, &iLocal_2083, &iLocal_2086, &uLocal_2028, 10f, 6f))
			{
				iLocal_1965 = true;
			}
		}
	}
	func_191(iParam0, iParam1);
	if (iLocal_1460 < 11)
	{
		if (((((((func_190(iParam1, iParam0, &uLocal_2002, 1, &uLocal_1988) || func_188(*iParam0, &(iParam0->f_16), &iLocal_2518, 1)) || func_188(iParam0->f_7, &(iParam0->f_16), &iLocal_2518, 0)) || iLocal_1964) || player::is_player_wanted_level_greater(player::player_id(), 0)) || iLocal_1984) || iLocal_1965) || iLocal_1959)
		{
			ui::remove_blip(&(iParam0->f_2));
			func_236(iParam0, iParam1, 0);
			func_203(iParam1);
			if ((!entity::is_entity_dead(*iParam0, 0) && !entity::is_entity_dead(iParam0->f_7, 0)) && !entity::is_entity_dead(player::player_ped_id(), 0))
			{
				if (((iLocal_133 == 4 || iLocal_133 == 8) || iLocal_133 == 32) || ped::is_ped_shooting(player::player_ped_id()))
				{
					vVar8 = { entity::get_entity_coords(player::player_ped_id(), 1) };
					vVar11 = { entity::get_entity_coords(*iParam0, 1) };
					fVar14 = fVar14;
					fVar14 = system::vdist(vVar8, vVar11);
					if (system::vdist2(vVar8, vVar11) > 25f)
					{
						iLocal_1989 = true;
					}
				}
			}
			if (entity::does_entity_exist(*iParam0) && !ped::is_ped_injured(*iParam0))
			{
				if (func_213(*iParam0, 1) < 30f)
				{
					audio::stop_scripted_conversation(false);
					sLocal_1999 = func_187();
				}
				if (entity::does_entity_exist(iParam0->f_1) && !vehicle::is_vehicle_driveable(iParam0->f_1, 0))
				{
					ped::set_ped_combat_attributes(*iParam0, 3, true);
					vehicle::set_vehicle_doors_locked(iParam0->f_1, 1);
					func_186(*iParam0);
					if (!ped::is_ped_injured(iParam0->f_7))
					{
						if (ai::get_script_task_status(iParam0->f_7, 242628503) != 1)
						{
							func_202(iParam0->f_7);
						}
					}
				}
				else if (!iLocal_1983)
				{
					func_226(Local_1501, &Local_1684, 2);
				}
				else
				{
					if (!iLocal_1975)
					{
						if (iLocal_1976)
						{
							if (iLocal_1986)
							{
								func_186(*iParam0);
								func_202(iParam0->f_7);
							}
							else
							{
								func_186(*iParam0);
								func_202(iParam0->f_7);
							}
							vehicle::set_vehicle_doors_locked(iParam0->f_1, 1);
							if (!iLocal_1982 && !iLocal_1963)
							{
								func_322("ASS_HK_WAIT2", 7500, 1);
							}
							iLocal_1975 = 1;
						}
						else
						{
							ai::clear_ped_tasks(*iParam0);
							ai::task_vehicle_mission_coors_target(*iParam0, iParam0->f_1, entity::get_entity_coords(player::player_ped_id(), 1), 8, 40f, 786468, 9999f, -1f, 1);
							ai::add_vehicle_subtask_attack_ped(*iParam0, player::player_ped_id());
							iLocal_1975 = 1;
						}
					}
					if (!ped::is_ped_injured(iParam0->f_7))
					{
						if ((entity::get_entity_speed(iParam0->f_7) < 5f && ped::is_ped_in_vehicle(iParam0->f_7, iParam0->f_1, 0)) || !ped::is_ped_in_vehicle(iParam0->f_7, iParam0->f_1, 0))
						{
							if (ped::is_ped_in_vehicle(iParam0->f_7, iParam0->f_1, 0))
							{
								if (!iLocal_1989)
								{
									func_202(iParam0->f_7);
								}
							}
							else
							{
								ai::task_smart_flee_ped(iParam0->f_7, player::player_ped_id(), 500f, -1, 0, 0);
							}
						}
					}
				}
				ped::set_ped_keep_task(*iParam0, true);
			}
			else if (!iLocal_1983)
			{
				func_226(Local_1501, &Local_1684, 2);
			}
			ped::add_relationship_group("TargetGroup", &iLocal_2101);
			ped::set_relationship_between_groups(5, iLocal_2101, 1862763509);
			ped::set_relationship_between_groups(5, 1862763509, iLocal_2101);
			ped::set_relationship_between_groups(5, iLocal_2101, -1533126372);
			ped::set_relationship_between_groups(5, -1533126372, iLocal_2101);
			if (entity::does_entity_exist(*iParam0))
			{
				ped::set_ped_flee_attributes(*iParam0, 256, true);
				ped::set_ped_relationship_group_hash(*iParam0, iLocal_2101);
				if (!Local_1684.f_270)
				{
					iParam0->f_2 = func_185(*iParam0, 0, 0);
				}
			}
			iLocal_1460 = 11;
		}
	}
	else if (!iLocal_1969)
	{
		if (!ped::is_ped_injured(*iParam0))
		{
			ped::set_ped_config_flag(*iParam0, 134, false);
		}
		if (!ped::is_ped_injured(iParam0->f_7))
		{
			ped::set_ped_config_flag(iParam0->f_7, 134, false);
		}
		iLocal_1969 = 1;
	}
	switch (iLocal_1460)
	{
		case 0:
			func_262(1, "assassin_hooker_wait_for_target", 0, 0, 0, 1);
			ped::set_ped_non_creation_area(-708.9319f, -1841.254f, -100f, -430.8133f, -1647.652f, 100f);
			ped::set_ped_non_creation_area(-708.9319f, -1841.254f, -100f, -430.8133f, -1647.652f, 100f);
			func_248(&(iParam0->f_16), 1, player::player_ped_id(), "FRANKLIN", 0, 1);
			if (!ped::is_ped_injured(iParam0->f_7))
			{
				if (ui::does_blip_exist(iParam0->f_2))
				{
					ui::remove_blip(&(iParam0->f_2));
				}
				iParam0->f_2 = func_185(iParam0->f_7, 1, 0);
				iLocal_1460 = 1;
			}
			break;
		
		case 1:
			if ((func_184(iParam0) && func_182()) && func_181())
			{
				if (func_180("ASS_HK_RT", 0, 0))
				{
					ui::clear_prints();
				}
				func_179(&Local_1684, iParam0);
				func_178(&Local_1684, iParam0);
				func_177(iParam0);
				func_176(iParam0);
				system::settimera(0);
				iLocal_1460 = 2;
			}
			if (!func_104(&iLocal_2074))
			{
				func_326(&iLocal_2074);
			}
			func_175();
			break;
		
		case 2:
			if (((vehicle::is_vehicle_driveable(iParam0->f_10, 0) && entity::is_entity_on_screen(iParam0->f_10)) || (vehicle::is_vehicle_driveable(iParam0->f_1, 0) && entity::is_entity_on_screen(iParam0->f_1))) || system::timera() >= 10000)
			{
				if (!entity::is_entity_in_angled_area(player::player_ped_id(), -595.623f, -1809.406f, -23.282f, -598.47f, -1815.8f, 23.282f, 15f, 0, false, 0))
				{
					func_174(iParam0);
					iLocal_1460 = 3;
				}
				else
				{
					func_173("ASS_HK_HELP1", -1);
				}
			}
			if (!iLocal_1992)
			{
				func_248(&(iParam0->f_16), 1, player::player_ped_id(), "FRANKLIN", 0, 1);
				func_262(2, "assassin_hooker_kill_target", 0, 0, 0, 1);
				iLocal_1992 = 1;
			}
			if (!func_104(&iLocal_2074))
			{
				func_326(&iLocal_2074);
			}
			func_175();
			break;
		
		case 3:
			func_171(iParam0);
			func_175();
			if (!iLocal_1987)
			{
				if (iLocal_1981)
				{
					ai::task_look_at_entity(iParam0->f_7, *iParam0, -1, 2048, 4);
					ai::task_look_at_entity(*iParam0, iParam0->f_7, -1, 2048, 4);
					iLocal_1987 = 1;
				}
			}
			if (vehicle::is_vehicle_driveable(iParam0->f_1, 0))
			{
				if (!ped::is_ped_injured(*iParam0))
				{
					if (ai::waypoint_recording_get_closest_waypoint(&cLocal_2056, entity::get_entity_coords(iParam0->f_1, 1), &iVar4))
					{
						if (iVar4 >= 14)
						{
							ai::clear_ped_tasks(*iParam0);
							vehicle::_set_vehicle_halt(iParam0->f_1, 10f, 1, 0);
							vehicle::start_vehicle_horn(iParam0->f_1, 750, 0, 0);
							system::settimera(0);
							if (vehicle::is_vehicle_driveable(iParam0->f_10, 0))
							{
								if (!ped::is_ped_injured(iParam0->f_9))
								{
									ai::clear_ped_tasks(iParam0->f_9);
									ai::task_vehicle_drive_wander(iParam0->f_9, iParam0->f_10, 15f, 786599);
								}
							}
							func_170(iParam1);
							iLocal_1983 = 1;
							iLocal_1460 = 4;
						}
					}
				}
			}
			break;
		
		case 4:
			if (system::timera() >= 1500)
			{
				if (vehicle::is_vehicle_driveable(iParam0->f_1, 0))
				{
					if (!ped::is_ped_injured(iParam0->f_7))
					{
						if (func_213(*iParam0, 1) > 5f)
						{
							if (func_169(*iParam0))
							{
								if (!audio::is_scripted_conversation_ongoing())
								{
									func_168(&(iParam0->f_16), "OJASAUD", "OJAShk_GETIN", 9, 0, 0, 0);
								}
							}
							ai::task_enter_vehicle(iParam0->f_7, iParam0->f_1, 20000, 0, 1f, 262144, 0);
							iLocal_1966 = 0;
							iLocal_1460 = 5;
						}
					}
				}
			}
			func_167(iParam0);
			break;
		
		case 5:
			func_166();
			if (vehicle::is_vehicle_driveable(iParam0->f_1, 0))
			{
				if (!ped::is_ped_injured(*iParam0))
				{
					if (!ped::is_ped_injured(iParam0->f_7))
					{
						if (vehicle::get_ped_in_vehicle_seat(iParam0->f_1, 0, 0) == iParam0->f_7 && !ped::is_ped_getting_into_a_vehicle(iParam0->f_7))
						{
							iLocal_1982 = 1;
							audio::trigger_music_event("ASS3_KILL");
							audio::prepare_music_event("ASS3_RADIO_PASS");
							func_165(iParam0);
							ai::task_vehicle_follow_waypoint_recording(*iParam0, iParam0->f_1, "OJAShk_104", 786603, 0, 16, -1, 15f, 0, 1073741824);
							system::settimera(0);
							iLocal_2001 = 0;
							iLocal_1460 = 6;
						}
					}
				}
			}
			break;
		
		case 6:
			func_166();
			if (!iLocal_1963)
			{
				func_165(iParam0);
			}
			else if (!ui::is_message_being_displayed())
			{
				if (!iLocal_1978)
				{
					if (!func_118())
					{
						func_168(&(iParam0->f_16), "OJASAUD", "OJAShk_SET", 8, 0, 0, 0);
						iLocal_1978 = 1;
					}
				}
				else if (!iLocal_1979)
				{
					if (!func_118())
					{
						if (func_169(*iParam0) && func_169(iParam0->f_7))
						{
							if (func_164(&iLocal_2001))
							{
								iLocal_1979 = 1;
							}
						}
					}
				}
			}
			func_161(iParam0);
			if (ai::get_script_task_status(*iParam0, -235832601) == 7)
			{
				iLocal_2001 = 0;
				iLocal_1976 = 1;
				if (!entity::is_entity_dead(iParam0->f_7, 0) && !entity::is_entity_dead(*iParam0, 0))
				{
					if (ai::get_script_task_status(iParam0->f_7, 150319005) != 1)
					{
						ai::task_look_at_entity(iParam0->f_7, *iParam0, -1, 2048, 4);
					}
				}
				if (!entity::is_entity_dead(iParam0->f_7, 0) && !entity::is_entity_dead(*iParam0, 0))
				{
					if (ai::get_script_task_status(*iParam0, 150319005) != 1)
					{
						ai::task_look_at_entity(*iParam0, iParam0->f_7, -1, 2048, 4);
					}
				}
				if (!ped::is_ped_injured(*iParam0))
				{
					if (!ped::is_ped_injured(iParam0->f_7))
					{
						if (vehicle::is_vehicle_driveable(iParam0->f_1, 0))
						{
							ai::clear_ped_tasks(*iParam0);
							vehicle::_set_vehicle_halt(iParam0->f_1, 10f, 1, 0);
							ai::task_play_anim(*iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_base_m", 4f, -4f, -1, 1, 0f, 0, 0, 0);
							ai::task_play_anim(iParam0->f_7, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_base_f", 4f, -4f, -1, 1, 0f, 0, 0, 0);
						}
					}
				}
				func_203(iParam1);
				iLocal_1460 = 7;
				system::settimera(0);
			}
			break;
		
		case 7:
			if ((func_213(*iParam0, 1) > 50f || system::timera() > 10000) || func_168(&(iParam0->f_16), "OJASAUD", "OJAShk_INCAR", 8, 0, 0, 0))
			{
				system::settimera(0);
				iLocal_2001 = 0;
				iLocal_1460 = 8;
			}
			break;
		
		case 8:
			if (!iLocal_2515)
			{
				func_156(iParam0->f_7, *iParam0, iParam0);
			}
			else if (!audio::is_scripted_conversation_ongoing())
			{
				if (!ped::is_ped_injured(*iParam0))
				{
					if (vehicle::is_vehicle_driveable(iParam0->f_1, 0))
					{
						if (!ped::is_ped_injured(iParam0->f_7))
						{
							ai::task_play_anim(*iParam0, "ODDJOBS@assassinate@vice@incar", "passenger_KO_female_m", 8f, -8f, -1, 0, 0f, 0, 0, 0);
							ai::task_play_anim(iParam0->f_7, "ODDJOBS@assassinate@vice@incar", "passenger_KO_female_f", 8f, -8f, -1, 0, 0f, 0, 0, 0);
						}
					}
					vehicle::set_vehicle_doors_locked(iParam0->f_1, 1);
					system::settimera(0);
					iLocal_1460 = 9;
				}
			}
			break;
		
		case 9:
			func_155(iParam0);
			if (system::timera() >= 1000)
			{
				if (!ped::is_ped_injured(*iParam0))
				{
					if (vehicle::is_vehicle_driveable(iParam0->f_1, 0))
					{
						ai::clear_sequence_task(&iVar0);
						ai::open_sequence_task(&iVar0);
						ai::task_leave_vehicle(0, iParam0->f_1, 0);
						ai::task_follow_nav_mesh_to_coord(0, -458.7189f, -1719.692f, 17.6259f, 1f, -1, 0.25f, 0, 150.2688f);
						ai::task_play_anim(0, "ODDJOBS@ASSASSINATE@VICE@DEALER", "base", 4f, -4f, 20000, 1, 0f, 0, 0, 0);
						ai::task_wander_standard(0, 150.2688f, 0);
						ai::close_sequence_task(iVar0);
						if (!entity::is_entity_dead(*iParam0, 0))
						{
							ai::task_perform_sequence(*iParam0, iVar0);
						}
						ai::clear_sequence_task(&iVar0);
						iLocal_1460 = 10;
					}
				}
			}
			if (iLocal_1971)
			{
				if (func_154(iParam0))
				{
					iLocal_1959 = 1;
				}
			}
			break;
		
		case 10:
			if (func_152(iParam0))
			{
				iLocal_1959 = 1;
			}
			break;
		
		case 11:
			func_166();
			if (!ped::is_ped_injured(*iParam0))
			{
				func_150(iParam0);
				if (vehicle::is_vehicle_driveable(iParam0->f_1, 0))
				{
					if (((vehicle::is_vehicle_stuck_timer_up(iParam0->f_1, 0, 3000) || vehicle::is_vehicle_stuck_timer_up(iParam0->f_1, 2, 3000)) || vehicle::is_vehicle_stuck_timer_up(iParam0->f_1, 3, 3000)) || entity::is_entity_in_water(iParam0->f_1))
					{
						if (ped::is_ped_in_vehicle(*iParam0, iParam0->f_1, 0))
						{
							if (((!entity::is_entity_on_screen(iParam0->f_1) && entity::is_entity_occluded(iParam0->f_1)) && !vehicle::is_vehicle_stuck_on_roof(iParam0->f_1)) && !entity::is_entity_in_water(iParam0->f_1))
							{
								pathfind::get_closest_vehicle_node(entity::get_entity_coords(iParam0->f_1, 1), &vVar1, 1, 1077936128, 0);
								ped::set_ped_coords_keep_vehicle(*iParam0, vVar1);
								vehicle::reset_vehicle_stuck_timer(iParam0->f_1, 0);
								vehicle::reset_vehicle_stuck_timer(iParam0->f_1, 2);
								vehicle::reset_vehicle_stuck_timer(iParam0->f_1, 3);
							}
							else
							{
								vehicle::set_vehicle_doors_locked(iParam0->f_1, 1);
								func_186(*iParam0);
								iLocal_1460 = 12;
							}
							if (!ped::is_ped_injured(iParam0->f_7))
							{
								if (ai::get_script_task_status(iParam0->f_7, 242628503) != 1)
								{
									func_202(iParam0->f_7);
								}
							}
						}
					}
				}
				else if (ai::get_script_task_status(*iParam0, 242628503) != 1 && ai::get_script_task_status(*iParam0, 242628503) != 0)
				{
					vehicle::set_vehicle_doors_locked(iParam0->f_1, 1);
					func_186(*iParam0);
					iLocal_1460 = 12;
				}
			}
			break;
		
		case 12:
			if (!ped::is_ped_injured(*iParam0))
			{
				func_150(iParam0);
				if (player::is_player_wanted_level_greater(player::player_id(), 0))
				{
					vVar5 = { entity::get_entity_coords(*iParam0, 1) };
					if (ped::is_cop_ped_in_area_3d((vVar5.x - 30f), (vVar5.y - 30f), (vVar5.y - 30f), (vVar5.x + 30f), (vVar5.y + 30f), (vVar5.y + 30f)))
					{
						if (ai::get_script_task_status(*iParam0, 1805844857) != 1)
						{
							ai::task_smart_flee_ped(*iParam0, player::player_ped_id(), 500f, -1, 0, 0);
						}
					}
					else if (func_213(*iParam0, 1) <= 10f && ped::is_ped_in_combat(player::player_ped_id(), *iParam0))
					{
						if (ai::get_script_task_status(*iParam0, 1805844857) != 1)
						{
							ai::task_smart_flee_ped(*iParam0, player::player_ped_id(), 500f, -1, 0, 0);
						}
					}
				}
				else if (ai::get_script_task_status(*iParam0, 1805844857) != 1)
				{
					ai::task_smart_flee_ped(*iParam0, player::player_ped_id(), 500f, -1, 0, 0);
				}
			}
			break;
	}
	if (func_149(*iParam0, 300f, 0) && iLocal_1983)
	{
		if (ui::does_blip_exist(iParam0->f_2))
		{
			ui::remove_blip(&(iParam0->f_2));
		}
		if (iLocal_1460 != 8 && iLocal_1460 != 9)
		{
			func_226(Local_1501, &Local_1684, 0);
		}
		else
		{
			func_226(Local_1501, &Local_1684, 4);
		}
	}
	else if (ui::does_blip_exist(iParam0->f_2))
	{
		if (iLocal_1460 > 5 && iLocal_1460 <= 11)
		{
			if (func_213(*iParam0, 1) > 75f)
			{
				if (!ui::is_blip_flashing(iParam0->f_2))
				{
					ui::set_blip_flashes(iParam0->f_2, 1);
				}
			}
			else if (ui::is_blip_flashing(iParam0->f_2))
			{
				ui::set_blip_flashes(iParam0->f_2, 0);
			}
		}
		else if (ui::is_blip_flashing(iParam0->f_2))
		{
			ui::set_blip_flashes(iParam0->f_2, 0);
		}
	}
	if (iLocal_1460 < 4)
	{
		func_147(iParam0);
	}
	func_123(iParam0);
}

void func_123(int iParam0)//Position - 0x6E78
{
	if ((iLocal_1460 >= 7 && iLocal_1460 <= 9) && ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
	{
		func_146(iParam0);
	}
	else
	{
		func_120();
		if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
		{
			if (iLocal_1460 > 3)
			{
				func_124(&uLocal_2102, *iParam0, 0, 0, 1, 1, 1);
			}
			else
			{
				func_124(&uLocal_2102, iParam0->f_7, 0, 0, 1, 1, 1);
			}
		}
		else
		{
			func_201(&uLocal_2102, 0, 0);
		}
	}
}

void func_124(var uParam0, int iParam1, char* sParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x6EEF
{
	func_125(uParam0, iParam1, sParam2, iParam3, iParam4, iParam5, iParam6);
}

void func_125(var uParam0, int iParam1, char* sParam2, int iParam3, int iParam4, var uParam5, int iParam6)//Position - 0x6F09
{
	func_126(uParam0, iParam1, 0f, 0f, 0f, sParam2, iParam3, iParam4, uParam5, iParam6);
}

void func_126(var uParam0, int iParam1, vector3 vParam2, char* sParam5, int iParam6, int iParam7, var uParam8, int iParam9)//Position - 0x6F26
{
	if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 1))
	{
		func_201(uParam0, 0, 0);
	}
	uParam0->f_6 = 2;
	func_127(uParam0, iParam1, vParam2, sParam5, iParam6, iParam7, uParam8, iParam9);
}

void func_127(var uParam0, int iParam1, vector3 vParam2, char* sParam5, int iParam6, int iParam7, var uParam8, int iParam9)//Position - 0x6F5E
{
	int iVar0;
	int iVar1;
	
	if (uParam0->f_1 && cam::is_gameplay_hint_active())
	{
		if (gameplay::get_game_timer() >= (uParam0->f_8 + uParam0->f_9))
		{
			uParam0->f_1 = 0;
		}
	}
	iVar0 = sParam5;
	if (gameplay::is_string_null(iVar0))
	{
		if (!network::network_is_game_in_progress())
		{
			iVar0 = "CMN_HINT";
		}
		else
		{
			iVar0 = "FM_IHELP_HNT";
		}
	}
	if (func_145(iVar0))
	{
		func_144();
	}
	if (func_143(iParam1) && entity::is_entity_visible(iParam1))
	{
		iVar1 = 0;
		if (entity::is_entity_a_ped(iParam1))
		{
			ped::_0x7D7A2E43E74E2EB8(entity::get_ped_index_from_entity_index(iParam1));
			ped::get_ped_flood_invincibility(entity::get_ped_index_from_entity_index(iParam1), 1);
			if (ped::is_tracked_ped_visible(entity::get_ped_index_from_entity_index(iParam1)))
			{
				iVar1 = 1;
			}
		}
		else if (entity::is_entity_a_vehicle(iParam1))
		{
			vehicle::track_vehicle_visibility(entity::get_vehicle_index_from_entity_index(iParam1));
			if (vehicle::is_vehicle_visible(entity::get_vehicle_index_from_entity_index(iParam1)))
			{
				iVar1 = 1;
			}
		}
		else if (entity::is_entity_an_object(iParam1))
		{
			object::track_object_visibility(entity::get_object_index_from_entity_index(iParam1));
			if (object::is_object_visible(entity::get_object_index_from_entity_index(iParam1)))
			{
				iVar1 = 1;
			}
		}
		if (!cam::is_gameplay_hint_active())
		{
			if (func_138(uParam0, iParam7, iParam9, 0))
			{
				func_134(uParam0, iParam1, vParam2, iParam6);
			}
			if (*uParam0)
			{
				*uParam0 = 0;
			}
			else if (uParam0->f_6 == 2)
			{
				if (func_131(iVar0))
				{
					if ((gameplay::is_string_null(uParam0->f_3) && !gameplay::is_string_null(iVar0)) && ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
					{
						if ((iVar1 && !ui::is_help_message_being_displayed()) && uParam8)
						{
							if (!func_145(iVar0))
							{
								func_173(iVar0, -1);
								uParam0->f_3 = iVar0;
								if (gameplay::are_strings_equal("CMN_HINT", iVar0))
								{
									func_130(1);
								}
							}
						}
					}
				}
			}
			else if (func_131(iVar0))
			{
				if (gameplay::is_string_null(uParam0->f_3) && !gameplay::is_string_null(iVar0))
				{
					if (((entity::is_entity_on_screen(iParam1) && iVar1) && !ui::is_help_message_being_displayed()) && uParam8)
					{
						if (!func_145(iVar0))
						{
							func_173(iVar0, -1);
							uParam0->f_3 = iVar0;
							if (gameplay::are_strings_equal("CMN_HINT", iVar0))
							{
								func_130(1);
							}
						}
					}
				}
			}
		}
		else
		{
			if (!gameplay::is_string_null(sParam5))
			{
				if (func_145(sParam5))
				{
					ui::clear_help(1);
				}
			}
			if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 1))
			{
				if (ped::is_ped_in_any_boat(player::player_ped_id()))
				{
					if (cam::_0xEE778F8C7E1142E2(3) == 3 || cam::_0xEE778F8C7E1142E2(3) == 4)
					{
						func_201(uParam0, iVar0, 1);
					}
				}
				else if (ped::is_ped_in_any_heli(player::player_ped_id()))
				{
					if (cam::_0xEE778F8C7E1142E2(6) == 3 || cam::_0xEE778F8C7E1142E2(6) == 4)
					{
						func_201(uParam0, iVar0, 1);
					}
				}
				else if (ped::is_ped_in_any_plane(player::player_ped_id()))
				{
					if (cam::_0xEE778F8C7E1142E2(4) == 3 || cam::_0xEE778F8C7E1142E2(4) == 4)
					{
						func_201(uParam0, iVar0, 1);
					}
				}
				else if (ped::is_ped_in_any_sub(player::player_ped_id()))
				{
					if (cam::_0xEE778F8C7E1142E2(5) == 3 || cam::_0xEE778F8C7E1142E2(5) == 4)
					{
						func_201(uParam0, iVar0, 1);
					}
				}
				else if (ped::is_ped_on_any_bike(player::player_ped_id()))
				{
					if (cam::_0xEE778F8C7E1142E2(2) == 3 || cam::_0xEE778F8C7E1142E2(2) == 4)
					{
						func_201(uParam0, iVar0, 1);
					}
				}
				else if (cam::get_follow_vehicle_cam_view_mode() == 3 || cam::get_follow_vehicle_cam_view_mode() == 4)
				{
					func_201(uParam0, iVar0, 1);
				}
			}
			if (!func_138(uParam0, iParam7, iParam9, 0))
			{
				if ((!*uParam0 && !uParam0->f_1) && !func_129(uParam0))
				{
					func_128(uParam0);
				}
			}
		}
	}
	else
	{
		func_201(uParam0, iVar0, 0);
	}
}

void func_128(var uParam0)//Position - 0x72CB
{
	if (func_143(player::player_ped_id()))
	{
		ai::task_clear_look_at(player::player_ped_id());
	}
	if (cam::is_gameplay_hint_active())
	{
		cam::set_cinematic_button_active(true);
		cam::stop_gameplay_hint(0);
		audio::stop_audio_scene("HINT_CAM_SCENE");
		graphics::_stop_screen_effect("FocusIn");
		if (uParam0->f_11)
		{
			graphics::_start_screen_effect("FocusOut", 0, 0);
			audio::play_sound_frontend(-1, "FocusOut", "HintCamSounds", 1);
			uParam0->f_11 = 0;
		}
	}
	uParam0->f_2 = -1;
	*uParam0 = 1;
}

bool func_129(var uParam0)//Position - 0x7334
{
	int iVar0;
	
	if (uParam0->f_2 > 0)
	{
		iVar0 = (uParam0->f_10 / 2);
		if (uParam0->f_2 + iVar0) > gameplay::get_game_timer()
		{
			return true;
		}
	}
	return false;
}

int func_130(int iParam0)//Position - 0x735F
{
	switch (Global_35775)
	{
		case 0:
		case 3:
			if (iParam0)
			{
				Global_101553.f_8904.f_100++;
			}
			return Global_101553.f_8904.f_100;
			break;
		
		case 4:
			if (iParam0)
			{
				Global_101553.f_8904.f_101++;
			}
			return Global_101553.f_8904.f_101;
			break;
		
		case 5:
		case 15:
			if (iParam0)
			{
				Global_101553.f_8904.f_102++;
			}
			return Global_101553.f_8904.f_102;
			break;
		
		default:
			break;
	}
	return 3;
}

bool func_131(char* sParam0)//Position - 0x7409
{
	if (!func_132(1, 1, 0))
	{
		if ((!gameplay::is_string_null_or_empty(sParam0) && func_145(sParam0)) || func_145("CMN_HINT"))
		{
			ui::clear_help(1);
		}
		return false;
	}
	switch (Global_35775)
	{
		case 0:
		case 3:
			if (func_130(0) < 3)
			{
				return true;
			}
			break;
		
		case 4:
			if (func_130(0) < 1)
			{
				return true;
			}
			break;
		
		case 5:
		case 15:
			if (func_130(0) < 1)
			{
				return true;
			}
			break;
		
		default:
			break;
	}
	return false;
}

bool func_132(int iParam0, int iParam1, int iParam2)//Position - 0x74A2
{
	if (iParam0)
	{
		if (!player::is_player_control_on(player::player_id()))
		{
			return false;
		}
	}
	if (iParam2)
	{
		return true;
	}
	if (streaming::is_player_switch_in_progress())
	{
		return false;
	}
	if (func_84(0))
	{
		return false;
	}
	if (func_133())
	{
		return false;
	}
	if (network::_network_is_text_chat_active())
	{
		return false;
	}
	if (Global_68125)
	{
		return false;
	}
	if (script::_get_number_of_instances_of_streamed_script(joaat("appinternet")) > 0)
	{
		return false;
	}
	if (Global_52997)
	{
		return false;
	}
	if (iParam1)
	{
		if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 1))
		{
			if (ped::is_ped_in_any_boat(player::player_ped_id()))
			{
				if (cam::_0xEE778F8C7E1142E2(3) == 3 || cam::_0xEE778F8C7E1142E2(3) == 4)
				{
					return false;
				}
			}
			else if (ped::is_ped_in_any_heli(player::player_ped_id()))
			{
				if (cam::_0xEE778F8C7E1142E2(6) == 3 || cam::_0xEE778F8C7E1142E2(6) == 4)
				{
					return false;
				}
			}
			else if (ped::is_ped_in_any_plane(player::player_ped_id()))
			{
				if (cam::_0xEE778F8C7E1142E2(4) == 3 || cam::_0xEE778F8C7E1142E2(4) == 4)
				{
					return false;
				}
			}
			else if (ped::is_ped_in_any_sub(player::player_ped_id()))
			{
				if (cam::_0xEE778F8C7E1142E2(5) == 3 || cam::_0xEE778F8C7E1142E2(5) == 4)
				{
					return false;
				}
			}
			else if (ped::is_ped_on_any_bike(player::player_ped_id()))
			{
				if (cam::_0xEE778F8C7E1142E2(2) == 3 || cam::_0xEE778F8C7E1142E2(2) == 4)
				{
					return false;
				}
			}
			else if (cam::get_follow_vehicle_cam_view_mode() == 3 || cam::get_follow_vehicle_cam_view_mode() == 4)
			{
				return false;
			}
			if (cam::is_gameplay_cam_looking_behind())
			{
				return false;
			}
		}
	}
	return true;
}

int func_133()//Position - 0x761E
{
	return gameplay::get_game_timer() <= Global_17290.f_5745 + 100;
}

void func_134(var uParam0, int iParam1, vector3 vParam2, int iParam5)//Position - 0x7633
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	
	if (entity::is_entity_dead(iParam1, 0))
	{
		func_201(uParam0, 0, 0);
	}
	if (func_137(vParam2, 0f, 0f, 0f, 0))
	{
		if (entity::is_entity_a_ped(iParam1))
		{
			iVar0 = entity::get_ped_index_from_entity_index(iParam1);
			if (!ped::is_ped_in_any_vehicle(iVar0, 0))
			{
				if (ped::is_ped_a_player(iVar0))
				{
					if (!func_135())
					{
						vParam2 = { 0f, 0f, 1f };
					}
				}
				else if (ped::is_ped_male(iVar0))
				{
					vParam2 = { 0f, 0f, 1f };
				}
			}
		}
	}
	cam::set_cinematic_button_active(false);
	iVar1 = uParam0->f_9;
	iVar2 = uParam0->f_10;
	if (iParam5 == 1726668277)
	{
		if (iVar1 < 1500)
		{
			iVar1 = 1500;
		}
		if (iVar2 < 1500)
		{
			iVar2 = 1500;
		}
	}
	cam::set_gameplay_entity_hint(iParam1, vParam2, 1, -1, iVar1, iVar2, iParam5);
	iVar3 = 2048;
	iVar4 = 3;
	ai::task_look_at_entity(player::player_ped_id(), iParam1, -1, iVar3, iVar4);
	graphics::_start_screen_effect("FocusIn", 0, 0);
	audio::start_audio_scene("HINT_CAM_SCENE");
	audio::play_sound_frontend(-1, "FocusIn", "HintCamSounds", 1);
	uParam0->f_11 = 1;
	uParam0->f_8 = gameplay::get_game_timer();
	uParam0->f_1 = 1;
	*uParam0 = 0;
}

int func_135()//Position - 0x7738
{
	return func_136(player::player_id());
}

bool func_136(int iParam0)//Position - 0x7748
{
	if (entity::get_entity_model(player::get_player_ped(iParam0)) == joaat("mp_f_freemode_01"))
	{
		return true;
	}
	return false;
}

int func_137(vector3 vParam0, vector3 vParam3, int iParam6)//Position - 0x7767
{
	if (iParam6)
	{
		return (vParam0.x == vParam3.x && vParam0.y == vParam3.y);
	}
	return ((vParam0.x == vParam3.x && vParam0.y == vParam3.y) && vParam0.y == vParam3.y);
}

bool func_138(var uParam0, int iParam1, int iParam2, int iParam3)//Position - 0x77AE
{
	if (uParam0->f_1)
	{
		if (gameplay::get_game_timer() >= (uParam0->f_8 + uParam0->f_9))
		{
			uParam0->f_1 = 0;
		}
	}
	switch (uParam0->f_5)
	{
		case 0:
			uParam0->f_7 = 0;
			if (uParam0->f_6 == 0)
			{
				if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 1))
				{
					if (func_142(iParam1, iParam2, iParam3))
					{
						uParam0->f_4 = gameplay::get_game_timer();
						uParam0->f_5 = 1;
						uParam0->f_7 = 1;
					}
				}
				else if (func_141(iParam1, iParam2, iParam3))
				{
					uParam0->f_4 = gameplay::get_game_timer();
					uParam0->f_5 = 1;
					uParam0->f_7 = 1;
				}
			}
			else if (uParam0->f_6 == 1)
			{
				if (func_141(iParam1, iParam2, iParam3))
				{
					uParam0->f_4 = gameplay::get_game_timer();
					uParam0->f_5 = 1;
					uParam0->f_7 = 1;
				}
			}
			else if (uParam0->f_6 == 2)
			{
				if (func_142(iParam1, iParam2, iParam3))
				{
					uParam0->f_4 = gameplay::get_game_timer();
					uParam0->f_5 = 1;
					uParam0->f_7 = 1;
				}
			}
			if (func_129(uParam0))
			{
				uParam0->f_7 = 1;
				uParam0->f_5 = 4;
			}
			break;
		
		case 1:
			if ((gameplay::get_game_timer() - uParam0->f_4) <= 500)
			{
				if (uParam0->f_6 == 0)
				{
					if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 1))
					{
						if (!func_142(iParam1, iParam2, iParam3))
						{
							uParam0->f_4 = gameplay::get_game_timer();
							uParam0->f_5 = 3;
						}
					}
					else if (!func_141(iParam1, iParam2, iParam3))
					{
						uParam0->f_4 = gameplay::get_game_timer();
						uParam0->f_5 = 3;
					}
				}
				else if (uParam0->f_6 == 1)
				{
					if (!func_141(iParam1, iParam2, iParam3))
					{
						uParam0->f_4 = gameplay::get_game_timer();
						uParam0->f_5 = 3;
					}
				}
				else if (uParam0->f_6 == 2)
				{
					if (!func_142(iParam1, iParam2, iParam3))
					{
						uParam0->f_4 = gameplay::get_game_timer();
						uParam0->f_5 = 3;
					}
				}
			}
			else
			{
				uParam0->f_5 = 2;
			}
			break;
		
		case 2:
			if (uParam0->f_6 == 0)
			{
				if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 1))
				{
					if (!func_142(iParam1, iParam2, iParam3))
					{
						uParam0->f_5 = 0;
					}
				}
				else if (!func_141(iParam1, iParam2, iParam3))
				{
					uParam0->f_5 = 0;
				}
			}
			else if (uParam0->f_6 == 1)
			{
				if (!func_141(iParam1, iParam2, iParam3) || ped::is_ped_in_any_vehicle(player::player_ped_id(), 1))
				{
					uParam0->f_5 = 0;
				}
			}
			else if (uParam0->f_6 == 2)
			{
				if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 1) || ai::get_is_task_active(player::player_ped_id(), 2))
				{
					uParam0->f_5 = 0;
				}
				else if (!func_142(iParam1, iParam2, iParam3))
				{
					uParam0->f_5 = 0;
				}
			}
			break;
		
		case 3:
			if ((gameplay::get_game_timer() - uParam0->f_4) > 500)
			{
				if (uParam0->f_6 == 0)
				{
					if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 1))
					{
						if (func_140(iParam1, iParam2, iParam3))
						{
							uParam0->f_5 = 0;
						}
					}
					else if (func_139(iParam1, iParam2, iParam3))
					{
						uParam0->f_5 = 0;
					}
				}
				else if (uParam0->f_6 == 1)
				{
					if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 1) || func_139(iParam1, iParam2, iParam3))
					{
						uParam0->f_5 = 0;
					}
				}
				else if (uParam0->f_6 == 2)
				{
					if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 1) || ai::get_is_task_active(player::player_ped_id(), 2))
					{
						uParam0->f_5 = 0;
					}
					else if (func_140(iParam1, iParam2, iParam3))
					{
						uParam0->f_5 = 0;
					}
				}
			}
			break;
		
		case 4:
			if (!func_129(uParam0))
			{
				uParam0->f_5 = 0;
			}
			break;
	}
	if (!func_132(iParam1, iParam2, iParam3))
	{
		uParam0->f_5 = 0;
		uParam0->f_7 = 0;
	}
	if (uParam0->f_7)
	{
		func_144();
		return true;
	}
	else
	{
		return false;
	}
	return false;
}

bool func_139(int iParam0, int iParam1, int iParam2)//Position - 0x7B1A
{
	if (!func_132(iParam0, iParam1, iParam2))
	{
		return false;
	}
	if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
	{
		if (!player::is_player_targetting_anything(player::player_id()))
		{
			controls::disable_control_action(0, 140, 1);
			controls::disable_control_action(0, 80, 1);
			if (controls::is_disabled_control_just_released(0, 80))
			{
				return true;
			}
		}
	}
	return false;
}

bool func_140(int iParam0, int iParam1, int iParam2)//Position - 0x7B6C
{
	if (!func_132(iParam0, iParam1, iParam2))
	{
		return false;
	}
	if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
	{
		controls::disable_control_action(0, 80, 1);
		if (cam::is_follow_vehicle_cam_active())
		{
			if (controls::is_disabled_control_just_released(0, 80))
			{
				cam::set_cinematic_button_active(false);
				return true;
			}
		}
	}
	return false;
}

bool func_141(int iParam0, int iParam1, int iParam2)//Position - 0x7BB5
{
	if (!func_132(iParam0, iParam1, iParam2))
	{
		return false;
	}
	if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
	{
		if (!player::is_player_targetting_anything(player::player_id()))
		{
			controls::disable_control_action(0, 140, 1);
			controls::disable_control_action(0, 80, 1);
			if (controls::is_disabled_control_pressed(0, 80) && gameplay::get_game_timer() > Global_116)
			{
				return true;
			}
		}
	}
	return false;
}

bool func_142(int iParam0, int iParam1, int iParam2)//Position - 0x7C14
{
	if (!func_132(iParam0, iParam1, iParam2))
	{
		return false;
	}
	if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
	{
		controls::disable_control_action(0, 80, 1);
		if (cam::is_follow_vehicle_cam_active())
		{
			if (controls::is_disabled_control_pressed(0, 80) && gameplay::get_game_timer() > Global_116)
			{
				cam::set_cinematic_button_active(false);
				return true;
			}
		}
	}
	return false;
}

bool func_143(int iParam0)//Position - 0x7C6A
{
	if (entity::does_entity_exist(iParam0))
	{
		if (entity::is_entity_a_vehicle(iParam0))
		{
			if (vehicle::is_vehicle_driveable(entity::get_vehicle_index_from_entity_index(iParam0), 0))
			{
				return true;
			}
		}
		else if (entity::is_entity_a_ped(iParam0))
		{
			if (!ped::is_ped_injured(entity::get_ped_index_from_entity_index(iParam0)))
			{
				return true;
			}
		}
		else if (entity::is_entity_an_object(iParam0))
		{
			return true;
		}
	}
	return false;
}

void func_144()//Position - 0x7CC5
{
	gameplay::set_bit(&Global_2314, 4);
}

int func_145(char* sParam0)//Position - 0x7CD5
{
	ui::_0x0A24DA3A41B718F5(sParam0);
	return ui::_0x10BDDBFC529428DD(0);
}

void func_146(var uParam0)//Position - 0x7CE8
{
	if (!ped::is_ped_injured(*uParam0))
	{
		if (func_213(*uParam0, 1) < 35f && ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
		{
			if (func_138(&uLocal_2102, 1, 1, 0))
			{
				if (!iLocal_1991 && cam::is_gameplay_hint_active())
				{
					func_201(&uLocal_2102, 0, 0);
					iLocal_1991 = 1;
				}
				else
				{
					if (!cam::does_cam_exist(iLocal_142))
					{
						iLocal_142 = cam::create_camera_with_params(26379945, -470.1433f, -1720.113f, 18.597f, -1.0803f, 0f, -80.8725f, 35f, 0, 2);
					}
					if (!cam::is_cam_active(iLocal_142))
					{
						cam::set_cam_active(iLocal_142, true);
						cam::render_script_cams(true, false, 3000, 1, 0, 0);
						ui::display_hud(false);
						ui::display_radar(false);
					}
				}
			}
			else
			{
				func_120();
			}
		}
		else
		{
			func_120();
		}
	}
}

void func_147(int iParam0)//Position - 0x7DB2
{
	int iVar0;
	
	switch (iLocal_2001)
	{
		case 0:
			if (func_213(iParam0->f_7, 1) < 7f)
			{
				system::settimerb(0);
				iLocal_2001++;
			}
			break;
		
		case 1:
			if (system::timerb() >= 1500)
			{
				if (func_148(iParam0))
				{
					if (!audio::is_scripted_conversation_ongoing())
					{
						ai::clear_ped_tasks(iParam0->f_7);
						ai::clear_sequence_task(&iVar0);
						ai::open_sequence_task(&iVar0);
						if (!ped::is_ped_facing_ped(iParam0->f_7, player::player_ped_id(), 120f))
						{
							ai::task_turn_ped_to_face_entity(0, player::player_ped_id(), 0);
						}
						ai::task_play_anim(0, sLocal_2000, "idle_outro", 4f, -4f, -1, 0, 0f, 0, 0, 0);
						ai::task_play_anim(0, sLocal_2000, "idle_reject", 4f, -4f, -1, 0, 0f, 0, 0, 0);
						ai::task_play_anim(0, sLocal_2000, "reject_outro", 4f, -4f, -1, 0, 0f, 0, 0, 0);
						ai::task_achieve_heading(0, Local_1684.f_21, 0);
						ai::task_play_anim(0, sLocal_2000, "idle_wait", 4f, -4f, -1, 1, 0f, 0, 0, 0);
						ai::close_sequence_task(iVar0);
						ai::task_perform_sequence(iParam0->f_7, iVar0);
						ai::clear_sequence_task(&iVar0);
						ai::task_look_at_entity(iParam0->f_7, player::player_ped_id(), 5000, 0, 2);
						func_168(&(iParam0->f_16), "OJASAUD", "OJAShk_TALK", 9, 0, 0, 0);
						system::settimerb(0);
						iLocal_2001++;
					}
				}
			}
			break;
		
		case 2:
			if (!ped::is_ped_injured(iParam0->f_7))
			{
				if (system::timerb() >= 7500)
				{
					iLocal_2001++;
				}
			}
			break;
		
		case 3:
			if (system::timerb() >= 9000)
			{
				if (func_148(iParam0))
				{
					if (!audio::is_scripted_conversation_ongoing())
					{
						ai::clear_ped_tasks(iParam0->f_7);
						ai::clear_sequence_task(&iVar0);
						ai::open_sequence_task(&iVar0);
						if (!ped::is_ped_facing_ped(iParam0->f_7, player::player_ped_id(), 120f))
						{
							ai::task_turn_ped_to_face_entity(0, player::player_ped_id(), 0);
						}
						ai::task_play_anim(0, sLocal_2000, "idle_outro", 4f, -4f, -1, 0, 0f, 0, 0, 0);
						ai::task_play_anim(0, sLocal_2000, "idle_reject", 4f, -4f, -1, 0, 0f, 0, 0, 0);
						ai::task_play_anim(0, sLocal_2000, "reject_outro", 4f, -4f, -1, 0, 0f, 0, 0, 0);
						ai::task_achieve_heading(0, Local_1684.f_21, 0);
						ai::task_play_anim(0, sLocal_2000, "idle_wait", 4f, -4f, -1, 1, 0f, 0, 0, 0);
						ai::close_sequence_task(iVar0);
						ai::task_perform_sequence(iParam0->f_7, iVar0);
						ai::clear_sequence_task(&iVar0);
						system::settimerb(0);
						iLocal_2001++;
					}
				}
			}
			break;
		
		case 4:
			if (!ped::is_ped_injured(iParam0->f_7))
			{
				if (entity::is_entity_playing_anim(iParam0->f_7, sLocal_2000, "idle_reject", 3) || system::timerb() >= 7500)
				{
					func_168(&(iParam0->f_16), "OJASAUD", "OJAShk_TALK2", 9, 0, 0, 0);
					iLocal_2001++;
				}
			}
			break;
		
		case 5:
			if (system::timerb() >= 7500)
			{
				if (func_148(iParam0))
				{
					func_168(&(iParam0->f_16), "OJASAUD", "OJAShk_TALK3", 9, 0, 0, 0);
					system::settimerb(0);
					iLocal_2001++;
				}
			}
			break;
		
		case 6:
			if (system::timerb() >= 4000)
			{
				if (iLocal_1460 < 4)
				{
					func_226(Local_1501, &Local_1684, 2);
				}
				else
				{
					iLocal_1964 = 1;
				}
			}
			break;
	}
}

bool func_148(var uParam0)//Position - 0x80C2
{
	if (!ped::is_ped_injured(uParam0->f_7))
	{
		if ((func_213(uParam0->f_7, 1) < 10f && ped::is_ped_facing_ped(uParam0->f_7, player::player_ped_id(), 120f)) || func_213(uParam0->f_7, 1) < 6f)
		{
			return true;
		}
	}
	return false;
}

bool func_149(int iParam0, float fParam1, float fParam2)//Position - 0x8114
{
	int iVar0;
	float fVar1;
	
	if (entity::does_entity_exist(iParam0))
	{
		if (!ped::is_ped_injured(iParam0))
		{
			if (ped::is_ped_in_any_vehicle(iParam0, 0))
			{
				iVar0 = ped::get_vehicle_ped_is_in(iParam0, 0);
				fVar1 = func_213(iParam0, 1);
				if (fVar1 > fParam1)
				{
					if (!entity::is_entity_on_screen(iVar0) || entity::is_entity_occluded(iVar0))
					{
						return true;
					}
					else if (fParam2 != 0f)
					{
						if (fVar1 > fParam2)
						{
							if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
							{
								return true;
							}
						}
					}
				}
			}
			else if (func_213(iParam0, 1) > fParam1)
			{
				if (!entity::is_entity_on_screen(iParam0) || entity::is_entity_occluded(iParam0))
				{
					return true;
				}
			}
		}
	}
	return false;
}

void func_150(int iParam0)//Position - 0x81BB
{
	if (!iLocal_1972)
	{
		if (!func_118())
		{
			if (!gameplay::is_string_null_or_empty(sLocal_1999))
			{
				if ((gameplay::are_strings_equal(sLocal_1999, "OJAShk_HELP") && ped::is_ped_injured(iParam0->f_7)) || iLocal_1959)
				{
					func_151(&(iParam0->f_16), "OJASAUD", sLocal_1999, "OJAShk_HELP_3", 9, 0, 0);
				}
				else
				{
					func_168(&(iParam0->f_16), "OJASAUD", sLocal_1999, 9, 0, 0, 0);
				}
			}
			iLocal_1972 = 1;
		}
	}
}

int func_151(var uParam0, char* sParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6)//Position - 0x8235
{
	func_117(uParam0, 145, sParam1, iParam5, iParam6, 0);
	if (iParam4 > 7)
	{
		if (iParam4 < 12)
		{
			iParam4 = 7;
		}
	}
	Global_15752 = 0;
	Global_15759 = 0;
	Global_15754 = 0;
	Global_16736 = 1;
	Global_16738 = 0;
	Global_16742 = 0;
	StringCopy(&Global_16749, sParam3, 24);
	Global_2621441 = 0;
	return func_109(sParam2, iParam4, 0);
}

bool func_152(int iParam0)//Position - 0x8289
{
	if (!ped::is_ped_injured(*iParam0))
	{
		if (func_153(*iParam0, player::player_ped_id(), 0) < 7f)
		{
			if (ped::is_ped_facing_ped(*iParam0, player::player_ped_id(), 160f))
			{
				return true;
			}
		}
	}
	return false;
}

float func_153(int iParam0, int iParam1, int iParam2)//Position - 0x82C5
{
	vector3 vVar0;
	vector3 vVar3;
	
	if (!entity::is_entity_dead(iParam0, 0))
	{
		vVar0 = { entity::get_entity_coords(iParam0, 1) };
	}
	else
	{
		vVar0 = { entity::get_entity_coords(iParam0, 0) };
	}
	if (!entity::is_entity_dead(iParam1, 0))
	{
		vVar3 = { entity::get_entity_coords(iParam1, 1) };
	}
	else
	{
		vVar3 = { entity::get_entity_coords(iParam1, 0) };
	}
	return gameplay::get_distance_between_coords(vVar0, vVar3, iParam2);
}

bool func_154(int iParam0)//Position - 0x8323
{
	if (!ped::is_ped_injured(*iParam0))
	{
		if (entity::is_entity_in_angled_area(player::player_ped_id(), -460.899f, -1728.565f, 17.26273f, -472.2101f, -1717.901f, 23.65726f, 12f, 0, true, 0) || ((ped::is_ped_in_any_vehicle(player::player_ped_id(), 0) && player::is_player_pressing_horn(player::player_id())) && func_153(player::player_ped_id(), *iParam0, 1) < 15f))
		{
			return true;
		}
	}
	return false;
}

void func_155(int iParam0)//Position - 0x839F
{
	float fVar0;
	
	if (!ped::is_ped_injured(*iParam0))
	{
		if (entity::is_entity_playing_anim(*iParam0, "ODDJOBS@assassinate@vice@incar", "passenger_KO_female_m", 3))
		{
			fVar0 = entity::get_entity_anim_current_time(*iParam0, "ODDJOBS@assassinate@vice@incar", "passenger_KO_female_m");
		}
	}
	if (!iLocal_1971)
	{
		if (fVar0 >= 0.196f)
		{
			if (!ped::is_ped_injured(iParam0->f_7))
			{
				ped::set_ped_config_flag(iParam0->f_7, 115, true);
				entity::set_entity_health(iParam0->f_7, 0);
				iLocal_1971 = true;
			}
		}
	}
}

void func_156(int iParam0, int iParam1, int iParam2)//Position - 0x840C
{
	if (!entity::is_entity_dead(iParam0, 0) && !entity::is_entity_dead(iParam1, 0))
	{
		if (ai::get_script_task_status(iParam0, 150319005) != 1)
		{
			ai::task_look_at_entity(iParam0, iParam1, -1, 2048, 4);
		}
	}
	if (!entity::is_entity_dead(iParam0, 0) && !entity::is_entity_dead(iParam1, 0))
	{
		if (ai::get_script_task_status(iParam1, 150319005) != 1)
		{
			ai::task_look_at_entity(iParam1, iParam0, -1, 2048, 4);
		}
	}
	switch (iLocal_2517)
	{
		case 0:
			if (!func_118() || system::timera() > 20000)
			{
				if (vehicle::is_vehicle_driveable(iParam2->f_1, 0))
				{
					audio::set_vehicle_radio_loud(iParam2->f_1, 1);
				}
				ai::task_play_anim(iParam1, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_intro_m", 4f, -4f, -1, 0, 0f, 0, 0, 0);
				ai::task_play_anim(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_intro_f", 4f, -4f, -1, 0, 0f, 0, 0, 0);
				iLocal_2517++;
			}
			else if (!iLocal_1959)
			{
				if (func_154(iParam2))
				{
					iLocal_1959 = 1;
				}
			}
			break;
		
		case 1:
			if (func_160(iParam0, iParam1))
			{
				if (entity::is_entity_playing_anim(iParam1, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_intro_m", 3))
				{
					if (entity::get_entity_anim_current_time(iParam1, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_intro_m") > 0.9f)
					{
						ai::task_play_anim(iParam1, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_m", 4f, -1000f, -1, 1, 0f, 0, 0, 0);
						ai::task_play_anim(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_f", 4f, -1000f, -1, 1, 0f, 0, 0, 0);
						system::settimerb(0);
						iLocal_2517++;
					}
				}
			}
			break;
		
		case 2:
			if (func_160(iParam0, iParam1))
			{
				func_158(iParam0, iParam1);
				if (!iLocal_2514)
				{
					func_157(iParam2);
				}
				else if (entity::is_entity_playing_anim(iParam1, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_m", 3))
				{
					if (entity::get_entity_anim_current_time(iParam1, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_m") > 0.9f)
					{
						ai::task_play_anim(iParam1, "ODDJOBS@ASSASSINATE@VICE@SEX", "FrontSeat_CarSex_Normal_Outro_m", 1000f, -4f, -1, 0, 0f, 0, 0, 0);
						ai::task_play_anim(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "FrontSeat_CarSex_Normal_Outro_f", 1000f, -4f, -1, 0, 0f, 0, 0, 0);
						iLocal_2517++;
					}
				}
			}
			break;
		
		case 3:
			if (func_160(iParam0, iParam1))
			{
				if (entity::is_entity_playing_anim(iParam1, "ODDJOBS@ASSASSINATE@VICE@SEX", "FrontSeat_CarSex_Normal_Outro_m", 3) && entity::get_entity_anim_current_time(iParam1, "ODDJOBS@ASSASSINATE@VICE@SEX", "FrontSeat_CarSex_Normal_Outro_m") > 0.2f)
				{
					entity::apply_force_to_entity(ped::get_vehicle_ped_is_in(iParam1, 0), 1, 0f, 0f, 0.5f, -0.4f, 0f, 0f, 0, 1, 1, 1, 0, 1);
					iLocal_2517++;
				}
				else if (entity::has_entity_anim_finished(iParam1, "ODDJOBS@ASSASSINATE@VICE@SEX", "FrontSeat_CarSex_Normal_Outro_m", 3))
				{
					iLocal_2517++;
				}
			}
			break;
		
		case 4:
			if (!entity::is_entity_playing_anim(iParam1, "ODDJOBS@ASSASSINATE@VICE@SEX", "FrontSeat_CarSex_Normal_Outro_m", 3))
			{
				if (!func_118())
				{
					if (func_169(*iParam2))
					{
						func_151(&(iParam2->f_16), "OJASAUD", "OJAShk_LEAVE", "OJAShk_LEAVE_1", 8, 0, 0);
					}
					if (!ped::is_ped_injured(*iParam2))
					{
						if (!ped::is_ped_injured(iParam2->f_7))
						{
							ai::task_play_anim(*iParam2, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_base_m", 4f, -4f, -1, 1, 0f, 0, 0, 0);
							ai::task_play_anim(iParam2->f_7, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_base_f", 4f, -4f, -1, 1, 0f, 0, 0, 0);
						}
					}
					system::settimerb(0);
					iLocal_2517++;
				}
			}
			break;
		
		case 5:
			if (system::timerb() > 5000)
			{
				iLocal_2515 = 1;
			}
			break;
	}
}

void func_157(var uParam0)//Position - 0x875F
{
	switch (iLocal_2001)
	{
		case 0:
			if (system::timerb() >= 6000)
			{
				if (!audio::is_scripted_conversation_ongoing())
				{
					if (func_169(*uParam0))
					{
						func_168(&(uParam0->f_16), "OJASAUD", "OJAShk_SEX", 8, 0, 0, 0);
					}
					iLocal_2001++;
				}
			}
			break;
		
		case 1:
			if (system::timerb() >= 14000)
			{
				if (!audio::is_scripted_conversation_ongoing())
				{
					if (func_169(*uParam0))
					{
						func_168(&(uParam0->f_16), "OJASAUD", "OJAShk_SEX2", 8, 0, 0, 0);
					}
					iLocal_2001++;
				}
			}
			break;
		
		case 2:
			if (system::timerb() >= 21000)
			{
				if (!audio::is_scripted_conversation_ongoing())
				{
					if (func_169(*uParam0))
					{
						func_168(&(uParam0->f_16), "OJASAUD", "OJAShk_SEX3", 8, 0, 0, 0);
					}
					iLocal_2001++;
				}
			}
			break;
		
		case 3:
			if (system::timerb() >= 25000)
			{
				if (!audio::is_scripted_conversation_ongoing())
				{
					if (func_169(*uParam0))
					{
						func_168(&(uParam0->f_16), "OJASAUD", "OJAShk_SEX4", 8, 0, 0, 0);
					}
					iLocal_2001++;
				}
			}
			break;
		
		case 4:
			if (system::timerb() >= 32000)
			{
				if (!audio::is_scripted_conversation_ongoing())
				{
					if (func_169(*uParam0))
					{
						func_168(&(uParam0->f_16), "OJASAUD", "OJAShk_SEX5", 8, 0, 0, 0);
					}
					iLocal_2001++;
				}
			}
			break;
		
		case 5:
			if (system::timerb() >= 37000)
			{
				if (!audio::is_scripted_conversation_ongoing())
				{
					if (func_169(*uParam0))
					{
						func_168(&(uParam0->f_16), "OJASAUD", "OJAShk_SEX6", 8, 0, 0, 0);
					}
					iLocal_2001++;
				}
			}
			break;
		
		case 6:
			if (system::timerb() >= 40000)
			{
				iLocal_2514 = 1;
			}
			break;
	}
}

void func_158(int iParam0, int iParam1)//Position - 0x891A
{
	if (!ped::is_ped_injured(iParam0))
	{
		if (vehicle::is_vehicle_driveable(ped::get_vehicle_ped_is_in(iParam1, 0), 0))
		{
			if (entity::is_entity_playing_anim(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_f", 3))
			{
				if (entity::is_entity_playing_anim(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_f", 3))
				{
					if (!func_104(&iLocal_2521))
					{
						func_119(&iLocal_2521);
					}
					if (entity::get_entity_anim_current_time(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_f") > 0.1f)
					{
						if (func_159(&iLocal_2521, gameplay::get_random_float_in_range(0.5f, 0.7f)))
						{
							func_119(&iLocal_2521);
							entity::apply_force_to_entity(ped::get_vehicle_ped_is_in(iParam1, 0), 1, 0f, 0f, 0.1f, -0.0067f, -0.8283f, -0.2766f, 0, 1, 1, 1, 1, 1);
						}
					}
				}
			}
		}
	}
}

bool func_159(int iParam0, float fParam1)//Position - 0x89CF
{
	if (func_104(iParam0))
	{
		if (func_101(iParam0) > fParam1)
		{
			return true;
		}
	}
	return false;
}

bool func_160(int iParam0, int iParam1)//Position - 0x89F1
{
	int iVar0;
	
	if (!ped::is_ped_injured(iParam0))
	{
		if (ped::is_ped_in_any_vehicle(iParam0, 0))
		{
			iVar0 = ped::get_vehicle_ped_is_in(iParam0, 0);
			if (vehicle::is_vehicle_driveable(iVar0, 0))
			{
				if (!ped::is_ped_injured(iParam1))
				{
					if (ped::is_ped_in_vehicle(iParam1, iVar0, 0))
					{
						if (vehicle::get_ped_in_vehicle_seat(iVar0, -1, 0) == iParam1 && vehicle::get_ped_in_vehicle_seat(iVar0, 0, 0) == iParam0)
						{
							return true;
						}
					}
				}
			}
		}
	}
	return false;
}

void func_161(int iParam0)//Position - 0x8A59
{
	vector3 vVar0;
	vector3 vVar3;
	
	if (!entity::is_entity_dead(player::player_ped_id(), 0))
	{
		if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
		{
			vVar0 = { entity::get_entity_coords(player::player_ped_id(), 1) };
		}
	}
	if (!entity::is_entity_dead(iParam0->f_1, 0))
	{
		vVar3 = { entity::get_entity_coords(iParam0->f_1, 1) };
	}
	if (!entity::is_entity_dead(player::player_ped_id(), 0))
	{
		if (entity::get_entity_speed(player::player_ped_id()) < 2f)
		{
			return;
		}
	}
	switch (iLocal_2004)
	{
		case 0:
			if (system::vdist2(vVar0, -595.557f, -1806.451f, 22.2803f) > 625f)
			{
				iLocal_2004 = 1;
			}
			break;
		
		case 1:
			if (system::vdist2(vVar0, vVar3) < 225f)
			{
				if (!func_118())
				{
					if (func_168(&(iParam0->f_16), "OJASAUD", "OJAShk_CLOSE", 8, 0, 0, 0))
					{
						if (!func_104(&iLocal_2080))
						{
							func_326(&iLocal_2080);
						}
						else
						{
							func_119(&iLocal_2080);
						}
						fLocal_2008 = func_101(&iLocal_2080);
						iLocal_2004 = 2;
					}
				}
				else
				{
					func_162();
				}
			}
			break;
		
		case 2:
			if (func_104(&iLocal_2080))
			{
				if (func_101(&iLocal_2080) > (fLocal_2008 + 15f) && system::vdist2(vVar0, vVar3) < 100f)
				{
					iLocal_1984 = 1;
					iLocal_2004 = 3;
				}
			}
			break;
		
		case 3:
			break;
	}
}

void func_162()//Position - 0x8BB1
{
	Global_14611 = 0;
	func_163();
}

void func_163()//Position - 0x8BC1
{
	if (audio::is_scripted_conversation_ongoing())
	{
		audio::restart_scripted_conversation();
		Global_16756 = 0;
		audio::stop_scripted_conversation(true);
		Global_15745 = 6;
		return;
	}
}

bool func_164(int iParam0)//Position - 0x8BE5
{
	if (fLocal_2008 == -1f)
	{
		switch (*iParam0)
		{
			case 0:
				if (!func_118())
				{
					func_168(&(Local_1044.f_16), "OJASAUD", "OJAShk_CLS_1", 8, 0, 0, 0);
					*iParam0++;
				}
				break;
			
			case 1:
				if (!func_118())
				{
					func_168(&(Local_1044.f_16), "OJASAUD", "OJAShk_CLS_2", 8, 0, 0, 0);
					*iParam0++;
				}
				break;
			
			case 2:
				if (!func_118())
				{
					func_168(&(Local_1044.f_16), "OJASAUD", "OJAShk_CLS_3", 8, 0, 0, 0);
					return true;
				}
				break;
			}
	}
	return false;
}

void func_165(int iParam0)//Position - 0x8C8A
{
	if (!func_118())
	{
		ui::remove_blip(&(iParam0->f_2));
		iParam0->f_2 = func_185(*iParam0, 0, 0);
		func_322("ASS_HK_WAIT2", 7500, 1);
		iLocal_1963 = true;
	}
}

void func_166()//Position - 0x8CBF
{
	if (!iLocal_1998)
	{
		if (player::get_player_wanted_level(player::player_id()) > 0)
		{
			if (audio::prepare_music_event("ASS3_COPS"))
			{
				audio::trigger_music_event("ASS3_COPS");
				iLocal_1998 = 1;
			}
		}
	}
}

void func_167(int iParam0)//Position - 0x8CF2
{
	if (!ped::is_ped_injured(*iParam0))
	{
		if (func_213(*iParam0, 1) < 5f)
		{
			if (!func_104(&iLocal_2068))
			{
				func_326(&iLocal_2068);
			}
			else if (func_101(&iLocal_2068) > 3f)
			{
				iLocal_1964 = 1;
			}
		}
	}
}

int func_168(var uParam0, char* sParam1, char* sParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x8D37
{
	func_117(uParam0, 145, sParam1, iParam4, iParam5, iParam6);
	if (iParam3 > 7)
	{
		if (iParam3 < 12)
		{
			iParam3 = 7;
		}
	}
	Global_15752 = 0;
	Global_15754 = 0;
	Global_15759 = 0;
	Global_16736 = 0;
	Global_16738 = 0;
	Global_16742 = 0;
	Global_2621441 = 0;
	return func_109(sParam2, iParam3, 0);
}

bool func_169(int iParam0)//Position - 0x8D85
{
	if (func_213(iParam0, 1) < 50f)
	{
		return true;
	}
	return false;
}

void func_170(int iParam0)//Position - 0x8DA2
{
	if (!ped::is_ped_injured(*iParam0))
	{
		ped::set_blocking_of_non_temporary_events(*iParam0, false);
	}
	if (!ped::is_ped_injured(iParam0->f_1[2]))
	{
		ped::set_blocking_of_non_temporary_events(iParam0->f_1[2], false);
	}
	if (!ped::is_ped_injured(iParam0->f_6))
	{
		ped::set_blocking_of_non_temporary_events(iParam0->f_6, false);
	}
	if (!ped::is_ped_injured(iParam0->f_1[3]))
	{
		ped::set_blocking_of_non_temporary_events(iParam0->f_1[3], false);
	}
	if (!ped::is_ped_injured(iParam0->f_1[0]))
	{
		ped::set_blocking_of_non_temporary_events(iParam0->f_1[0], false);
	}
	if (!ped::is_ped_injured(iParam0->f_1[1]))
	{
		ped::set_blocking_of_non_temporary_events(iParam0->f_1[1], false);
	}
}

void func_171(int iParam0)//Position - 0x8E3E
{
	int iVar0;
	int iVar1;
	
	if (!func_104(&iLocal_2065))
	{
		if (vehicle::is_vehicle_driveable(iParam0->f_10, 0))
		{
			if (!ped::is_ped_injured(iParam0->f_9))
			{
				if (!ped::is_ped_injured(iParam0->f_7))
				{
					if (ai::waypoint_recording_get_closest_waypoint(&cLocal_2060, entity::get_entity_coords(iParam0->f_10, 1), &iVar1))
					{
						if (iVar1 >= 14)
						{
							if (!func_172())
							{
								if (ai::get_script_task_status(iParam0->f_9, -2017877118) != 1 && ai::get_script_task_status(iParam0->f_9, -2017877118) != 0)
								{
									ai::clear_ped_tasks(iParam0->f_9);
									ai::task_look_at_entity(iParam0->f_7, iParam0->f_10, -1, 2048, 4);
									ai::task_look_at_entity(iParam0->f_9, iParam0->f_7, -1, 2048, 4);
									vehicle::_set_vehicle_halt(iParam0->f_10, 10f, 1, 0);
								}
								if (!audio::is_scripted_conversation_ongoing())
								{
									vehicle::start_vehicle_horn(iParam0->f_10, 750, 0, 0);
									func_326(&iLocal_2065);
									if (func_169(iParam0->f_7))
									{
										func_248(&(iParam0->f_16), 5, iParam0->f_9, "OJAhkCrawler2", 0, 1);
										if (!iLocal_1981)
										{
											if (func_168(&(iParam0->f_16), "OJASAUD", "OJAShk_CHEAP", 8, 0, 0, 0))
											{
												iLocal_1981 = true;
											}
										}
									}
								}
							}
							else
							{
								func_226(Local_1501, &Local_1684, 2);
							}
						}
					}
				}
			}
		}
	}
	else if (!ped::is_ped_injured(*iParam0))
	{
		if (func_104(&iLocal_2065))
		{
			if (func_101(&iLocal_2065) > 0.5f)
			{
				if (!iLocal_1997)
				{
					if (!ped::is_ped_injured(iParam0->f_7))
					{
						ai::clear_sequence_task(&iVar0);
						ai::open_sequence_task(&iVar0);
						if (entity::get_entity_heading(iParam0->f_7) < (Local_1684.f_21 - 30f) || entity::get_entity_heading(iParam0->f_7) > (Local_1684.f_21 + 30f))
						{
							ai::task_achieve_heading(0, Local_1684.f_21, 0);
						}
						ai::task_play_anim(0, sLocal_2000, "idle_outro", 4f, -4f, -1, 0, 0f, 0, 0, 0);
						ai::task_play_anim(0, sLocal_2000, "idle_reject", 4f, -4f, -1, 0, 0f, 0, 0, 0);
						ai::task_play_anim(0, sLocal_2000, "reject_outro", 4f, -4f, -1, 0, 0f, 0, 0, 0);
						ai::task_achieve_heading(0, Local_1684.f_21, 0);
						ai::task_play_anim(0, sLocal_2000, "idle_wait", 4f, -4f, -1, 1, 0f, 0, 0, 0);
						ai::close_sequence_task(iVar0);
						ai::task_perform_sequence(iParam0->f_7, iVar0);
						ai::clear_sequence_task(&iVar0);
						iLocal_1997 = 1;
					}
				}
				else if (func_101(&iLocal_2065) > 5f)
				{
					if (vehicle::is_vehicle_driveable(iParam0->f_10, 0))
					{
						if (!ped::is_ped_injured(iParam0->f_9))
						{
							if (ai::get_script_task_status(iParam0->f_9, -258271821) != 1 && ai::get_script_task_status(iParam0->f_9, -258271821) != 0)
							{
								ai::task_vehicle_drive_wander(iParam0->f_9, iParam0->f_10, 6f, 786597);
							}
						}
					}
				}
			}
		}
		if (iLocal_1966)
		{
			if (entity::does_entity_exist(iParam0->f_9) && entity::does_entity_exist(iParam0->f_7))
			{
				if (func_153(iParam0->f_9, iParam0->f_7, 1) > 10f)
				{
					iLocal_1966 = 0;
				}
			}
		}
	}
}

bool func_172()//Position - 0x9104
{
	int iVar0;
	
	iVar0 = player::get_players_last_vehicle();
	if (entity::does_entity_exist(iVar0))
	{
		if (entity::is_entity_in_angled_area(iVar0, -589.9521f, -1813.227f, 22.181f, -598.983f, -1809.424f, 23.08028f, 6.5f, 0, true, 0))
		{
			return true;
		}
	}
	return false;
}

void func_173(char* sParam0, int iParam1)//Position - 0x914F
{
	ui::_set_text_component_format(sParam0);
	ui::_display_help_text_from_string_label(0, 0, true, iParam1);
}

void func_174(int iParam0)//Position - 0x9166
{
	if (vehicle::is_vehicle_driveable(iParam0->f_10, 0))
	{
		if (vehicle::is_vehicle_driveable(iParam0->f_1, 0))
		{
			if (!ped::is_ped_injured(iParam0->f_9))
			{
				if (!ped::is_ped_injured(iParam0->f_7))
				{
					if ((Global_101553.f_18818.f_3 % 2) == 1)
					{
						StringCopy(&cLocal_2056, "OJAShk_101", 16);
						StringCopy(&cLocal_2060, "OJAShk_103", 16);
					}
					else
					{
						StringCopy(&cLocal_2056, "OJAShk_103", 16);
						StringCopy(&cLocal_2060, "OJAShk_101", 16);
					}
					ai::task_vehicle_follow_waypoint_recording(*iParam0, iParam0->f_1, &cLocal_2056, 701, 0, 0, -1, -1f, 0, 1073741824);
					ai::task_vehicle_follow_waypoint_recording(iParam0->f_9, iParam0->f_10, &cLocal_2060, 701, 0, 0, -1, -1f, 0, 1073741824);
					vehicle::set_vehicle_doors_locked(iParam0->f_10, 3);
					entity::set_entity_load_collision_flag(*iParam0, true);
					iLocal_1966 = 1;
				}
			}
		}
	}
}

void func_175()//Position - 0x9234
{
	if (!iLocal_1977)
	{
		if (func_104(&iLocal_2074))
		{
			if (func_101(&iLocal_2074) > 5f)
			{
				audio::trigger_music_event("ASS3_START");
				iLocal_1977 = 1;
			}
		}
	}
}

void func_176(int iParam0)//Position - 0x9266
{
	if (vehicle::is_vehicle_driveable(iParam0->f_10, 0))
	{
		if (vehicle::is_vehicle_driveable(iParam0->f_1, 0))
		{
			if (!ped::is_ped_injured(iParam0->f_9))
			{
				if (!ped::is_ped_injured(iParam0->f_7))
				{
					if ((Global_101553.f_18818.f_3 % 2) == 0)
					{
						vLocal_2015 = { -576.8151f, -1734.927f, 22.4815f };
						vLocal_2018 = { -524.8151f, -1771.927f, 20.3315f };
					}
					else
					{
						vLocal_2015 = { -524.8151f, -1771.927f, 20.3315f };
						vLocal_2018 = { -576.8151f, -1734.927f, 22.4815f };
					}
					ped::set_ped_coords_keep_vehicle(*iParam0, vLocal_2015);
					entity::set_entity_heading(iParam0->f_1, 234f);
					vehicle::set_vehicle_on_ground_properly(iParam0->f_1);
					audio::set_vehicle_radio_enabled(iParam0->f_1, true);
					audio::set_vehicle_radio_loud(iParam0->f_1, 1);
					ped::set_ped_coords_keep_vehicle(iParam0->f_9, vLocal_2018);
					entity::set_entity_heading(iParam0->f_10, 234f);
					vehicle::set_vehicle_on_ground_properly(iParam0->f_10);
					audio::set_vehicle_radio_enabled(iParam0->f_10, true);
					audio::set_vehicle_radio_loud(iParam0->f_1, 1);
				}
			}
		}
	}
}

void func_177(int iParam0)//Position - 0x9369
{
	if (!entity::does_entity_exist(iParam0->f_10))
	{
		iParam0->f_10 = vehicle::create_vehicle(Local_1684.f_17, Local_1684.f_30, Local_1684.f_33, 1, true);
		vehicle::set_vehicle_extra(iParam0->f_10, 2, true);
		vehicle::remove_vehicle_window(iParam0->f_10, 1);
		vehicle::remove_vehicle_window(iParam0->f_10, 0);
	}
	if (!entity::does_entity_exist(iParam0->f_9))
	{
		iParam0->f_9 = ped::create_ped_inside_vehicle(iParam0->f_10, 26, Local_1684.f_16, -1, 1, true);
		ped::set_blocking_of_non_temporary_events(iParam0->f_9, true);
	}
}

void func_178(int iParam0, int iParam1)//Position - 0x93DF
{
	if (iParam0->f_5 != 0)
	{
		if (!entity::does_entity_exist(iParam1->f_1))
		{
			iParam1->f_1 = vehicle::create_vehicle(iParam0->f_5, iParam0->f_9, iParam0->f_12, 1, true);
			if (iParam0->f_274 == 1)
			{
				vehicle::set_vehicle_extra(iParam1->f_1, 2, true);
				vehicle::remove_vehicle_window(iParam1->f_1, 1);
				vehicle::remove_vehicle_window(iParam1->f_1, 0);
				vehicle::set_vehicle_doors_locked(iParam1->f_1, 3);
			}
			else if (iParam0->f_274 == 0)
			{
				entity::set_entity_load_collision_flag(iParam1->f_1, true);
				vehicle::set_vehicle_colour_combination(iParam1->f_1, 0);
			}
			vehicle::add_vehicle_upsidedown_check(iParam1->f_1);
			if (iParam0->f_267 == 1)
			{
				if (entity::does_entity_exist(iParam1->f_1))
				{
					if (vehicle::is_vehicle_driveable(iParam1->f_1, 0))
					{
						if (!ped::is_ped_injured(*iParam1))
						{
							ped::set_ped_into_vehicle(*iParam1, iParam1->f_1, -1);
						}
					}
				}
			}
		}
	}
}

void func_179(int iParam0, int iParam1)//Position - 0x949E
{
	if (!entity::does_entity_exist(*iParam1))
	{
		*iParam1 = ped::create_ped(4, *iParam0, iParam0->f_1, iParam0->f_4, 1, true);
		ped::set_ped_model_is_suppressed(*iParam0, true);
		ped::set_ped_can_use_auto_conversation_lookat(*iParam1, 1);
		ped::set_ped_can_be_targetted(*iParam1, true);
		ped::set_ped_can_be_shot_in_vehicle(*iParam1, 1);
		ped::set_ped_config_flag(*iParam1, 29, true);
		entity::set_entity_is_target_priority(*iParam1, 1, 0);
		if (!iLocal_1030)
		{
			ped::add_relationship_group("Target", &iLocal_1040);
			iLocal_1030 = 1;
		}
		ped::set_relationship_between_groups(5, iLocal_1040, 1862763509);
		ped::set_relationship_between_groups(5, 1862763509, iLocal_1040);
		ped::set_ped_relationship_group_hash(*iParam1, iLocal_1040);
		if (iParam0->f_268)
		{
			ped::set_blocking_of_non_temporary_events(*iParam1, true);
		}
		if (iParam0->f_269)
		{
			ped::set_ped_combat_attributes(*iParam1, 3, false);
			ped::set_ped_get_out_upside_down_vehicle(*iParam1, 1);
		}
		if (iParam0->f_13 != 0)
		{
			weapon::give_weapon_to_ped(*iParam1, iParam0->f_13, -1, false, true);
		}
		if (iParam0->f_274 == 0)
		{
			ped::set_ped_component_variation(*iParam1, 0, 0, 1, 0);
			ped::set_ped_component_variation(*iParam1, 2, 2, 2, 0);
			ped::set_ped_component_variation(*iParam1, 3, 0, 1, 0);
			ped::set_ped_component_variation(*iParam1, 4, 0, 1, 0);
			ped::set_ped_component_variation(*iParam1, 8, 1, 2, 0);
			func_248(&(iParam1->f_16), 3, *iParam1, "INVESTOR", 0, 1);
		}
		else if (iParam0->f_274 == 1)
		{
			func_248(&(iParam1->f_16), 3, *iParam1, "OJAhkJUNKIE", 0, 1);
			ped::set_ped_component_variation(*iParam1, 0, 0, 0, 0);
			ped::set_ped_component_variation(*iParam1, 2, 1, 0, 0);
			ped::set_ped_component_variation(*iParam1, 3, 1, 2, 0);
			ped::set_ped_component_variation(*iParam1, 4, 0, 0, 0);
			ped::set_ped_config_flag(*iParam1, 134, true);
			ped::set_ped_plays_head_on_horn_anim_when_dies_in_vehicle(*iParam1, 1);
			ped::set_ped_money(*iParam1, gameplay::get_random_int_in_range(80, 100));
			weapon::give_weapon_to_ped(*iParam1, joaat("weapon_combatpistol"), -1, false, true);
			ped::set_ped_accuracy(*iParam1, 50);
		}
	}
}

var func_180(char* sParam0, int iParam1, char* sParam2)//Position - 0x964A
{
	ui::_0x853648FD1063A213(sParam0);
	if (iParam1 == 1)
	{
		ui::_add_text_component_item_string(sParam2);
	}
	return ui::_0x8A9BA1AB3E237613();
}

int func_181()//Position - 0x9668
{
	int iVar0;
	
	streaming::request_model(Local_1684);
	if (streaming::has_model_loaded(Local_1684))
	{
		iVar0 = 1;
	}
	else
	{
		iVar0 = 0;
	}
	return iVar0;
}

bool func_182()//Position - 0x968C
{
	if (!entity::is_entity_dead(player::player_ped_id(), 0))
	{
		if (entity::is_entity_in_angled_area(player::player_ped_id(), -439.4265f, -1816.02f, 17.48402f, -645.8715f, -1681.039f, 31.15143f, 61f, 0, true, 0))
		{
			func_183();
		}
	}
	if (!cam::is_sphere_visible(vLocal_2034, 10f) || entity::is_entity_in_angled_area(player::player_ped_id(), -723.2551f, -1752.763f, 13.96991f, -537.5364f, -1891.547f, 41.43076f, 135.75f, 0, true, 0))
	{
		return true;
	}
	else
	{
		func_183();
	}
	return false;
}

void func_183()//Position - 0x9728
{
	if (!func_104(&iLocal_2095))
	{
		func_326(&iLocal_2095);
		func_322("ASS_HK_RT", 7500, 1);
	}
	else if (func_101(&iLocal_2095) > 25f)
	{
		func_226(Local_1501, &Local_1684, 4);
	}
}

bool func_184(int iParam0)//Position - 0x976F
{
	int iVar0;
	int iVar1;
	
	switch (iLocal_2005)
	{
		case 0:
			if (!entity::does_entity_exist(iLocal_2011))
			{
				iLocal_2011 = vehicle::create_vehicle(iLocal_2238, -524.8151f, -1771.927f, 20.3315f, 234f, 1, true);
				streaming::set_model_as_no_longer_needed(iLocal_2238);
				vehicle::set_vehicle_on_ground_properly(iLocal_2011);
				audio::set_vehicle_radio_enabled(iLocal_2011, true);
				audio::set_vehicle_radio_loud(iLocal_2011, 1);
				if (entity::does_entity_exist(iLocal_2011))
				{
					iLocal_2012 = ped::create_ped_inside_vehicle(iLocal_2011, 26, iLocal_2239, -1, 1, true);
					streaming::set_model_as_no_longer_needed(iLocal_2239);
					ped::set_blocking_of_non_temporary_events(iLocal_2012, true);
					ai::task_vehicle_follow_waypoint_recording(iLocal_2012, iLocal_2011, "OJAShk_103", 701, 0, 0, -1, -1f, 0, 1073741824);
					vehicle::set_vehicle_doors_locked(iLocal_2011, 3);
					iLocal_2005 = 1;
				}
			}
			break;
		
		case 1:
			if (!entity::is_entity_dead(iLocal_2011, 0) && !entity::is_entity_dead(iLocal_2012, 0))
			{
				if (ai::waypoint_recording_get_closest_waypoint("OJAShk_103", entity::get_entity_coords(iLocal_2011, 1), &iVar0))
				{
					if (iVar0 >= 14)
					{
						ai::clear_ped_tasks(iLocal_2012);
						vehicle::_set_vehicle_halt(iLocal_2011, 10f, 1, 0);
						vehicle::start_vehicle_horn(iLocal_2011, 750, 0, 0);
						if (!entity::is_entity_dead(iLocal_2012, 0) && !entity::is_entity_dead(iParam0->f_7, 0))
						{
							ai::task_look_at_entity(iLocal_2012, iParam0->f_7, -1, 2048, 4);
							ai::task_look_at_entity(iParam0->f_7, iLocal_2012, -1, 2048, 4);
							ai::open_sequence_task(&iVar1);
							if (entity::get_entity_heading(iParam0->f_7) < (Local_1684.f_21 - 30f) || entity::get_entity_heading(iParam0->f_7) > (Local_1684.f_21 + 30f))
							{
								ai::task_achieve_heading(0, Local_1684.f_21, 0);
							}
							ai::task_play_anim(0, sLocal_2000, "idle_outro", 4f, -4f, -1, 0, 0f, 0, 0, 0);
							ai::task_play_anim(0, sLocal_2000, "idle_b", 4f, -4f, -1, 0, 0f, 0, 0, 0);
							ai::task_play_anim(0, sLocal_2000, "idle_wait", 4f, -4f, -1, 1, 0f, 0, 0, 0);
							ai::close_sequence_task(iVar1);
							ai::task_perform_sequence(iParam0->f_7, iVar1);
							ai::clear_sequence_task(&iVar1);
						}
						if (!func_104(&iLocal_2092))
						{
							func_326(&iLocal_2092);
						}
						else
						{
							func_119(&iLocal_2092);
						}
						func_248(&(iParam0->f_16), 5, iLocal_2012, "VICE_FIRST", 0, 1);
						if (!iLocal_1993)
						{
							if (func_168(&(iParam0->f_16), "OJASAUD", "OJAShk_FIRST", 8, 0, 0, 0))
							{
								iLocal_1993 = 1;
							}
						}
						iLocal_2005 = 2;
					}
				}
			}
			break;
		
		case 2:
			if (!iLocal_1993)
			{
				if (func_168(&(iParam0->f_16), "OJASAUD", "OJAShk_FIRST", 8, 0, 0, 0))
				{
					iLocal_1993 = 1;
				}
			}
			if (func_104(&iLocal_2092))
			{
				if (func_101(&iLocal_2092) > 7f)
				{
					if (vehicle::is_vehicle_driveable(iLocal_2011, 0))
					{
						if (!ped::is_ped_injured(iLocal_2012))
						{
							ai::open_sequence_task(&iVar1);
							ai::task_vehicle_mission_coors_target(0, iLocal_2011, vLocal_2040, 4, 15f, 786597, 1f, -1f, 1);
							ai::task_vehicle_drive_wander(0, iLocal_2011, 15f, 786597);
							ai::close_sequence_task(iVar1);
							ai::task_perform_sequence(iLocal_2012, iVar1);
							ai::clear_sequence_task(&iVar1);
						}
					}
					if (!entity::is_entity_dead(iLocal_2012, 0) && !entity::is_entity_dead(iParam0->f_7, 0))
					{
						ai::task_clear_look_at(iLocal_2012);
						ai::task_clear_look_at(iParam0->f_7);
					}
					iLocal_2005 = 3;
				}
			}
			break;
		
		case 3:
			if (entity::does_entity_exist(iLocal_2011))
			{
				if (!entity::is_entity_on_screen(iLocal_2011))
				{
					if (entity::does_entity_exist(iLocal_2012))
					{
						entity::set_ped_as_no_longer_needed(&iLocal_2012);
					}
					entity::set_vehicle_as_no_longer_needed(&iLocal_2011);
					iLocal_2005 = 4;
				}
			}
			break;
		
		case 4:
			return true;
			break;
	}
	return false;
}

int func_185(int iParam0, int iParam1, int iParam2)//Position - 0x9ACC
{
	int iVar0;
	
	if (!entity::does_entity_exist(iParam0))
	{
		return 0;
	}
	iVar0 = ui::add_blip_for_entity(iParam0);
	if (entity::is_entity_a_vehicle(iParam0))
	{
		ui::set_blip_scale(iVar0, func_51(network::network_is_game_in_progress(), 1f, 1f));
		if (!iParam2)
		{
			ui::set_blip_as_friendly(iVar0, iParam1);
		}
		else
		{
			ui::set_blip_colour(iVar0, 2);
		}
	}
	else if (entity::is_entity_a_ped(iParam0))
	{
		ui::set_blip_scale(iVar0, func_51(network::network_is_game_in_progress(), 0.7f, 0.7f));
		ui::set_blip_as_friendly(iVar0, iParam1);
	}
	else if (entity::is_entity_an_object(iParam0))
	{
		ui::set_blip_scale(iVar0, func_51(network::network_is_game_in_progress(), 0.7f, 0.7f));
	}
	return iVar0;
}

void func_186(int iParam0)//Position - 0x9B70
{
	int iVar0;
	int iVar1;
	
	if (!entity::is_entity_dead(iParam0, 0))
	{
		ped::set_ped_combat_attributes(iParam0, 3, true);
		ped::set_ped_combat_attributes(iParam0, 1, false);
	}
	ai::task_clear_look_at(iParam0);
	ped::set_ped_can_be_targetted(iParam0, true);
	if (entity::is_entity_playing_anim(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_m", 3) || entity::is_entity_playing_anim(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_intro_m", 3))
	{
		iVar1 = true;
	}
	else
	{
		iVar1 = false;
	}
	ped::set_ped_flee_attributes(iParam0, 2, false);
	ai::clear_sequence_task(&iVar0);
	ai::open_sequence_task(&iVar0);
	if (iLocal_1989)
	{
		if (iVar1)
		{
			ai::task_play_anim(0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_outro_m", 4f, -4f, 3000, 0, 0f, 0, 0, 0);
		}
	}
	else if (iVar1)
	{
		ai::task_play_anim(0, "ODDJOBS@ASSASSINATE@VICE@SEX", "FrontSeat_CarSex_Normal_Outro_m", 4f, -4f, -1, 0, 0f, 0, 0, 0);
	}
	ai::task_combat_ped(0, player::player_ped_id(), 0, 16);
	ai::close_sequence_task(iVar0);
	if (!entity::is_entity_dead(iParam0, 0))
	{
		ai::task_perform_sequence(iParam0, iVar0);
	}
	ai::clear_sequence_task(&iVar0);
}

char* func_187()//Position - 0x9C5C
{
	if (func_188(Local_1044, &(Local_1044.f_16), &iLocal_2518, 1))
	{
		return "OJAShk_HELP2";
	}
	if (iLocal_1964)
	{
		return "OJAShk_HELP3";
	}
	else if (iLocal_1984)
	{
		return "OJAShk_PANIC";
	}
	else if (iLocal_1965)
	{
		return "OJAShk_BLOCK";
	}
	else
	{
		return "OJAShk_HELP";
	}
	return "";
}

bool func_188(int iParam0, var uParam1, int iParam2, int iParam3)//Position - 0x9CB8
{
	if (!ped::is_ped_injured(iParam0))
	{
		if (entity::is_entity_playing_anim(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_m", 3) || entity::is_entity_playing_anim(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_f", 3))
		{
			if (!func_104(iParam2))
			{
				if (func_213(iParam0, 1) < 10f)
				{
					if ((iParam3 && ped::is_ped_facing_ped(iParam0, player::player_ped_id(), 160f)) || (iParam3 == 0 && !ped::is_ped_facing_ped(iParam0, player::player_ped_id(), 160f)))
					{
						func_326(iParam2);
					}
				}
			}
			else if (!iLocal_2516)
			{
				if (func_213(iParam0, 1) < 10f)
				{
					if (iParam3)
					{
						if (ped::is_ped_facing_ped(iParam0, player::player_ped_id(), 160f))
						{
							if (func_118())
							{
								func_189();
							}
							else
							{
								func_168(uParam1, "OJASAUD", "OJAShk_LOOK", 9, 0, 0, 0);
								iLocal_2516 = 1;
								func_326(iParam2);
							}
						}
					}
					else if (!ped::is_ped_facing_ped(iParam0, player::player_ped_id(), 160f))
					{
						if (func_118())
						{
							func_189();
						}
						else
						{
							func_168(uParam1, "OJASAUD", "OJAShk_LOOK1", 9, 0, 0, 0);
							iLocal_2516 = 1;
							func_326(iParam2);
						}
					}
				}
			}
			else if (func_101(iParam2) > 10f)
			{
				if (func_213(iParam0, 1) < 10f)
				{
					if ((iParam3 && ped::is_ped_facing_ped(iParam0, player::player_ped_id(), 160f)) || (iParam3 == 0 && !ped::is_ped_facing_ped(iParam0, player::player_ped_id(), 160f)))
					{
						func_189();
						iLocal_1986 = true;
						return true;
					}
				}
			}
			if (func_213(iParam0, 1) < 10f)
			{
				if (ped::get_jack_target(player::player_ped_id()) == iParam0 || ped::is_ped_jacking(player::player_ped_id()))
				{
					return true;
				}
			}
		}
	}
	return false;
}

void func_189()//Position - 0x9E7F
{
	Global_14611 = 0;
	func_116();
}

bool func_190(var uParam0, var uParam1, var uParam2, int iParam3, var uParam4)//Position - 0x9E8F
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	vector3 vVar5;
	int iVar8;
	int iVar9;
	
	iVar2 = 0;
	if (*uParam2 == 0)
	{
		iVar1 = *uParam1;
		iVar2 = uParam1->f_1;
	}
	else if (*uParam2 == 1)
	{
		if (iLocal_1966)
		{
			iVar1 = uParam1->f_9;
			iVar2 = uParam1->f_10;
		}
	}
	else if (*uParam2 == 2)
	{
		iVar1 = uParam1->f_7;
	}
	else if (*uParam2 == 3)
	{
		iVar1 = *uParam0;
	}
	else if (*uParam2 == 4)
	{
		iVar1 = uParam0->f_1[2];
	}
	else if (*uParam2 == 5)
	{
		iVar1 = uParam0->f_6;
	}
	else if (*uParam2 == 6)
	{
		iVar1 = uParam0->f_1[3];
	}
	else if (*uParam2 == 7)
	{
		iVar1 = uParam0->f_1[0];
	}
	else if (*uParam2 == 8)
	{
		iVar1 = uParam0->f_1[1];
	}
	else if (*uParam2 == 9)
	{
		iVar1 = iLocal_2012;
	}
	iVar3 = false;
	if (iVar1 == iLocal_2012)
	{
		iVar3 = true;
	}
	if (iLocal_1982)
	{
		iVar4 = 2;
	}
	else
	{
		iVar4 = 9;
	}
	if (iVar4 == 9)
	{
		if (fire::is_explosion_in_sphere(-1, -594.8182f, -1792.035f, 21.93077f, 35f))
		{
			iVar0 = 1;
		}
	}
	if (*uParam2 <= iVar4)
	{
		if (entity::does_entity_exist(iVar1))
		{
			if (iVar2 == uParam1->f_1 && iVar1 == *uParam1)
			{
				if ((func_215(iVar1, iVar2, &vLocal_122, &iLocal_133, 0, func_222(iVar1), iVar3, 1, 1) || (vehicle::is_vehicle_driveable(uParam1->f_1, 0) && entity::has_entity_been_damaged_by_entity(uParam1->f_1, player::player_ped_id(), 1))) || vehicle::get_ped_in_vehicle_seat(uParam1->f_1, -1, 0) == player::player_ped_id())
				{
					iVar0 = 1;
				}
			}
			else if (iVar1 == uParam1->f_9)
			{
				if ((func_215(iVar1, iVar2, &vLocal_122, &iLocal_133, 0, func_222(iVar1), 0, 1, 1) || ped::get_jack_target(player::player_ped_id()) == iVar1) || (vehicle::is_vehicle_driveable(uParam1->f_10, 0) && entity::has_entity_been_damaged_by_entity(uParam1->f_10, player::player_ped_id(), 1)))
				{
					iVar0 = 1;
				}
			}
			else if (func_215(iVar1, iVar2, &vLocal_122, &iLocal_133, 1, func_222(iVar1), 0, 1, 1) || ped::get_jack_target(player::player_ped_id()) == iVar1)
			{
				iVar0 = 1;
			}
		}
	}
	else if (iParam3)
	{
		if (player::is_player_wanted_level_greater(player::player_id(), 0))
		{
			iVar0 = 1;
		}
	}
	*uParam2++;
	if (*uParam2 > iVar4)
	{
		*uParam2 = 0;
	}
	if (!entity::is_entity_dead(player::player_ped_id(), 0))
	{
		vVar5 = { entity::get_entity_coords(player::player_ped_id(), 1) };
		if (system::vdist2(vVar5, -593.1321f, -1791.836f, 21.9111f) < 1600f)
		{
			if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
			{
				iVar8 = ped::get_vehicle_ped_is_in(player::player_ped_id(), 0);
				if (entity::does_entity_exist(iVar8) && !entity::is_entity_dead(iVar8, 0))
				{
					iVar9 = entity::get_entity_model(iVar8);
					if (((iVar9 == joaat("police") || iVar9 == joaat("police2")) || iVar9 == joaat("police3")) || iVar9 == joaat("police4"))
					{
						return true;
					}
				}
			}
		}
	}
	if (iVar0 == 1)
	{
		*uParam4 = 1;
		return true;
	}
	return false;
}

void func_191(var uParam0, var uParam1)//Position - 0xA17D
{
	if (iLocal_1460 != 11 && iLocal_1460 != 12)
	{
		if (entity::does_entity_exist(*uParam1))
		{
			if (func_213(*uParam1, 1) < 5f)
			{
				if (!iLocal_1960)
				{
					if (!func_118() && !ui::is_message_being_displayed())
					{
						if (func_168(&(uParam0->f_16), "OJASAUD", "OJAShk_PIMP", 8, 0, 0, 0))
						{
							ped::set_ped_can_use_auto_conversation_lookat(*uParam1, 1);
							iLocal_1960 = 1;
						}
					}
				}
				else
				{
					func_192(*uParam1);
				}
			}
		}
		if (entity::does_entity_exist(uParam1->f_1[0]))
		{
			if (func_213(uParam1->f_1[0], 1) < 5f)
			{
				if (!iLocal_1961)
				{
					if (!func_118() && !ui::is_message_being_displayed())
					{
						if (func_168(&(uParam0->f_16), "OJASAUD", "OJAShk_PROST", 8, 0, 0, 0))
						{
							ped::set_ped_can_use_auto_conversation_lookat(uParam1->f_1[0], 1);
							iLocal_1961 = 1;
						}
					}
				}
				else
				{
					func_192(uParam1->f_1[0]);
				}
			}
		}
		if (entity::does_entity_exist(uParam1->f_6))
		{
			if (func_213(uParam1->f_6, 1) < 5f)
			{
				if (!iLocal_1962)
				{
					if (!func_118() && !ui::is_message_being_displayed())
					{
						if (func_168(&(uParam0->f_16), "OJASAUD", "OJAShk_DRUG", 8, 0, 0, 0))
						{
							ped::set_ped_can_use_auto_conversation_lookat(uParam1->f_6, 1);
							iLocal_1962 = 1;
						}
					}
				}
				else
				{
					func_192(uParam1->f_6);
				}
			}
		}
	}
}

void func_192(int iParam0)//Position - 0xA2C7
{
	if (entity::is_entity_touching_entity(player::player_ped_id(), iParam0))
	{
		if (audio::is_scripted_speech_playing(iParam0))
		{
			func_193();
		}
	}
}

void func_193()//Position - 0xA2E9
{
	Global_14611 = 0;
	func_194();
}

void func_194()//Position - 0xA2F9
{
	audio::restart_scripted_conversation();
	Global_16756 = 0;
	if (audio::is_scripted_conversation_ongoing())
	{
		audio::stop_scripted_conversation(false);
		Global_15745 = 6;
	}
}

bool func_195(int iParam0, int iParam1, int iParam2, var uParam3, float fParam4, float fParam5)//Position - 0xA31A
{
	if (entity::does_entity_exist(iParam0))
	{
		if (func_104(iParam2))
		{
			if (func_101(iParam2) >= 1f)
			{
				if (func_104(iParam1))
				{
					if (func_101(iParam1) > fParam4)
					{
						if (func_196(iParam0, *uParam3, 1) <= fParam5)
						{
							return true;
						}
						else if (!entity::is_entity_dead(iParam0, 0))
						{
							*uParam3 = { entity::get_entity_coords(iParam0, 1) };
							func_119(iParam1);
						}
					}
				}
				else if (!entity::is_entity_dead(iParam0, 0))
				{
					*uParam3 = { entity::get_entity_coords(iParam0, 1) };
					func_119(iParam1);
				}
				func_119(iParam2);
			}
		}
		else
		{
			func_119(iParam2);
		}
	}
	return false;
}

float func_196(int iParam0, vector3 vParam1, int iParam4)//Position - 0xA3B7
{
	vector3 vVar0;
	
	if (!entity::is_entity_dead(iParam0, 0))
	{
		vVar0 = { entity::get_entity_coords(iParam0, 1) };
	}
	else
	{
		vVar0 = { entity::get_entity_coords(iParam0, 0) };
	}
	return gameplay::get_distance_between_coords(vVar0, vParam1, iParam4);
}

void func_197(int iParam0)//Position - 0xA3F1
{
	iParam0->f_1 = 0f;
	iParam0->f_2 = 0f;
	*iParam0 = 0;
}

bool func_198()//Position - 0xA407
{
	int iVar0;
	
	if (iLocal_1460 >= 3)
	{
		if (iLocal_1460 < 6 || (((iLocal_1460 == 6 && !entity::is_entity_dead(Local_1044.f_1, 0)) && ai::is_waypoint_playback_going_on_for_vehicle(Local_1044.f_1)) && ai::get_vehicle_waypoint_progress(Local_1044.f_1) <= 30))
		{
			iVar0 = vehicle::get_closest_vehicle(vLocal_2031, fLocal_2055, 0, 4);
			if (iVar0 != 0)
			{
				return true;
			}
		}
	}
	return false;
	return false;
}

void func_199()//Position - 0xA477
{
	if (iLocal_2006 == 0)
	{
		if (!entity::is_entity_dead(player::player_ped_id(), 0))
		{
			if (entity::is_entity_in_angled_area(player::player_ped_id(), -628.6448f, -1780.581f, 40.332f, -600.0872f, -1760.646f, 48.33199f, 24.75f, 0, true, 0))
			{
				vLocal_122.z = 5f;
			}
			else
			{
				vLocal_122.z = 28f;
			}
		}
	}
	iLocal_2006++;
	if (iLocal_2006 > 10)
	{
		iLocal_2006 = 0;
	}
}

bool func_200(int iParam0, var uParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6, int iParam7)//Position - 0xA4E9
{
	if (!*iParam0)
	{
		if (func_168(uParam1, sParam2, sParam3, iParam4, iParam5, iParam6, iParam7))
		{
			*iParam0 = 1;
			return true;
		}
	}
	return false;
}

void func_201(var uParam0, int iParam1, int iParam2)//Position - 0xA516
{
	char* sVar0;
	
	if (network::network_is_game_in_progress())
	{
		if (gameplay::is_bit_set(Global_2482149.f_4442, 26))
		{
			return;
		}
	}
	if (cam::is_gameplay_hint_active())
	{
		cam::stop_gameplay_hint(iParam2);
		graphics::_stop_screen_effect("FocusIn");
		audio::stop_audio_scene("HINT_CAM_SCENE");
		if (uParam0->f_11)
		{
			graphics::_start_screen_effect("FocusOut", 0, 0);
			audio::play_sound_frontend(-1, "FocusOut", "HintCamSounds", 1);
			uParam0->f_11 = 0;
		}
	}
	cam::set_cinematic_button_active(true);
	uParam0->f_1 = 0;
	*uParam0 = 0;
	uParam0->f_2 = -1;
	uParam0->f_8 = 0;
	uParam0->f_5 = 0;
	uParam0->f_6 = 0;
	sVar0 = iParam1;
	if (gameplay::is_string_null(sVar0))
	{
		if (!network::network_is_game_in_progress())
		{
			sVar0 = "CMN_HINT";
		}
		else
		{
			sVar0 = "FM_IHELP_HNT";
		}
	}
	if (!gameplay::is_string_null(uParam0->f_3))
	{
		if (func_145(uParam0->f_3))
		{
			ui::clear_help(1);
		}
	}
	if (!gameplay::is_string_null(sVar0))
	{
		if (func_145(sVar0))
		{
			ui::clear_help(1);
		}
	}
}

void func_202(int iParam0)//Position - 0xA5F3
{
	int iVar0;
	int iVar1;
	
	if (!entity::is_entity_dead(iParam0, 0))
	{
		ped::set_ped_combat_attributes(iParam0, 3, true);
		ped::set_ped_combat_attributes(iParam0, 1, false);
	}
	ai::task_clear_look_at(iParam0);
	if (entity::is_entity_playing_anim(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_loop_f", 3) || entity::is_entity_playing_anim(iParam0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_intro_f", 3))
	{
		iVar1 = true;
	}
	else
	{
		iVar1 = false;
	}
	ped::set_ped_flee_attributes(iParam0, 2, false);
	ai::clear_sequence_task(&iVar0);
	ai::open_sequence_task(&iVar0);
	if (iLocal_1989)
	{
		if (iVar1)
		{
			ai::task_play_anim(0, "ODDJOBS@ASSASSINATE@VICE@SEX", "frontseat_carsex_outro_f", 4f, -4f, 3500, 0, 0f, 0, 0, 0);
		}
	}
	else if (iVar1)
	{
		ai::task_play_anim(0, "ODDJOBS@ASSASSINATE@VICE@SEX", "FrontSeat_CarSex_Normal_Outro_f", 4f, -4f, -1, 0, 0f, 0, 0, 0);
	}
	ai::task_smart_flee_ped(0, player::player_ped_id(), 500f, -1, 0, 0);
	ai::close_sequence_task(iVar0);
	if (!entity::is_entity_dead(iParam0, 0))
	{
		ai::task_perform_sequence(iParam0, iVar0);
	}
	ai::clear_sequence_task(&iVar0);
}

void func_203(int iParam0)//Position - 0xA6DD
{
	streaming::set_model_as_no_longer_needed(Local_1684.f_16);
	streaming::set_model_as_no_longer_needed(joaat("s_f_y_hooker_02"));
	streaming::set_model_as_no_longer_needed(iLocal_2239);
	if (entity::does_entity_exist(*iParam0))
	{
		entity::set_ped_as_no_longer_needed(iParam0);
	}
	if (entity::does_entity_exist(iParam0->f_1[2]))
	{
		entity::set_ped_as_no_longer_needed(&(iParam0->f_1[2]));
	}
	if (entity::does_entity_exist(iParam0->f_6))
	{
		entity::set_ped_as_no_longer_needed(&(iParam0->f_6));
	}
	if (entity::does_entity_exist(iParam0->f_1[3]))
	{
		entity::set_ped_as_no_longer_needed(&(iParam0->f_1[3]));
	}
	if (entity::does_entity_exist(iParam0->f_1[0]))
	{
		entity::set_ped_as_no_longer_needed(&(iParam0->f_1[0]));
	}
	if (!entity::does_entity_exist(iParam0->f_1[1]))
	{
		entity::set_ped_as_no_longer_needed(&(iParam0->f_1[1]));
	}
}

bool func_204(var uParam0, int iParam1)//Position - 0xA786
{
	if (cam::is_screen_faded_in())
	{
		if (iParam1->f_274 != 0)
		{
			if (entity::does_entity_exist(*uParam0))
			{
				if (entity::is_entity_dead(*uParam0, 0))
				{
					unk1::_0x293220DA1B46CEBC(3f, 1073741824, 3);
					return true;
				}
			}
		}
		else if (entity::does_entity_exist(*uParam0))
		{
			if (ped::is_ped_injured(*uParam0))
			{
				if (vehicle::is_vehicle_driveable(uParam0->f_1, 0) && entity::has_entity_been_damaged_by_entity(*uParam0, uParam0->f_1, 1))
				{
					iLocal_1026 = 1;
				}
				else if (func_104(&iLocal_1034) && func_101(&iLocal_1034) < 3f)
				{
					iLocal_1026 = 1;
				}
				unk1::_0x293220DA1B46CEBC(3f, 1073741824, 3);
				return true;
			}
			else if (vehicle::is_vehicle_driveable(uParam0->f_1, 0))
			{
				if (ped::is_ped_in_vehicle(player::player_ped_id(), uParam0->f_1, 0))
				{
					if (entity::get_entity_speed(uParam0->f_1) > 10f && entity::is_entity_touching_entity(uParam0->f_1, *uParam0))
					{
						if (ped::is_ped_in_any_vehicle(*uParam0, 0))
						{
							ped::knock_ped_off_vehicle(*uParam0);
						}
						entity::set_entity_health(*uParam0, 0);
						iLocal_1026 = 1;
						unk1::_0x293220DA1B46CEBC(3f, 1073741824, 3);
						return true;
					}
				}
			}
		}
	}
	return false;
}

void func_205(var uParam0)//Position - 0xA899
{
	vector3 vVar0;
	vector3 vVar3;
	
	if (iLocal_1974 || iLocal_1982)
	{
		if (func_104(&iLocal_2077))
		{
			if (func_101(&iLocal_2077) > 2f)
			{
				if (!entity::is_entity_dead(player::player_ped_id(), 0))
				{
					if (ai::get_script_task_status(player::player_ped_id(), 150319005) == 1)
					{
						ai::task_clear_look_at(player::player_ped_id());
					}
				}
			}
		}
		return;
	}
	if (!ped::is_ped_injured(player::player_ped_id()) && !ped::is_ped_injured(Local_1044.f_7))
	{
		vVar0 = { entity::get_entity_coords(player::player_ped_id(), 1) };
		vVar3 = { entity::get_entity_coords(Local_1044.f_7, 1) };
	}
	if (system::vdist2(vVar0, vVar3) < 2500f)
	{
		if (!func_118())
		{
			if (!entity::is_entity_dead(player::player_ped_id(), 0))
			{
				ai::task_look_at_entity(player::player_ped_id(), Local_1044.f_7, 3000, 0, 2);
				if (!func_104(&iLocal_2077))
				{
					func_326(&iLocal_2077);
				}
				else
				{
					func_119(&iLocal_2077);
				}
			}
			func_168(&(uParam0->f_16), "OJASAUD", "OJAShk_FIND", 8, 0, 0, 0);
			func_206(&iLocal_2071, "ASS_HK_IDT");
			iLocal_1974 = 1;
		}
	}
}

void func_206(int iParam0, char* sParam1)//Position - 0xA9A2
{
	func_119(iParam0);
	StringCopy(&cLocal_1018, sParam1, 32);
}

void func_207(var uParam0)//Position - 0xA9B7
{
	int iVar0;
	
	if (iLocal_1973)
	{
		return;
	}
	if (func_215(iLocal_1028, Local_1044.f_8, &vLocal_122, &iLocal_133, 1, func_222(iLocal_1028), 0, 1, 1))
	{
		func_236(&Local_1044, &iLocal_2524, 0);
		func_226(Local_1501, &Local_1684, 2);
	}
	switch (iLocal_1042)
	{
		case 0:
			func_209();
			if (iLocal_1967)
			{
				func_210(uParam0, 1);
			}
			if (vehicle::is_vehicle_driveable(Local_1044.f_8, 0))
			{
				vehicle::remove_vehicle_window(Local_1044.f_8, 1);
				vehicle::remove_vehicle_window(Local_1044.f_8, 0);
			}
			system::settimera(0);
			iLocal_1042 = 1;
			break;
		
		case 1:
			if (system::timera() > 1700)
			{
				if (!ped::is_ped_injured(Local_1044.f_7))
				{
					if (!iLocal_1980)
					{
						if (func_168(&(Local_1044.f_16), "OJASAUD", "OJAShk_REG", 9, 0, 0, 0) || system::timera() > 5000)
						{
							iLocal_1980 = 1;
							system::settimera(0);
							iLocal_1042 = 6;
						}
					}
				}
			}
			else if (system::timera() > 1300)
			{
				if (!ped::is_ped_injured(iLocal_1028))
				{
					if (ai::get_script_task_status(iLocal_1028, 150319005) != 1)
					{
						ai::task_look_at_entity(iLocal_1028, Local_1044.f_7, 5000, 2048, 4);
						func_248(&(uParam0->f_16), 5, iLocal_1028, "KerbCrawler", 0, 1);
						if (!iLocal_1980)
						{
							if (func_168(&(Local_1044.f_16), "OJASAUD", "OJAShk_REG", 9, 0, 0, 0))
							{
								iLocal_1980 = 1;
								system::settimera(0);
								iLocal_1042 = 6;
							}
						}
					}
				}
			}
			break;
		
		case 6:
			if (system::timera() >= 2500)
			{
				if (!func_118())
				{
					if (!ped::is_ped_injured(iLocal_1028))
					{
						if (vehicle::is_vehicle_driveable(Local_1044.f_8, 0))
						{
							ai::open_sequence_task(&iVar0);
							ai::task_vehicle_mission_coors_target(0, uParam0->f_8, vLocal_2040, 4, 15f, 786597, 1f, -1f, 1);
							ai::task_vehicle_drive_wander(0, uParam0->f_8, 15f, 786597);
							ai::close_sequence_task(iVar0);
							ai::task_perform_sequence(iLocal_1028, iVar0);
							ai::clear_sequence_task(&iVar0);
							ped::set_ped_keep_task(iLocal_1028, true);
							func_208(&(uParam0->f_16), 5);
							iLocal_1973 = 1;
						}
					}
				}
			}
			break;
	}
}

void func_208(var uParam0, int iParam1)//Position - 0xABB1
{
	if ((uParam0[iParam1 /*10*/])->f_7 == 1)
	{
		(uParam0[iParam1 /*10*/])->f_7 = 0;
	}
}

int func_209()//Position - 0xABCE
{
	iLocal_144 = gameplay::get_game_timer();
	return iLocal_144;
}

void func_210(var uParam0, int iParam1)//Position - 0xABDE
{
	int iVar0;
	
	if (Local_1684.f_274 == 1)
	{
		if (!ped::is_ped_injured(uParam0->f_7))
		{
			entity::set_entity_coords(uParam0->f_7, -595.316f, -1809.967f, 22.102f, 1, false, 0, 1);
			entity::set_entity_heading(uParam0->f_7, 132.84f);
			ped::_0x2208438012482A1A(uParam0->f_7, 0, 0);
			ai::clear_sequence_task(&iVar0);
			ai::open_sequence_task(&iVar0);
			if (iParam1)
			{
				ai::task_play_anim(0, sLocal_2000, "idle_b", 4f, -4f, 10000, 0, 0f, 0, 0, 0);
			}
			ai::task_follow_nav_mesh_to_coord(0, -594.3811f, -1808.948f, 22.27985f, 1f, -1, 0.25f, 0, Local_1684.f_21);
			ai::task_play_anim(0, sLocal_2000, "idle_wait", 4f, -4f, -1, 1, 0f, 0, 0, 0);
			ai::close_sequence_task(iVar0);
			ai::task_perform_sequence(uParam0->f_7, iVar0);
			ai::clear_sequence_task(&iVar0);
		}
	}
}

void func_211()//Position - 0xACA8
{
	if (!func_39(vLocal_122.x, 2))
	{
		func_449(&vLocal_122, 2);
	}
}

void func_212(int iParam0, char* sParam1)//Position - 0xACC2
{
	if (player::is_player_wanted_level_greater(player::player_id(), 0))
	{
		if (ui::does_blip_exist(iParam0))
		{
			ui::remove_blip(&iParam0);
			ui::clear_prints();
			func_322(sParam1, 7500, 1);
		}
	}
}

float func_213(int iParam0, int iParam1)//Position - 0xACF3
{
	return func_153(player::get_player_ped(player::get_player_index()), iParam0, iParam1);
}

bool func_214(vector3 vParam0, float fParam3, vector3 vParam4, float fParam7)//Position - 0xAD0B
{
	if (func_244(vParam0, 1) <= fParam3 || func_244(vParam4, 1) <= fParam7)
	{
		return true;
	}
	return false;
}

bool func_215(int iParam0, int iParam1, var uParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8)//Position - 0xAD39
{
	int iVar0;
	int iVar1;
	
	iVar0 = player::player_ped_id();
	if (!entity::is_entity_dead(iVar0, 0) && !entity::is_entity_dead(iParam0, 0))
	{
		if (!func_39(*uParam2, 1))
		{
			if (func_221(iParam0, uParam2))
			{
				*iParam3 = 1;
				return true;
			}
		}
		if (!func_39(*uParam2, 2))
		{
			if (player::get_player_wanted_level(player::player_id()) > 0)
			{
				*iParam3 = 2;
				return true;
			}
		}
		if (!func_39(*uParam2, 4))
		{
			if (func_219(iVar0, iParam0, uParam2, iParam5))
			{
				*iParam3 = 4;
				return true;
			}
		}
		if (!func_39(*uParam2, 8))
		{
			if (func_218(iVar0, iParam0, uParam2))
			{
				*iParam3 = 8;
				return true;
			}
		}
		iVar1 = !func_39(*uParam2, 128);
		if (iParam4)
		{
			if (func_216(iParam0, iParam1, 1, iParam6, iVar1, 1))
			{
				*iParam3 = 32;
				return true;
			}
		}
		else if (!func_39(*uParam2, 16))
		{
			if (func_216(iParam0, iParam1, 0, iParam6, iVar1, iParam8))
			{
				*iParam3 = 16;
				return true;
			}
		}
	}
	else if (entity::does_entity_exist(iParam0))
	{
		if (iParam7 && entity::has_entity_been_damaged_by_entity(iParam0, iVar0, 1))
		{
			*iParam3 = 16;
			return true;
		}
	}
	return false;
}

bool func_216(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5)//Position - 0xAE63
{
	int iVar0;
	int iVar1;
	
	if (iParam3)
	{
		if (!iLocal_118)
		{
			iLocal_119 = entity::get_entity_health(iParam0);
			iLocal_118 = true;
		}
		iLocal_120 = entity::get_entity_health(iParam0);
		iLocal_121 = (iLocal_119 - iLocal_120);
		iVar0 = player::get_players_last_vehicle();
		if (!entity::is_entity_dead(iVar0, 0))
		{
			if (entity::has_entity_been_damaged_by_entity(iParam0, iVar0, 1))
			{
				if (IntToFloat(iLocal_121) > 100f)
				{
					return true;
				}
			}
		}
		if (iLocal_118)
		{
			if (entity::has_entity_been_damaged_by_entity(iParam0, player::player_ped_id(), 1))
			{
				if (IntToFloat(iLocal_121) > 100f)
				{
					return true;
				}
			}
		}
	}
	else if (entity::has_entity_been_damaged_by_entity(iParam0, player::player_ped_id(), 1))
	{
		return true;
	}
	if (!iParam3)
	{
		iVar1 = player::get_players_last_vehicle();
		if (!entity::is_entity_dead(iVar1, 0))
		{
			if (entity::has_entity_been_damaged_by_entity(iParam0, iVar1, 1))
			{
				return true;
			}
		}
	}
	if (iParam4)
	{
		if (!entity::is_entity_dead(iParam0, 0))
		{
			if (ped::is_ped_being_jacked(iParam0))
			{
				if (ped::get_peds_jacker(iParam0) == player::player_ped_id())
				{
					return true;
				}
			}
		}
	}
	if (iParam5)
	{
		if (ped::is_ped_in_melee_combat(player::player_ped_id()))
		{
			if (entity::is_entity_at_coord(iParam0, entity::get_entity_coords(player::player_ped_id(), 1), 10f, 10f, 10f, false, true, 0))
			{
				if (player::has_player_damaged_at_least_one_ped(player::player_id()))
				{
					return true;
				}
			}
		}
	}
	if (ped::is_ped_performing_stealth_kill(player::player_ped_id()))
	{
		if (ped::was_ped_killed_by_stealth(iParam0))
		{
			return true;
		}
	}
	if (func_217(player::player_ped_id(), iParam0))
	{
		return true;
	}
	if (iParam2)
	{
		if (ped::is_ped_ragdoll(iParam0) && func_213(iParam0, 1) < 1.5f)
		{
			return true;
		}
		else if (ped::is_ped_in_any_vehicle(iParam0, 0))
		{
			if (entity::is_entity_touching_entity(player::player_ped_id(), ped::get_vehicle_ped_is_in(iParam0, 0)))
			{
				return true;
			}
		}
		else if (entity::is_entity_touching_entity(player::player_ped_id(), iParam0))
		{
			return true;
		}
		if (!entity::is_entity_dead(iParam1, 0))
		{
			if (entity::has_entity_been_damaged_by_entity(iParam1, player::player_ped_id(), 1))
			{
				return true;
			}
		}
	}
	return false;
}

bool func_217(int iParam0, int iParam1)//Position - 0xB02B
{
	int iVar0;
	
	weapon::get_current_ped_weapon(iParam0, &iVar0, 1);
	if (iVar0 == joaat("weapon_petrolcan"))
	{
		if (ped::is_ped_shooting(iParam0))
		{
			if (system::vdist(entity::get_entity_coords(iParam0, 1), entity::get_entity_coords(iParam1, 1)) < 2.5f)
			{
				if (ped::is_ped_facing_ped(iParam0, iParam1, 180f))
				{
					return true;
				}
			}
		}
	}
	return false;
}

bool func_218(int iParam0, int iParam1, var uParam2)//Position - 0xB080
{
	if (weapon::is_ped_armed(iParam0, 4))
	{
		if (ped::is_ped_shooting(iParam0) && !weapon::is_ped_current_weapon_silenced(iParam0))
		{
			if (entity::is_entity_at_coord(iParam1, entity::get_entity_coords(iParam0, 1), IntToFloat(uParam2->f_4), IntToFloat(uParam2->f_4), IntToFloat(uParam2->f_4), false, true, 0))
			{
				return true;
			}
		}
	}
	return false;
}

bool func_219(int iParam0, int iParam1, var uParam2, int iParam3)//Position - 0xB0CE
{
	vector3 vVar0;
	int iVar3;
	
	iVar3 = 0;
	if (!entity::is_entity_dead(iParam1, 0))
	{
		vVar0 = { entity::get_entity_coords(iParam1, 1) };
	}
	if (gameplay::is_bullet_in_area(vVar0, 4f, 1))
	{
		return true;
	}
	if (gameplay::has_bullet_impacted_in_area(vVar0, system::to_float(uParam2->f_6), 1, 1))
	{
		return true;
	}
	if (weapon::is_ped_armed(iParam0, 2))
	{
		if (ped::is_ped_shooting(iParam0))
		{
			if (entity::is_entity_at_coord(iParam1, entity::get_entity_coords(iParam0, 1), IntToFloat(uParam2->f_6 * 3), IntToFloat(uParam2->f_6 * 3), IntToFloat(uParam2->f_6 * 3), false, true, 0))
			{
				if (ped::is_ped_facing_ped(entity::get_ped_index_from_entity_index(iParam1), iParam0, 120f) && entity::has_entity_clear_los_to_entity(iParam1, iParam0, 17))
				{
					return true;
				}
			}
		}
		else
		{
			if (ped::is_ped_in_any_vehicle(entity::get_ped_index_from_entity_index(iParam1), 0))
			{
				iVar3 = ped::get_vehicle_ped_is_in(entity::get_ped_index_from_entity_index(iParam1), 0);
			}
			if (ped::is_ped_planting_bomb(iParam0) || func_220(iVar3))
			{
				if (entity::is_entity_at_coord(iParam1, entity::get_entity_coords(iParam0, 1), IntToFloat(uParam2->f_6 * 3), IntToFloat(uParam2->f_6 * 3), IntToFloat(uParam2->f_6 * 3), false, true, 0))
				{
					if (ped::is_ped_facing_ped(entity::get_ped_index_from_entity_index(iParam1), iParam0, 120f) && entity::has_entity_clear_los_to_entity(iParam1, iParam0, 17))
					{
						return true;
					}
				}
			}
		}
	}
	if (iParam3)
	{
		if (gameplay::is_projectile_in_area((vVar0.x - IntToFloat(uParam2->f_6)), (vVar0.y - IntToFloat(uParam2->f_6)), (vVar0.y - IntToFloat(uParam2->f_6)), (vVar0.x + IntToFloat(uParam2->f_6)), (vVar0.y + IntToFloat(uParam2->f_6)), (vVar0.y + IntToFloat(uParam2->f_6)), 0))
		{
			return true;
		}
	}
	return false;
}

bool func_220(int iParam0)//Position - 0xB247
{
	int iVar0;
	int iVar1;
	
	if (entity::does_entity_exist(iParam0))
	{
		if (vehicle::is_vehicle_driveable(iParam0, 0))
		{
			if (vehicle::get_ped_in_vehicle_seat(iParam0, -1, 0) != 0)
			{
				if (weapon::get_current_ped_weapon(player::player_ped_id(), &iVar0, 1))
				{
					if (iVar0 == joaat("weapon_stickybomb"))
					{
						if (func_153(player::player_ped_id(), iParam0, 1) < 40f)
						{
							if (player::get_entity_player_is_free_aiming_at(player::player_id(), &iVar1))
							{
								if ((entity::is_entity_a_vehicle(iVar1) && entity::get_vehicle_index_from_entity_index(iVar1) == iParam0) || (entity::is_entity_a_ped(iVar1) && entity::get_ped_index_from_entity_index(iVar1) == vehicle::get_ped_in_vehicle_seat(iParam0, -1, 0)))
								{
									if ((ped::is_ped_on_foot(player::player_ped_id()) && controls::is_control_pressed(0, 24)) || (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0) && controls::is_control_pressed(0, 69)))
									{
										return true;
									}
								}
							}
						}
					}
				}
			}
		}
	}
	return false;
}

bool func_221(int iParam0, var uParam1)//Position - 0xB315
{
	if (!entity::is_entity_dead(iParam0, 0))
	{
		if (weapon::is_ped_armed(player::player_ped_id(), 6))
		{
			if (player::is_player_free_aiming_at_entity(player::player_id(), iParam0) || player::is_player_targetting_entity(player::player_id(), iParam0))
			{
				if (ped::is_ped_facing_ped(iParam0, player::player_ped_id(), 90f))
				{
					if (func_213(iParam0, 1) < uParam1->f_2)
					{
						if (uParam1->f_1 == 0)
						{
							uParam1->f_1 = gameplay::get_game_timer();
						}
						else if ((gameplay::get_game_timer() - uParam1->f_1) > uParam1->f_3)
						{
							return true;
						}
					}
				}
			}
		}
	}
	return false;
}

bool func_222(int iParam0)//Position - 0xB39A
{
	if (entity::does_entity_exist(iParam0))
	{
		if (ped::is_ped_in_any_vehicle(iParam0, 0))
		{
			return false;
		}
	}
	return true;
}

void func_223()//Position - 0xB3BA
{
	if (func_39(vLocal_122.x, 2))
	{
		func_224(&vLocal_122, 2);
	}
}

void func_224(var uParam0, int iParam1)//Position - 0xB3D3
{
	func_225(uParam0, iParam1);
}

void func_225(var uParam0, var uParam1)//Position - 0xB3E3
{
	*uParam0 = (*uParam0 - (*uParam0 && uParam1));
}

void func_226(struct<182> Param0, var uParam182, int iParam183, int iParam184)//Position - 0xB3F8
{
	struct<2> Var0;
	
	if (iParam183->f_270 == 0)
	{
		Param0.f_181 = iParam184;
		switch (Param0.f_181)
		{
			case 0:
				if (iParam183->f_274 == 1)
				{
					StringCopy(&Var0, "ASS_HK_LOST", 16);
				}
				else if (iParam183->f_274 == 0)
				{
					StringCopy(&Var0, "ASS_BS_LOST", 16);
				}
				else if (iParam183->f_274 == 2)
				{
					StringCopy(&Var0, "ASS_ML_LOST", 16);
				}
				break;
			
			case 1:
				if (iParam183->f_274 == 1)
				{
					StringCopy(&Var0, "ASS_HK_LOST", 16);
				}
				else if (iParam183->f_274 == 0)
				{
					StringCopy(&Var0, "ASS_BS_LEFTBUS", 16);
				}
				else if (iParam183->f_274 == 2)
				{
					StringCopy(&Var0, "ASS_ML_TIMEFAIL", 16);
				}
				break;
			
			case 2:
				if (iParam183->f_274 == 1)
				{
					StringCopy(&Var0, "ASS_HK_COVER", 16);
				}
				else if (iParam183->f_274 == 0)
				{
					StringCopy(&Var0, "ASS_BS_COVER", 16);
				}
				break;
			
			case 3:
				if (iParam183->f_274 == 0)
				{
					StringCopy(&Var0, "ASS_BS_VEHDEST", 16);
				}
				break;
			
			case 4:
				if (iParam183->f_274 == 1)
				{
					StringCopy(&Var0, "ASS_HK_ABAND", 16);
				}
				else if (iParam183->f_274 == 0)
				{
					StringCopy(&Var0, "ASS_BS_ABAND", 16);
				}
				break;
		}
		iParam183->f_270 = 1;
		func_234(&Var0);
		func_227(0);
	}
}

void func_227(int iParam0)//Position - 0xB523
{
	int iVar0;
	
	if (Global_101553.f_7940 || func_4(0))
	{
		iVar0 = func_42();
		if (!func_228(iVar0))
		{
			return;
		}
		gameplay::set_bit(&(Global_82491[iVar0 /*5*/].f_1), 5);
		Global_91442 = iParam0;
	}
}

bool func_228(int iParam0)//Position - 0xB568
{
	var uVar0;
	int iVar1;
	
	func_233();
	if (player::is_player_playing(player::player_id()))
	{
		player::start_firing_amnesty(5000);
	}
	uVar0 = Global_82491[iParam0 /*5*/];
	iVar1 = Global_69886.f_109[uVar0 /*4*/];
	func_232(iVar1, 1);
	player::_0xC9A763D8FE87436A(player::player_id());
	player::special_ability_deactivate(player::player_id());
	func_229(&(Global_101553.f_1991.f_539), iVar1);
	if (Global_85914 == Global_91443)
	{
		Global_101553.f_7940.f_330[iVar1 /*6*/].f_1++;
	}
	if (!gameplay::is_bit_set(Global_82527[iVar1 /*34*/].f_15, 1))
	{
		if (!player::is_player_playing(player::player_id()))
		{
			gameplay::set_fade_in_after_death_arrest(0);
		}
	}
	Global_101553.f_7940.f_330[iVar1 /*6*/].f_2++;
	Global_85914 = Global_91443;
	if (iParam0 == -1)
	{
		if (Global_101553.f_7940)
		{
		}
		return false;
	}
	if (gameplay::is_bit_set(Global_82491[iParam0 /*5*/].f_1, 4))
	{
		return false;
	}
	if (gameplay::is_bit_set(Global_82491[iParam0 /*5*/].f_1, 5))
	{
		return false;
	}
	return true;
}

void func_229(var uParam0, int iParam1)//Position - 0xB67F
{
	int iVar0;
	int iVar1;
	vector3 vVar2;
	float fVar5;
	
	if (iParam1 == 94)
	{
		return;
	}
	iVar0 = 0;
	while (iVar0 < 3)
	{
		iVar1 = Global_101553.f_17388[iVar0];
		if ((((iVar1 == 8 || iVar1 == 9) || iVar1 == 10) || (((iVar1 == 11 || iVar1 == 34) || iVar1 == 72) || iVar1 == 73)) && !gameplay::is_bit_set(Global_101553.f_7940.f_99.f_219[0], 9))
		{
		}
		else
		{
			vVar2 = { 0f, 0f, 0f };
			fVar5 = 0f;
			if (!func_231(Global_101553.f_17388[iVar0], &vVar2, &fVar5))
			{
				Global_101553.f_17388[iVar0] = 318;
				func_230(&(uParam0->f_1524[iVar0]));
				uParam0->f_1528[iVar0 /*3*/] = { 0f, 0f, 0f };
				uParam0->f_1538[iVar0] = 0f;
				uParam0->f_1542[iVar0] = 0;
				uParam0->f_1546[iVar0 /*3*/] = { 0f, 0f, 0f };
				uParam0->f_1556[iVar0] = 0;
				Global_89129[iVar0 /*29*/] = { 0f, 0f, 0f };
				Global_89129[iVar0 /*29*/].f_9 = 0f;
				Global_89129[iVar0 /*29*/].f_12 = 0f;
				Global_89129[iVar0 /*29*/].f_3 = { 0f, 0f, 0f };
				Global_89129[iVar0 /*29*/].f_10 = 0f;
				Global_89129[iVar0 /*29*/].f_13 = 0f;
				Global_89129[iVar0 /*29*/].f_6 = { 0f, 0f, 0f };
				Global_89129[iVar0 /*29*/].f_11 = 0f;
				Global_89129[iVar0 /*29*/].f_14 = 0f;
				Global_89129[iVar0 /*29*/].f_17 = { 0f, 0f, 0f };
				Global_89129[iVar0 /*29*/].f_26 = 0f;
				Global_89129[iVar0 /*29*/].f_20 = { 0f, 0f, 0f };
				Global_89129[iVar0 /*29*/].f_27 = 0f;
				Global_89129[iVar0 /*29*/].f_23 = { 0f, 0f, 0f };
				Global_89129[iVar0 /*29*/].f_28 = 0f;
			}
		}
		iVar0++;
	}
}

void func_230(var uParam0)//Position - 0xB848
{
	*uParam0 = -15;
}

int func_231(int iParam0, var uParam1, float fParam2)//Position - 0xB856
{
	switch (iParam0)
	{
		case 11:
			*uParam1 = { 115.1569f, -1286.684f, 28.2613f };
			*fParam2 = 111f;
			return 1;
			break;
		
		case 8:
			*uParam1 = { -90.0089f, -1324.195f, 28.3203f };
			*fParam2 = 194.1887f;
			return 1;
			break;
		
		case 9:
			return func_231(8, uParam1, fParam2);
			break;
		
		case 10:
			return func_231(8, uParam1, fParam2);
			break;
		
		case 13:
			*uParam1 = { -807.2979f, -48.4004f, 36.8173f };
			*fParam2 = 201.6328f;
			return 1;
			break;
		
		case 14:
			*uParam1 = { 1432.34f, -1887.383f, 70.5768f };
			*fParam2 = 350.0509f;
			return 1;
			break;
		
		case 15:
			*uParam1 = { 1666.204f, 1967.25f, 143.3213f };
			*fParam2 = 0.7896f;
			return 1;
			break;
		
		case 12:
			*uParam1 = { -1440.22f, -127.02f, 50f };
			*fParam2 = 42f;
			return 1;
			break;
		
		case 16:
			*uParam1 = { 135.055f, -1759.64f, 27.8957f };
			*fParam2 = -129f;
			return 1;
			break;
		
		case 17:
			*uParam1 = { 687.6992f, -1744.03f, 28.3624f };
			*fParam2 = 267.1409f;
			return 1;
			break;
		
		case 18:
			*uParam1 = { 56.5117f, -744.6122f, 43.1356f };
			*fParam2 = 340.0526f;
			return 1;
			break;
		
		case 19:
			*uParam1 = { 506.485f, -1884.967f, 24.764f };
			*fParam2 = 22.9566f;
			return 1;
			break;
		
		case 20:
			*uParam1 = { 1555.958f, 953.6136f, 77.2063f };
			*fParam2 = 152.8118f;
			return 1;
			break;
		
		case 21:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 22:
			*uParam1 = { 220.72f, -64.4177f, 68.2922f };
			*fParam2 = (250.4535f - 360f);
			return 1;
			break;
		
		case 74:
			*uParam1 = { 2048.07f, 3840.84f, 34.2238f };
			*fParam2 = 119.603f;
			return 1;
			break;
		
		case 23:
			*uParam1 = { -464.22f, -1592.98f, 38.73f };
			*fParam2 = 168f;
			return 1;
			break;
		
		case 24:
			*uParam1 = { (744.79f + 0.0186f), (-465.86f - 0.0114f), 36.6399f };
			*fParam2 = 51.7279f;
			return 1;
			break;
		
		case 67:
			*uParam1 = { -9f, 508.1f, 173.6278f };
			*fParam2 = 151.2504f;
			return 1;
			break;
		
		case 25:
			*uParam1 = { 72.2278f, -1464.68f, 28.2915f };
			*fParam2 = 156.8827f;
			return 1;
			break;
		
		case 27:
			*uParam1 = { 763f, -906f, 24.2312f };
			*fParam2 = 7.2736f;
			return 1;
			break;
		
		case 26:
			*uParam1 = { 257.9167f, -1120.786f, 28.3684f };
			*fParam2 = 97.2736f;
			return 1;
			break;
		
		case 28:
			*uParam1 = { 422.5858f, -978.6332f, 69.7073f };
			*fParam2 = 4f;
			return 1;
			break;
		
		case 29:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 30:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 31:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 32:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 33:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 34:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 35:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 36:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 37:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 58:
			*uParam1 = { 294.8521f, 882.9366f, 197.8527f };
			*fParam2 = 162.693f;
			return 1;
			break;
		
		case 59:
			*uParam1 = { -1771.802f, 794.4316f, 138.4211f };
			*fParam2 = 128.9946f;
			return 1;
			break;
		
		case 60:
			*uParam1 = { 1495.595f, -1848.821f, 70.2075f };
			*fParam2 = 32.2721f;
			return 1;
			break;
		
		case 38:
			*uParam1 = { 2897.554f, 4032.241f, 50.1419f };
			*fParam2 = 192.8091f;
			return 1;
			break;
		
		case 39:
			*uParam1 = { 1973.355f, 3818.204f, 32.005f };
			*fParam2 = 32f;
			return 1;
			break;
		
		case 40:
			*uParam1 = { 1973.355f, 3818.204f, 32.005f };
			*fParam2 = 32f;
			return 1;
			break;
		
		case 41:
			*uParam1 = { 1397f, 3725.8f, 33.0673f };
			*fParam2 = -3.7534f;
			return 1;
			break;
		
		case 42:
			*uParam1 = { Vector(4.0205f, -2975.341f, 798.4536f) + Vector(1f, 0f, 0f) };
			*fParam2 = 90f;
			return 1;
			break;
		
		case 43:
			*uParam1 = { 709.0244f, -2916.479f, 5.0589f };
			*fParam2 = 355.326f;
			return 1;
			break;
		
		case 44:
			*uParam1 = { 643.5248f, -2917.325f, 5.1337f };
			*fParam2 = 334.1068f;
			return 1;
			break;
		
		case 45:
			*uParam1 = { 595.2742f, -2819.183f, 5.0559f };
			*fParam2 = 46.8853f;
			return 1;
			break;
		
		case 46:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 47:
			*uParam1 = { 314.4171f, 965.207f, 208.4024f };
			*fParam2 = 165.9421f;
			return 1;
			break;
		
		case 49:
			*uParam1 = { 3321.537f, 4975.455f, 25.9097f };
			*fParam2 = 221.228f;
			return 1;
			break;
		
		case 48:
			*uParam1 = { -111.1318f, 6316.479f, 30.4904f };
			*fParam2 = (42f + 180f);
			return 1;
			break;
		
		case 50:
			*uParam1 = { -731.3261f, 106.68f, 54.7169f };
			*fParam2 = 98.9764f;
			return 1;
			break;
		
		case 51:
			*uParam1 = { -1257.5f, -526.9999f, 30.2361f };
			*fParam2 = 220.9554f;
			return 1;
			break;
		
		case 52:
			*uParam1 = { 736.9869f, -2050.678f, 28.2718f };
			*fParam2 = 83.9922f;
			return 1;
			break;
		
		case 66:
			*uParam1 = { 262.5499f, -2540.15f, 4.8433f };
			*fParam2 = -64.1366f;
			return 1;
			break;
		
		case 53:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 55:
			*uParam1 = { -315.7789f, 6201.355f, 30.4322f };
			*fParam2 = 127.7547f;
			return 1;
			break;
		
		case 56:
			*uParam1 = { 118.0988f, -1264.916f, 32.3637f };
			*fParam2 = -63f;
			return 1;
			break;
		
		case 57:
			*uParam1 = { 37.5988f, -1351.52f, 28.2954f };
			*fParam2 = 90.0339f;
			return 1;
			break;
		
		case 61:
			*uParam1 = { -558.2693f, 261.1167f, 82.07f };
			*fParam2 = 84.6231f;
			return 1;
			break;
		
		case 62:
			*uParam1 = { -196.9999f, 507.9999f, 132.477f };
			*fParam2 = 99.6049f;
			return 1;
			break;
		
		case 63:
			*uParam1 = { 1312.01f, -1645.87f, 51.2f };
			*fParam2 = 120f;
			return 1;
			break;
		
		case 68:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 69:
			*uParam1 = { -818.7374f, 6.4824f, 41.2432f };
			*fParam2 = 211.8223f;
			return 1;
			break;
		
		case 64:
			*uParam1 = { 2091.258f, 4714.852f, 40.1936f };
			*fParam2 = 136.0867f;
			return 1;
			break;
		
		case 54:
			*uParam1 = { 1762.59f, 3247.212f, 40.735f };
			*fParam2 = 27.0648f;
			return 1;
			break;
		
		case 65:
			*uParam1 = { 1764.013f, 3252.902f, 40.735f };
			*fParam2 = 27.0648f;
			return 1;
			break;
		
		case 70:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 71:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 72:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 73:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		default:
			break;
	}
	return 0;
}

void func_232(int iParam0, int iParam1)//Position - 0xC1C6
{
	if (iParam1)
	{
		if ((iParam0 != 88 && iParam0 != 89) && iParam0 != 92)
		{
			Global_85724[iParam0 /*2*/] = 1;
		}
	}
	else
	{
		Global_85724[iParam0 /*2*/] = 0;
	}
}

void func_233()//Position - 0xC204
{
	Global_91441 = 1;
	if (player::is_player_being_arrested(player::player_id(), 1))
	{
		if (gameplay::is_string_null_or_empty(&Global_69849))
		{
			switch (func_34())
			{
				case 0:
					StringCopy(&Global_69849, "CMN_MARRE", 16);
					break;
				
				case 1:
					StringCopy(&Global_69849, "CMN_FARRE", 16);
					break;
				
				case 2:
					StringCopy(&Global_69849, "CMN_TARRE", 16);
					break;
			}
			StringCopy(&Global_69853, "", 16);
		}
		Global_91441 = 0;
	}
	else if (!player::is_player_playing(player::player_id()))
	{
		if (gameplay::is_string_null_or_empty(&Global_69849))
		{
			switch (func_34())
			{
				case 0:
					StringCopy(&Global_69849, "CMN_MDIED", 16);
					break;
				
				case 1:
					StringCopy(&Global_69849, "CMN_FDIED", 16);
					break;
				
				case 2:
					StringCopy(&Global_69849, "CMN_TDIED", 16);
					break;
			}
			StringCopy(&Global_69853, "", 16);
		}
		Global_91441 = 0;
		gameplay::set_bit(&(Global_91406.f_20), 25);
	}
}

void func_234(char* sParam0)//Position - 0xC2F1
{
	func_449(&(Global_101553.f_18818.f_1), 1024);
	if (!gameplay::is_string_null(sParam0))
	{
		func_235(sParam0);
	}
}

void func_235(char* sParam0)//Position - 0xC319
{
	if (!gameplay::is_string_null_or_empty(sParam0))
	{
		if (ui::get_length_of_literal_string(sParam0) <= 16)
		{
			StringCopy(&Global_69849, sParam0, 16);
			StringCopy(&Global_69853, "", 16);
			if (unk1::_is_recording())
			{
				unk1::_stop_recording_and_save_clip();
			}
		}
	}
}

void func_236(int iParam0, int iParam1, int iParam2)//Position - 0xC358
{
	if (!ped::is_ped_injured(iParam0->f_9))
	{
		ai::clear_ped_tasks(iParam0->f_9);
		if (ped::is_ped_in_any_vehicle(iParam0->f_9, 0))
		{
			ai::task_vehicle_mission_coors_target(iParam0->f_9, ped::get_vehicle_ped_is_in(iParam0->f_9, 0), entity::get_entity_coords(player::player_ped_id(), 1), 8, 15f, 786468, 9999f, -1f, 1);
		}
		else
		{
			ai::task_smart_flee_ped(iParam0->f_9, player::player_ped_id(), 500f, -1, 0, 0);
		}
		ped::set_ped_keep_task(iParam0->f_9, true);
	}
	if (!ped::is_ped_injured(iParam0->f_7))
	{
		ai::task_smart_flee_ped(iParam0->f_7, player::player_ped_id(), 500f, -1, 0, 0);
		ped::set_ped_keep_task(iParam0->f_7, true);
		func_193();
		audio::play_pain(iParam0->f_7, 7, 0f, 0);
	}
	if (player::get_player_wanted_level(player::player_id()) > 0)
	{
		iParam2 = true;
	}
	if (!ped::is_ped_injured(*iParam1))
	{
		if (iLocal_133 != 32)
		{
			ai::task_smart_flee_ped(*iParam1, player::player_ped_id(), 500f, -1, 0, 0);
		}
		ped::set_ped_keep_task(*iParam1, true);
	}
	if (!ped::is_ped_injured(iParam1->f_1[2]))
	{
		if (iLocal_133 != 32)
		{
			ai::task_smart_flee_ped(iParam1->f_1[2], player::player_ped_id(), 500f, -1, 0, 0);
		}
		if (iParam2)
		{
			ped::set_ped_keep_task(iParam1->f_1[2], true);
		}
	}
	if (!ped::is_ped_injured(iParam1->f_6))
	{
		if (iLocal_133 != 32)
		{
			ai::task_smart_flee_ped(iParam1->f_6, player::player_ped_id(), 500f, -1, 0, 0);
		}
		if (iParam2)
		{
			ped::set_ped_keep_task(iParam1->f_6, true);
		}
	}
	if (!ped::is_ped_injured(iParam1->f_1[3]))
	{
		if (iLocal_133 != 32)
		{
			ai::task_smart_flee_ped(iParam1->f_1[3], player::player_ped_id(), 500f, -1, 0, 0);
		}
		if (iParam2)
		{
			ped::set_ped_keep_task(iParam1->f_1[3], true);
		}
	}
	if (!ped::is_ped_injured(iParam1->f_1[0]))
	{
		if (iLocal_133 != 32)
		{
			ai::task_smart_flee_ped(iParam1->f_1[0], player::player_ped_id(), 500f, -1, 0, 0);
		}
		if (iParam2)
		{
			ped::set_ped_keep_task(iParam1->f_1[0], true);
		}
	}
	if (!ped::is_ped_injured(iParam1->f_1[1]))
	{
		if (iLocal_133 != 32)
		{
			ai::task_smart_flee_ped(iParam1->f_1[1], player::player_ped_id(), 500f, -1, 0, 0);
		}
		if (iParam2)
		{
			ped::set_ped_keep_task(iParam1->f_1[1], true);
		}
	}
}

bool func_237(var uParam0, var uParam1, int iParam2)//Position - 0xC56D
{
	if (iParam2)
	{
		if (func_190(uParam1, uParam0, &uLocal_2002, 1, &uLocal_1988))
		{
			return true;
		}
	}
	else if (func_190(uParam1, uParam0, &uLocal_2002, 0, &uLocal_1988))
	{
		return true;
	}
	return false;
}

void func_238(int iParam0, var uParam1, int iParam2)//Position - 0xC5AA
{
	int iVar0;
	
	if (!entity::does_entity_exist(uParam1->f_7))
	{
		if (iParam0->f_14 != 0)
		{
			uParam1->f_7 = ped::create_ped(5, iParam0->f_14, iParam0->f_18, iParam0->f_21, 1, true);
			func_241(uParam1->f_7);
			ai::task_play_anim(uParam1->f_7, "amb@world_human_prostitute@hooker@idle_a", "idle_a", 4f, -4f, -1, 1, 0f, 0, 0, 0);
			ped::set_ped_can_use_auto_conversation_lookat(uParam1->f_7, 1);
			func_248(&(uParam1->f_16), 4, uParam1->f_7, "OJAhkHOOKER", 0, 1);
			ped::set_blocking_of_non_temporary_events(uParam1->f_7, true);
			ped::set_ped_combat_attributes(uParam1->f_7, 17, true);
			ped::set_ped_flee_attributes(uParam1->f_7, 128, true);
			ped::set_ped_config_flag(uParam1->f_7, 134, true);
			ped::set_ped_can_be_targetted(uParam1->f_7, false);
		}
	}
	if (!entity::does_entity_exist(iLocal_1028))
	{
		if (iParam0->f_15 != 0)
		{
			uParam1->f_8 = vehicle::create_vehicle(iParam0->f_15, iParam0->f_26, iParam0->f_29, 1, true);
			vehicle::set_vehicle_extra(uParam1->f_8, 3, false);
			vehicle::remove_vehicle_window(uParam1->f_8, 1);
			vehicle::remove_vehicle_window(uParam1->f_8, 0);
			iLocal_1028 = ped::create_ped_inside_vehicle(uParam1->f_8, 4, iParam0->f_16, -1, 1, true);
			ped::set_blocking_of_non_temporary_events(iLocal_1028, true);
			func_248(&(Local_1044.f_16), 5, iLocal_1028, "KerbCrawler", 0, 1);
		}
	}
	func_325(iParam0, uParam1, iParam2);
	if (!func_137(uParam1->f_3, func_240(), 0))
	{
		func_323(&(uParam1->f_2), uParam1->f_3, uParam1->f_6);
	}
	iVar0 = 0;
	while (iVar0 < 4)
	{
		if (!func_239(iParam0->f_249[iVar0 /*3*/]))
		{
			uParam1->f_11[iVar0] = object::create_object(iParam0->f_244[iVar0], iParam0->f_249[iVar0 /*3*/], 1, true, false);
			if (iVar0 == 1)
			{
				entity::freeze_entity_position(uParam1->f_11[iVar0], true);
			}
			if (iParam0->f_262[iVar0] != 0f)
			{
				entity::set_entity_heading(uParam1->f_11[iVar0], iParam0->f_262[iVar0]);
			}
		}
		iVar0++;
	}
}

bool func_239(vector3 vParam0)//Position - 0xC771
{
	if ((vParam0.x == 0f && vParam0.y == 0f) && vParam0.y == 0f)
	{
		return true;
	}
	return false;
}

Vector3 func_240()//Position - 0xC79B
{
	vector3 vVar0;
	
	return vVar0;
}

void func_241(int iParam0)//Position - 0xC7A7
{
	ped::set_ped_component_variation(iParam0, 0, 0, 0, 0);
	ped::set_ped_component_variation(iParam0, 2, 2, 0, 0);
	ped::set_ped_component_variation(iParam0, 3, 0, 1, 0);
	ped::set_ped_component_variation(iParam0, 4, 0, 2, 0);
	ped::set_ped_component_variation(iParam0, 8, 0, 0, 0);
}

void func_242(var uParam0, int iParam1)//Position - 0xC7E2
{
	if (!entity::does_entity_exist(*iParam1))
	{
		*iParam1 = ped::create_ped(4, Local_1684.f_16, -586.5785f, -1802.659f, 22.0327f, 355.9268f, 1, true);
		ped::set_ped_combat_attributes(*iParam1, 17, true);
		ai::task_play_anim(*iParam1, "ODDJOBS@ASSASSINATE@VICE@HOOKER", "argue_a", 8f, -8f, -1, 1, 0f, 0, 0, 0);
		func_248(&(uParam0->f_16), 8, *iParam1, "OJAhkPIMP", 0, 1);
		ped::set_blocking_of_non_temporary_events(*iParam1, true);
		ped::set_ped_can_be_targetted(*iParam1, false);
	}
	if (!entity::does_entity_exist(iParam1->f_1[2]))
	{
		iParam1->f_1[2] = ped::create_ped(5, joaat("s_f_y_hooker_02"), -586.5862f, -1801.684f, 22.0134f, 197.3808f, 1, true);
		ped::set_ped_combat_attributes(iParam1->f_1[2], 17, true);
		ai::task_play_anim(iParam1->f_1[2], "ODDJOBS@ASSASSINATE@VICE@HOOKER", "argue_b", 8f, -8f, -1, 1, 0f, 0, 0, 0);
		ped::set_blocking_of_non_temporary_events(iParam1->f_1[2], true);
		ped::set_ped_can_be_targetted(iParam1->f_1[2], false);
	}
	if (!entity::does_entity_exist(iParam1->f_6))
	{
		iParam1->f_6 = ped::create_ped(4, Local_1684.f_16, -602.4943f, -1792.189f, 22.5209f, 212.304f, 1, true);
		ped::set_ped_combat_attributes(iParam1->f_6, 17, true);
		ai::task_play_anim(iParam1->f_6, "ODDJOBS@ASSASSINATE@VICE@DEALER", "idle_a", 8f, -8f, -1, 1, 0f, 0, 0, 0);
		func_248(&(uParam0->f_16), 7, iParam1->f_6, "OJAhkDealer", 0, 1);
		ped::set_blocking_of_non_temporary_events(iParam1->f_6, true);
		ped::set_ped_can_be_targetted(iParam1->f_6, false);
	}
	if (!entity::does_entity_exist(iParam1->f_1[3]))
	{
		iParam1->f_1[3] = ped::create_ped(5, joaat("s_f_y_hooker_02"), -602.1377f, -1793.484f, 22.4829f, 14.4277f, 1, true);
		ped::set_ped_combat_attributes(iParam1->f_1[3], 17, true);
		ai::task_play_anim(iParam1->f_1[3], "ODDJOBS@ASSASSINATE@VICE@HOOKER", "hooker_a", 8f, -8f, -1, 1, 0f, 0, 0, 0);
		ped::set_blocking_of_non_temporary_events(iParam1->f_1[3], true);
		ped::set_ped_can_be_targetted(iParam1->f_1[3], false);
	}
	if (!entity::does_entity_exist(iParam1->f_1[0]))
	{
		iParam1->f_1[0] = ped::create_ped(5, joaat("s_f_y_hooker_02"), -618.6262f, -1795.139f, 22.7487f, 157.3886f, 1, true);
		ped::set_ped_combat_attributes(iParam1->f_1[0], 17, true);
		ai::task_play_anim(iParam1->f_1[0], "ODDJOBS@ASSASSINATE@VICE@HOOKER", "hooker_a", 8f, -8f, -1, 1, 0f, 0, 0, 0);
		func_248(&(uParam0->f_16), 6, iParam1->f_1[0], "OJAhkHOOKER2", 0, 1);
		ped::set_blocking_of_non_temporary_events(iParam1->f_1[0], true);
		ped::set_ped_can_be_targetted(iParam1->f_1[0], false);
	}
	if (!entity::does_entity_exist(iParam1->f_1[1]))
	{
		iParam1->f_1[1] = ped::create_ped(5, joaat("s_f_y_hooker_02"), -620.7957f, -1794.642f, 22.7487f, 213.714f, 1, true);
		ped::set_ped_combat_attributes(iParam1->f_1[1], 17, true);
		ai::task_play_anim(iParam1->f_1[1], "ODDJOBS@ASSASSINATE@VICE@HOOKER", "hooker_c", 8f, -8f, -1, 1, 0f, 0, 0, 0);
		ped::set_blocking_of_non_temporary_events(iParam1->f_1[1], true);
		ped::set_ped_can_be_targetted(iParam1->f_1[1], false);
	}
	if (!entity::does_entity_exist(iLocal_2009))
	{
		iLocal_2009 = vehicle::create_vehicle(joaat("ruiner"), -598.1845f, -1790.477f, 22.612f, 308.4139f, 1, true);
		streaming::set_model_as_no_longer_needed(joaat("ruiner"));
	}
}

int func_243()//Position - 0xCB2C
{
	int iVar0;
	
	streaming::request_model(Local_1684.f_14);
	streaming::request_model(Local_1684.f_16);
	streaming::request_model(joaat("s_f_y_hooker_02"));
	streaming::request_model(iLocal_2239);
	if (((streaming::has_model_loaded(Local_1684.f_14) && streaming::has_model_loaded(Local_1684.f_16)) && streaming::has_model_loaded(joaat("s_f_y_hooker_02"))) && streaming::has_model_loaded(iLocal_2239))
	{
		iVar0 = 1;
	}
	else
	{
		iVar0 = 0;
	}
	return iVar0;
}

float func_244(vector3 vParam0, int iParam3)//Position - 0xCB95
{
	return func_245(player::get_player_ped(player::get_player_index()), vParam0, iParam3);
}

float func_245(int iParam0, vector3 vParam1, int iParam4)//Position - 0xCBAF
{
	if (entity::is_entity_dead(iParam0, 0))
	{
		return -1f;
	}
	return gameplay::get_distance_between_coords(entity::get_entity_coords(iParam0, 1), vParam1, iParam4);
}

void func_246()//Position - 0xCBD9
{
	if (!entity::does_entity_exist(iLocal_2010))
	{
		if (!entity::is_entity_dead(player::player_ped_id(), 0))
		{
			if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
			{
				iLocal_2010 = ped::get_vehicle_ped_is_in(player::player_ped_id(), 0);
				if (entity::does_entity_exist(iLocal_2010) && !entity::is_entity_dead(iLocal_2010, 0))
				{
					func_249(iLocal_2010);
				}
			}
		}
	}
}

void func_247()//Position - 0xCC30
{
	vector3 vVar0;
	
	if (!entity::does_entity_exist(iLocal_1463))
	{
		return;
	}
	if (!entity::is_entity_dead(player::player_ped_id(), 0))
	{
		vVar0 = { entity::get_entity_coords(player::player_ped_id(), 1) };
	}
	if (system::vdist2(vVar0, vLocal_1465) > 10000f)
	{
		if (entity::does_entity_exist(iLocal_1463))
		{
			streaming::set_model_as_no_longer_needed(-1559354806);
			object::delete_object(&iLocal_1463);
		}
		if (entity::does_entity_exist(iLocal_1462))
		{
			entity::set_entity_visible(iLocal_1462, true, 0);
			entity::set_entity_collision(iLocal_1462, true, 0);
		}
	}
}

void func_248(var uParam0, int iParam1, int iParam2, char* sParam3, int iParam4, int iParam5)//Position - 0xCCAC
{
	if ((uParam0[iParam1 /*10*/])->f_7 == 1)
	{
	}
	(*uParam0)[iParam1 /*10*/] = iParam2;
	StringCopy(&((uParam0[iParam1 /*10*/])->f_1), sParam3, 24);
	(uParam0[iParam1 /*10*/])->f_7 = 1;
	(uParam0[iParam1 /*10*/])->f_8 = iParam4;
	(uParam0[iParam1 /*10*/])->f_9 = iParam5;
	if (!Global_69617)
	{
		if (!ped::is_ped_injured(iParam2))
		{
			if ((uParam0[iParam1 /*10*/])->f_8 == 0)
			{
				ped::set_ped_can_play_ambient_anims(iParam2, 0);
			}
			else
			{
				ped::set_ped_can_play_ambient_anims(iParam2, 1);
			}
		}
		if (!ped::is_ped_injured(iParam2))
		{
			if ((uParam0[iParam1 /*10*/])->f_9 == 0)
			{
				ped::set_ped_can_use_auto_conversation_lookat(iParam2, 0);
			}
			else
			{
				ped::set_ped_can_use_auto_conversation_lookat(iParam2, 1);
			}
		}
	}
}

void func_249(int iParam0)//Position - 0xCD47
{
	func_250(&(Global_95894.f_2311), &Global_95894, iParam0, 1);
}

bool func_250(var uParam0, var uParam1, int iParam2, int iParam3)//Position - 0xCD62
{
	if (vehicle::is_vehicle_driveable(iParam2, 0))
	{
		func_252(uParam0, iParam2, iParam3);
		uParam1->f_4 = iParam2;
		if (func_251(iParam2))
		{
			uParam1->f_3 = 1;
		}
		else
		{
			uParam1->f_3 = 0;
		}
		return true;
	}
	return false;
}

bool func_251(int iParam0)//Position - 0xCDA2
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 <= 6)
	{
		if (Global_91406.f_22[iVar0] == iParam0)
		{
			return true;
		}
		iVar0++;
	}
	return false;
}

void func_252(var uParam0, int iParam1, int iParam2)//Position - 0xCDD0
{
	func_258(iParam1, &(uParam0->f_12));
	uParam0->f_7 = func_255(iParam1, 145, 0);
	uParam0->f_11 = func_254(iParam1);
	if (!uParam0->f_7)
	{
		if (!uParam0->f_10)
		{
			uParam0->f_10 = func_253(iParam1);
		}
	}
	if (iParam2 == 1)
	{
		*uParam0 = { entity::get_entity_coords(iParam1, 1) };
		uParam0->f_6 = entity::get_entity_heading(iParam1);
		uParam0->f_3 = { entity::get_entity_velocity(iParam1) };
		if (entity::is_entity_in_angled_area(iParam1, -1154.326f, -1523.871f, 3.262189f, -1158.453f, -1517.75f, 6.374244f, 13f, 0, true, 0))
		{
			*uParam0 = { -1160.095f, -1515.407f, 3.1496f };
			uParam0->f_6 = 305.6424f;
		}
		if (Global_69351 == iParam1)
		{
			uParam0->f_9 = 1;
		}
	}
	if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
	{
		uParam0->f_8 = 1;
	}
	else
	{
		uParam0->f_8 = 0;
	}
}

bool func_253(int iParam0)//Position - 0xCEAC
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if (entity::does_entity_exist(Global_68446.f_484[iVar0]))
		{
			if (iParam0 == Global_68446.f_484[iVar0])
			{
				return true;
			}
		}
		iVar0++;
	}
	return false;
}

int func_254(int iParam0)//Position - 0xCEEE
{
	int iVar0;
	
	if (!entity::does_entity_exist(iParam0))
	{
		return 145;
	}
	if (!vehicle::is_vehicle_driveable(iParam0, 0))
	{
		return 145;
	}
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (entity::does_entity_exist(Global_89070[iVar0]))
		{
			if (Global_89070[iVar0] == iParam0)
			{
				return Global_89080[iVar0];
			}
		}
		iVar0++;
	}
	return 145;
}

bool func_255(int iParam0, int iParam1, int iParam2)//Position - 0xCF51
{
	int iVar0;
	
	if (!entity::does_entity_exist(iParam0))
	{
		return false;
	}
	if (!vehicle::is_vehicle_driveable(iParam0, 0))
	{
		return false;
	}
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (entity::does_entity_exist(Global_89070[iVar0]))
		{
			if (Global_89070[iVar0] == iParam0)
			{
				if (iParam1 == 145 || iParam1 == Global_89080[iVar0])
				{
					if (iParam2 == 0 || entity::get_entity_model(iParam0) == func_256(iParam1, iParam2))
					{
						return true;
					}
				}
			}
		}
		iVar0++;
	}
	return false;
}

int func_256(int iParam0, int iParam1)//Position - 0xCFDF
{
	struct<82> Var0;
	
	if (func_36(iParam0))
	{
		Var0.f_11 = 12;
		Var0.f_31 = 49;
		Var0.f_81 = 2;
		func_257(iParam0, &Var0, iParam1);
		return Var0;
	}
	else if (iParam0 != 145)
	{
	}
	return 0;
}

void func_257(int iParam0, var uParam1, int iParam2)//Position - 0xD021
{
	int iVar0;
	
	uParam1->f_88 = 1;
	uParam1->f_84 = 255;
	uParam1->f_85 = 255;
	uParam1->f_86 = 255;
	uParam1->f_97 = 1;
	uParam1->f_3 = 1000;
	uParam1->f_1 = 0;
	switch (iParam0)
	{
		case 0:
			iVar0 = joaat("tailgater");
			if (Global_101553.f_7940.f_99.f_58[128] && !Global_101553.f_7940.f_99.f_58[131])
			{
				iVar0 = joaat("premier");
			}
			switch (iVar0)
			{
				case joaat("tailgater"):
					*uParam1 = iVar0;
					uParam1->f_2 = 3f;
					uParam1->f_4 = 0;
					uParam1->f_9 = 1;
					uParam1->f_11[0] = 1;
					StringCopy(&(uParam1->f_27), "5MDS003", 16);
					break;
				
				case joaat("premier"):
					*uParam1 = iVar0;
					uParam1->f_2 = 14.9f;
					uParam1->f_5 = 43;
					uParam1->f_6 = 43;
					uParam1->f_7 = 0;
					uParam1->f_8 = 156;
					uParam1->f_9 = 0;
					StringCopy(&(uParam1->f_27), "880HS955", 16);
					break;
			}
			break;
		
		case 2:
			iVar0 = joaat("bodhi2");
			switch (iVar0)
			{
				case joaat("bodhi2"):
					*uParam1 = iVar0;
					uParam1->f_2 = 14f;
					uParam1->f_5 = 32;
					uParam1->f_6 = 0;
					uParam1->f_7 = 0;
					uParam1->f_8 = 156;
					StringCopy(&(uParam1->f_27), "BETTY 32", 16);
					if (Global_101553.f_7940.f_99.f_58[119])
					{
						uParam1->f_11[1] = 1;
					}
					break;
			}
			break;
		
		case 1:
			if (iParam2 == 1)
			{
				iVar0 = joaat("buffalo2");
			}
			else if (iParam2 == 2)
			{
				iVar0 = joaat("bagger");
			}
			else if (Global_101553.f_7940.f_99.f_58[118])
			{
				iVar0 = joaat("bagger");
			}
			else
			{
				iVar0 = joaat("buffalo2");
			}
			switch (iVar0)
			{
				case joaat("bagger"):
					*uParam1 = iVar0;
					uParam1->f_2 = 6f;
					uParam1->f_5 = 53;
					uParam1->f_6 = 0;
					uParam1->f_7 = 59;
					uParam1->f_8 = 156;
					StringCopy(&(uParam1->f_27), "FC88", 16);
					break;
				
				case joaat("buffalo2"):
					*uParam1 = iVar0;
					uParam1->f_2 = 0f;
					uParam1->f_5 = 111;
					uParam1->f_6 = 111;
					uParam1->f_7 = 0;
					uParam1->f_8 = 156;
					uParam1->f_10 = 1;
					StringCopy(&(uParam1->f_27), "FC1988", 16);
					uParam1->f_11[0] = 1;
					uParam1->f_11[1] = 1;
					uParam1->f_11[2] = 1;
					uParam1->f_11[3] = 1;
					uParam1->f_11[4] = 1;
					uParam1->f_11[5] = 1;
					uParam1->f_11[6] = 1;
					uParam1->f_11[7] = 1;
					uParam1->f_11[8] = 1;
					break;
			}
			break;
		
		default:
			break;
	}
}

void func_258(int iParam0, var uParam1)//Position - 0xD27D
{
	int iVar0;
	
	if (vehicle::is_vehicle_driveable(iParam0, 0))
	{
		func_261(uParam1);
		uParam1->f_66 = entity::get_entity_model(iParam0);
		StringCopy(&(uParam1->f_1), vehicle::get_vehicle_number_plate_text(iParam0), 16);
		*uParam1 = vehicle::get_vehicle_number_plate_text_index(iParam0);
		vehicle::get_vehicle_colours(iParam0, &(uParam1->f_5), &(uParam1->f_6));
		vehicle::get_vehicle_extra_colours(iParam0, &(uParam1->f_7), &(uParam1->f_8));
		vehicle::get_vehicle_tyre_smoke_color(iParam0, &(uParam1->f_62), &(uParam1->f_63), &(uParam1->f_64));
		uParam1->f_65 = vehicle::get_vehicle_window_tint(iParam0);
		uParam1->f_67 = vehicle::get_vehicle_livery(iParam0);
		uParam1->f_69 = vehicle::get_vehicle_wheel_type(iParam0);
		uParam1->f_70 = vehicle::get_vehicle_door_lock_status(iParam0);
		vehicle::get_vehicle_custom_secondary_colour(iParam0, &(uParam1->f_71), &(uParam1->f_72), &(uParam1->f_73));
		vehicle::_get_vehicle_neon_lights_colour(iParam0, &(uParam1->f_74), &(uParam1->f_75), &(uParam1->f_76));
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 2))
		{
			gameplay::set_bit(&(uParam1->f_77), 28);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 3))
		{
			gameplay::set_bit(&(uParam1->f_77), 29);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 0))
		{
			gameplay::set_bit(&(uParam1->f_77), 30);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 1))
		{
			gameplay::set_bit(&(uParam1->f_77), 31);
		}
		if (uParam1->f_65 == -1 && uParam1->f_66 != joaat("granger"))
		{
			uParam1->f_65 = 0;
		}
		if (vehicle::is_vehicle_a_convertible(iParam0, 0))
		{
			uParam1->f_68 = vehicle::get_convertible_roof_state(iParam0);
		}
		if (vehicle::is_this_model_a_plane(uParam1->f_66))
		{
			if (vehicle::_0x4198AB0022B15F87(iParam0))
			{
				switch (vehicle::get_landing_gear_state(iParam0))
				{
					case 2:
					case 0:
						gameplay::clear_bit(&(uParam1->f_77), 23);
						gameplay::set_bit(&(uParam1->f_77), 22);
						break;
					
					case 3:
					case 1:
						gameplay::clear_bit(&(uParam1->f_77), 23);
						gameplay::clear_bit(&(uParam1->f_77), 22);
						break;
					
					case 4:
						gameplay::set_bit(&(uParam1->f_77), 23);
						break;
				}
			}
			else
			{
				gameplay::set_bit(&(uParam1->f_77), 23);
			}
		}
		if (!vehicle::get_vehicle_tyres_can_burst(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 9);
		}
		if (vehicle::is_vehicle_stolen(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 10);
		}
		if (vehicle::get_is_vehicle_primary_colour_custom(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 13);
			vehicle::get_vehicle_custom_primary_colour(iParam0, &(uParam1->f_71), &(uParam1->f_72), &(uParam1->f_73));
		}
		if (vehicle::get_is_vehicle_secondary_colour_custom(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 12);
		}
		func_260(&iParam0, &(uParam1->f_9), &(uParam1->f_59));
		iVar0 = 0;
		while (iVar0 <= 11)
		{
			if (vehicle::is_vehicle_extra_turned_on(iParam0, iVar0 + 1))
			{
				gameplay::set_bit(&(uParam1->f_77), func_259(iVar0 + 1));
			}
			iVar0++;
		}
		if (graphics::_does_vehicle_have_decal(iParam0, 0))
		{
			gameplay::set_bit(&(uParam1->f_77), 11);
		}
		else
		{
			gameplay::clear_bit(&(uParam1->f_77), 11);
		}
		if (decorator::decor_exist_on(iParam0, "IgnoredByQuickSave") && decorator::decor_get_bool(iParam0, "IgnoredByQuickSave"))
		{
			gameplay::set_bit(&(uParam1->f_77), 27);
		}
		else
		{
			gameplay::clear_bit(&(uParam1->f_77), 27);
		}
	}
}

int func_259(int iParam0)//Position - 0xD529
{
	switch (iParam0)
	{
		case 1:
			return 0;
			break;
		
		case 2:
			return 1;
			break;
		
		case 3:
			return 2;
			break;
		
		case 4:
			return 3;
			break;
		
		case 5:
			return 4;
			break;
		
		case 6:
			return 5;
			break;
		
		case 7:
			return 6;
			break;
		
		case 8:
			return 7;
			break;
		
		case 9:
			return 8;
			break;
		
		case 10:
			return 24;
			break;
		
		case 11:
			return 25;
			break;
		
		case 12:
			return 26;
			break;
	}
	return 0;
}

bool func_260(int iParam0, var uParam1, var uParam2)//Position - 0xD5D9
{
	int iVar0;
	int iVar1;
	
	if (!vehicle::is_vehicle_driveable(*iParam0, 0))
	{
		return false;
	}
	if (vehicle::get_num_mod_kits(*iParam0) == 0)
	{
		return false;
	}
	iVar0 = 0;
	while (iVar0 < *uParam1)
	{
		iVar1 = iVar0;
		if (((((iVar1 == 17 || iVar1 == 18) || iVar1 == 19) || iVar1 == 20) || iVar1 == 21) || iVar1 == 22)
		{
			(*uParam1)[iVar0] = 0;
			if (vehicle::is_toggle_mod_on(*iParam0, iVar1))
			{
				(*uParam1)[iVar0] = 1;
			}
		}
		else
		{
			(*uParam1)[iVar0] = vehicle::get_vehicle_mod(*iParam0, iVar0) + 1;
			if (iVar0 == 23)
			{
				(*uParam2)[0] = vehicle::get_vehicle_mod_variation(*iParam0, iVar0);
			}
			else if (iVar0 == 24)
			{
				(*uParam2)[1] = vehicle::get_vehicle_mod_variation(*iParam0, iVar0);
			}
		}
		iVar0++;
	}
	return true;
}

void func_261(var uParam0)//Position - 0xD6B3
{
	int iVar0;
	
	uParam0->f_66 = 0;
	uParam0->f_77 = 0;
	uParam0->f_65 = 0;
	uParam0->f_62 = 0;
	uParam0->f_63 = 0;
	uParam0->f_64 = 0;
	uParam0->f_74 = 0;
	uParam0->f_75 = 0;
	uParam0->f_76 = 0;
	*uParam0 = 0;
	StringCopy(&(uParam0->f_1), "", 16);
	uParam0->f_5 = 0;
	uParam0->f_6 = 0;
	uParam0->f_7 = 0;
	uParam0->f_8 = 0;
	iVar0 = 0;
	while (iVar0 < 49)
	{
		uParam0->f_9[iVar0] = 0;
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < 2)
	{
		uParam0->f_59[iVar0] = 0;
		iVar0++;
	}
	uParam0->f_67 = 0;
	uParam0->f_68 = 0;
	uParam0->f_69 = 0;
	uParam0->f_70 = 1;
	uParam0->f_71 = 0;
	uParam0->f_72 = 0;
	uParam0->f_73 = 0;
}

void func_262(int iParam0, char* sParam1, int iParam2, int iParam3, int iParam4, int iParam5)//Position - 0xD763
{
	int iVar0;
	int iVar1;
	int iVar2;
	char[] cVar3[8];
	int iVar5;
	var uVar6;
	int iVar10;
	
	if (iParam3 == 1)
	{
		if (!gameplay::are_strings_equal("FinaleC2", script::get_this_script_name()))
		{
		}
	}
	iVar0 = 0;
	if (iParam3 == 1)
	{
		if (iParam0 != Global_91443)
		{
			iVar0 = 1;
		}
	}
	else if (iParam0 > Global_91443)
	{
		iVar0 = 1;
	}
	if (iVar0 == 1)
	{
		func_8(1);
		if (iParam0 <= Global_91443)
		{
		}
		iVar1 = func_320(script::get_this_script_name(), 1);
		if (iVar1 != -1 && iVar1 != 94)
		{
			Global_101553.f_7940.f_330[iVar1 /*6*/].f_1 = 0;
			iVar2 = func_318(iVar1);
			cVar3 = { Global_82527[iVar1 /*34*/].f_8 };
			if (iVar1 == 90)
			{
				switch (Global_101553.f_7940.f_99.f_205[7])
				{
					case 1:
						StringConCat(&cVar3, "A", 8);
						break;
					
					case 2:
						StringConCat(&cVar3, "B", 8);
						break;
					}
			}
			stats::playstats_mission_checkpoint(&cVar3, iVar2, Global_91443, iParam0);
		}
		else
		{
			iVar5 = func_313(script::get_this_script_name(), 1);
			if (iVar5 != -1)
			{
				Global_101553.f_17429[iVar5 /*6*/].f_4 = 0;
				MemCopy(&uVar6, {func_312(iVar5)}, 4);
				stats::playstats_mission_checkpoint(&uVar6, 0, Global_91443, iParam0);
			}
			else
			{
				iVar10 = func_311(&(Global_91406.f_3));
				if (iVar10 > -1)
				{
					Global_101553.f_29676.f_4[iVar10] = 0;
				}
			}
		}
		Global_85917 = iParam2;
		Global_91443 = iParam0;
		func_263(iParam0, sParam1, iParam4, iParam5);
		if (gameplay::are_strings_equal(sParam1, ""))
		{
		}
	}
	else if (iParam0 < Global_91443)
	{
	}
}

void func_263(int iParam0, var uParam1, int iParam2, int iParam3)//Position - 0xD8D8
{
	func_264(&Global_95894, script::get_this_script_name(), iParam0, uParam1, iParam3, iParam2);
}

void func_264(var uParam0, char* sParam1, var uParam2, var uParam3, int iParam4, int iParam5)//Position - 0xD8F4
{
	int iVar0;
	int iVar1;
	
	*uParam0 = func_34();
	uParam0->f_1 = func_300();
	gameplay::_get_weather_type_transition(&(uParam0->f_6), &(uParam0->f_7), &(uParam0->f_8));
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
		func_285(&(uParam0->f_2305), 0);
		func_284(player::player_ped_id());
		func_278(player::player_ped_id(), 0);
		weapon::get_current_ped_weapon(player::player_ped_id(), &(uParam0->f_2), 1);
		if (uParam0->f_2 == 0 || uParam0->f_2 == joaat("object"))
		{
			uParam0->f_2 = joaat("weapon_unarmed");
		}
	}
	iVar1 = 0;
	while (iVar1 < 3)
	{
		uParam0->f_17[iVar1] = Global_101553.f_1991.f_539.f_294[iVar1];
		if (iVar1 == func_277())
		{
			func_270(player::player_ped_id(), &(uParam0->f_616[iVar1 /*65*/]), 1);
		}
		else
		{
			iVar0 = 0;
			while (iVar0 < 12)
			{
				uParam0->f_616[iVar1 /*65*/][iVar0] = Global_91196[iVar1 /*65*/][iVar0];
				uParam0->f_616[iVar1 /*65*/].f_13[iVar0] = Global_91196[iVar1 /*65*/].f_13[iVar0];
				iVar0++;
			}
			uParam0->f_616[iVar1 /*65*/].f_59 = Global_91196[iVar1 /*65*/].f_59;
			uParam0->f_616[iVar1 /*65*/].f_60 = Global_91196[iVar1 /*65*/].f_60;
			uParam0->f_616[iVar1 /*65*/].f_61 = Global_91196[iVar1 /*65*/].f_61;
			uParam0->f_616[iVar1 /*65*/].f_62 = Global_91196[iVar1 /*65*/].f_62;
			uParam0->f_616[iVar1 /*65*/].f_63 = Global_91196[iVar1 /*65*/].f_63;
			uParam0->f_616[iVar1 /*65*/].f_64 = Global_91196[iVar1 /*65*/].f_64;
			iVar0 = 0;
			while (iVar0 < 9)
			{
				uParam0->f_616[iVar1 /*65*/].f_39[iVar0] = Global_91196[iVar1 /*65*/].f_39[iVar0];
				uParam0->f_616[iVar1 /*65*/].f_49[iVar0] = Global_91196[iVar1 /*65*/].f_49[iVar0];
				iVar0++;
			}
		}
		iVar0 = 0;
		while (iVar0 < 44)
		{
			uParam0->f_812[iVar1 /*284*/][iVar0 /*3*/] = { Global_101553.f_1991.f_539.f_298[iVar1 /*284*/][iVar0 /*3*/] };
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 < 50)
		{
			uParam0->f_812[iVar1 /*284*/].f_133[iVar0 /*3*/] = { Global_101553.f_1991.f_539.f_298[iVar1 /*284*/].f_133[iVar0 /*3*/] };
			iVar0++;
		}
		switch (iVar1)
		{
			case 0:
				stats::stat_get_int(joaat("sp0_weap_purch_0"), &(uParam0->f_1665[iVar1 /*32*/][0]), -1);
				stats::stat_get_int(joaat("sp0_weap_purch_1"), &(uParam0->f_1665[iVar1 /*32*/][1]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_5[0]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_5[1]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_5[2]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_5[3]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_5[4]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_16[0]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_16[1]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_16[2]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_16[3]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_16[4]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_5"), &(uParam0->f_1665[iVar1 /*32*/].f_16[5]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_6"), &(uParam0->f_1665[iVar1 /*32*/].f_16[6]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_7"), &(uParam0->f_1665[iVar1 /*32*/].f_16[7]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_8"), &(uParam0->f_1665[iVar1 /*32*/].f_16[8]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_9"), &(uParam0->f_1665[iVar1 /*32*/].f_16[9]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_10"), &(uParam0->f_1665[iVar1 /*32*/].f_16[10]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_11"), &(uParam0->f_1665[iVar1 /*32*/].f_16[11]), -1);
				break;
			
			case 1:
				stats::stat_get_int(joaat("sp1_weap_purch_0"), &(uParam0->f_1665[iVar1 /*32*/][0]), -1);
				stats::stat_get_int(joaat("sp1_weap_purch_1"), &(uParam0->f_1665[iVar1 /*32*/][1]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_5[0]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_5[1]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_5[2]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_5[3]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_5[4]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_16[0]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_16[1]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_16[2]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_16[3]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_16[4]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_5"), &(uParam0->f_1665[iVar1 /*32*/].f_16[5]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_6"), &(uParam0->f_1665[iVar1 /*32*/].f_16[6]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_7"), &(uParam0->f_1665[iVar1 /*32*/].f_16[7]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_8"), &(uParam0->f_1665[iVar1 /*32*/].f_16[8]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_9"), &(uParam0->f_1665[iVar1 /*32*/].f_16[9]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_10"), &(uParam0->f_1665[iVar1 /*32*/].f_16[10]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_11"), &(uParam0->f_1665[iVar1 /*32*/].f_16[11]), -1);
				break;
			
			case 2:
				stats::stat_get_int(joaat("sp2_weap_purch_0"), &(uParam0->f_1665[iVar1 /*32*/][0]), -1);
				stats::stat_get_int(joaat("sp2_weap_purch_1"), &(uParam0->f_1665[iVar1 /*32*/][1]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_5[0]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_5[1]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_5[2]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_5[3]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_5[4]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_16[0]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_16[1]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_16[2]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_16[3]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_16[4]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_5"), &(uParam0->f_1665[iVar1 /*32*/].f_16[5]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_6"), &(uParam0->f_1665[iVar1 /*32*/].f_16[6]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_7"), &(uParam0->f_1665[iVar1 /*32*/].f_16[7]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_8"), &(uParam0->f_1665[iVar1 /*32*/].f_16[8]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_9"), &(uParam0->f_1665[iVar1 /*32*/].f_16[9]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_10"), &(uParam0->f_1665[iVar1 /*32*/].f_16[10]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_11"), &(uParam0->f_1665[iVar1 /*32*/].f_16[11]), -1);
				break;
		}
		uParam0->f_9[iVar1] = Global_101553.f_25254.f_233[iVar1 /*69*/].f_1;
		uParam0->f_13[iVar1] = Global_52990[iVar1];
		uParam0->f_25[0 /*295*/][iVar1 /*98*/] = { Global_101553.f_1991.f_539.f_1635[0 /*295*/][iVar1 /*98*/] };
		uParam0->f_25[1 /*295*/][iVar1 /*98*/] = { Global_101553.f_1991.f_539.f_1635[1 /*295*/][iVar1 /*98*/] };
		iVar0 = 0;
		while (iVar0 <= 3)
		{
			uParam0->f_2259[iVar1 /*15*/][iVar0] = Global_101553.f_1991.f_493[iVar1 /*15*/][iVar0];
			uParam0->f_2259[iVar1 /*15*/].f_5[iVar0] = Global_101553.f_1991.f_493[iVar1 /*15*/].f_5[iVar0];
			uParam0->f_2259[iVar1 /*15*/].f_10[iVar0] = Global_101553.f_1991.f_493[iVar1 /*15*/].f_10[iVar0];
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 <= 2)
		{
			uParam0->f_1766[iVar1 /*164*/][iVar0] = Global_101553.f_1991[iVar1 /*164*/][iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_4[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_4[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_8[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_8[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_12[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_12[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_16[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_16[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_20[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_20[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_24[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_24[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_28[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_28[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_32[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_32[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_36[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_36[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_40[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_40[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_44[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_44[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_48[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_48[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_52[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_52[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_56[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_56[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_60[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_60[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_64[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_64[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_68[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_68[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_72[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_72[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_76[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_76[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_80[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_80[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_84[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_84[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_88[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_88[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_92[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_92[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_96[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_96[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_100[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_100[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_104[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_104[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_108[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_108[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_112[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_112[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_116[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_116[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_120[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_120[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_124[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_124[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_128[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_128[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_132[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_132[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_136[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_136[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_140[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_140[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_144[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_144[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_148[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_148[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_152[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_152[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_156[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_156[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_160[iVar0] = Global_101553.f_1991[iVar1 /*164*/].f_160[iVar0];
			iVar0++;
		}
		iVar1++;
	}
	stats::stat_get_int(joaat("sp0_special_ability"), &(uParam0->f_1762[0]), -1);
	stats::stat_get_int(joaat("sp1_special_ability"), &(uParam0->f_1762[1]), -1);
	stats::stat_get_int(joaat("sp2_special_ability"), &(uParam0->f_1762[2]), -1);
	uParam0->f_5 = 145;
	if (iParam4 == 1)
	{
		func_266(&(uParam0->f_2311), uParam0, iParam5, 1, 1, 0);
	}
	func_265(&(uParam0->f_2401));
	uParam3 = uParam3;
	uParam2 = uParam2;
}

bool func_265(var uParam0)//Position - 0xE77C
{
	*uParam0 = Global_87588;
	uParam0->f_1 = Global_87589;
	uParam0->f_2 = 0;
	uParam0->f_3 = 0;
	return true;
}

void func_266(var uParam0, var uParam1, int iParam2, int iParam3, int iParam4, int iParam5)//Position - 0xE79E
{
	int iVar0;
	
	if (iParam2 == 0)
	{
		iParam2 = player::player_ped_id();
	}
	if (entity::does_entity_exist(iParam2))
	{
		uParam1->f_5 = func_37(iParam2);
	}
	if (func_267(iParam2, &iVar0, iParam3, iParam5))
	{
		func_250(uParam0, uParam1, iVar0, iParam4);
	}
	else if (entity::does_entity_exist(iVar0))
	{
		if (!entity::is_entity_dead(iVar0, 0))
		{
			if (vehicle::is_vehicle_model(iVar0, joaat("skylift")) && ped::is_ped_in_vehicle(player::player_ped_id(), iVar0, 0))
			{
				func_250(uParam0, uParam1, iVar0, iParam4);
			}
		}
	}
}

bool func_267(int iParam0, var uParam1, int iParam2, int iParam3)//Position - 0xE826
{
	char* sVar0;
	
	if (entity::does_entity_exist(iParam0))
	{
		if (!ped::is_ped_injured(iParam0))
		{
			if (iParam0 == player::player_ped_id())
			{
				*uParam1 = player::get_players_last_vehicle();
			}
			else
			{
				*uParam1 = ped::get_vehicle_ped_is_in(iParam0, 1);
			}
			if (entity::does_entity_exist(*uParam1))
			{
				if (vehicle::is_vehicle_driveable(*uParam1, 0))
				{
					if (iParam2 == 0 || gameplay::get_distance_between_coords(entity::get_entity_coords(*uParam1, 1), entity::get_entity_coords(iParam0, 1), 1) < 100f)
					{
						if (vehicle::is_vehicle_model(*uParam1, joaat("taxi")))
						{
							if (vehicle::get_ped_in_vehicle_seat(*uParam1, -1, 0) != iParam0 && vehicle::get_ped_in_vehicle_seat(*uParam1, -1, 0) != 0)
							{
								return false;
							}
						}
						if (func_268(*uParam1, func_34(), 1))
						{
							sVar0 = script::get_this_script_name();
							if (!gameplay::are_strings_equal(sVar0, "save_anywhere"))
							{
								return false;
							}
							else if (!ped::is_ped_in_any_vehicle(iParam0, 1))
							{
								return false;
							}
						}
						if (iParam3 == 1)
						{
							if (decorator::decor_exist_on(*uParam1, "IgnoredByQuickSave"))
							{
								if (decorator::decor_get_bool(*uParam1, "IgnoredByQuickSave"))
								{
									return false;
								}
							}
						}
						else if (vehicle::is_vehicle_model(*uParam1, joaat("blimp")))
						{
							return false;
						}
						return true;
					}
				}
			}
		}
	}
	return false;
}

bool func_268(int iParam0, int iParam1, int iParam2)//Position - 0xE955
{
	int iVar0;
	char* sVar1;
	var uVar9;
	
	if (!entity::does_entity_exist(iParam0) || !vehicle::is_vehicle_driveable(iParam0, 0))
	{
		return false;
	}
	iVar0 = 0;
	while (func_269(iParam1, iVar0, &sVar1, &uVar9))
	{
		if (!iParam2 || gameplay::is_bit_set(Global_101553.f_6084[uVar9], 0))
		{
			if (vehicle::is_vehicle_in_garage_area(&sVar1, iParam0))
			{
				return true;
			}
		}
		iVar0++;
	}
	return false;
}

bool func_269(int iParam0, int iParam1, char* sParam2, var uParam3)//Position - 0xE9C6
{
	StringCopy(sParam2, "", 32);
	switch (iParam0)
	{
		case 0:
			if (iParam1 == 0)
			{
				StringCopy(sParam2, "Michael - Beverly Hills", 32);
				*uParam3 = 0;
				return true;
			}
			else if (iParam1 == 1)
			{
				StringCopy(sParam2, "Trevor - Countryside", 32);
				*uParam3 = 1;
				return true;
			}
			break;
		
		case 1:
			if (iParam1 == 0)
			{
				StringCopy(sParam2, "Franklin - Aunt", 32);
				*uParam3 = 5;
				return true;
			}
			else if (iParam1 == 1)
			{
				StringCopy(sParam2, "Franklin - Hills", 32);
				*uParam3 = 6;
				return true;
			}
			break;
		
		case 2:
			if (iParam1 == 0)
			{
				StringCopy(sParam2, "Trevor - Countryside", 32);
				*uParam3 = 2;
				return true;
			}
			else if (iParam1 == 1)
			{
				StringCopy(sParam2, "Trevor - City", 32);
				*uParam3 = 3;
				return true;
			}
			else if (iParam1 == 2)
			{
				StringCopy(sParam2, "Trevor - Stripclub", 32);
				*uParam3 = 4;
				return true;
			}
			break;
	}
	return false;
}

void func_270(int iParam0, var uParam1, int iParam2)//Position - 0xEA9E
{
	int iVar0;
	int iVar1;
	
	if (!ped::is_ped_injured(iParam0))
	{
		iVar0 = func_37(iParam0);
		iVar1 = 0;
		while (iVar1 < 12)
		{
			func_276(iParam0, iVar1, &(uParam1->f_13[iVar1]), uParam1[iVar1], &(uParam1->f_26[iVar1]), iParam2, 145);
			iVar1++;
		}
		iVar1 = 0;
		while (iVar1 < 9)
		{
			func_275(iParam0, iVar1, &(uParam1->f_39[iVar1]), &(uParam1->f_49[iVar1]), iParam2, 145);
			iVar1++;
		}
		if (func_36(iVar0))
		{
			uParam1->f_59 = Global_101553.f_1991.f_539[iVar0 /*65*/].f_59;
			uParam1->f_60 = Global_101553.f_1991.f_539[iVar0 /*65*/].f_60;
			uParam1->f_61 = Global_101553.f_1991.f_539[iVar0 /*65*/].f_61;
			uParam1->f_62 = Global_101553.f_1991.f_539[iVar0 /*65*/].f_62;
			uParam1->f_63 = Global_101553.f_1991.f_539[iVar0 /*65*/].f_63;
			uParam1->f_64 = Global_101553.f_1991.f_539[iVar0 /*65*/].f_64;
		}
		else if (network::network_is_game_in_progress() && entity::get_entity_model(iParam0) == entity::get_entity_model(player::player_ped_id()))
		{
			if (func_274(161, -1))
			{
				uParam1->f_59 = func_271(2043, Global_69436, 0);
			}
			else
			{
				uParam1->f_59 = func_271(745, Global_69436, 0);
			}
			uParam1->f_60 = func_271(746, Global_69436, 0);
			uParam1->f_61 = func_271(747, Global_69436, 0);
		}
		if (network::network_is_game_in_progress() && iParam0 == player::player_ped_id())
		{
			if (func_274(161, -1))
			{
				uParam1->f_59 = func_271(2043, Global_69436, 0);
			}
			else
			{
				uParam1->f_59 = func_271(745, Global_69436, 0);
			}
		}
	}
}

int func_271(int iParam0, int iParam1, int iParam2)//Position - 0xEC48
{
	int iVar0;
	var uVar1;
	
	if (iParam2 == 0)
	{
	}
	iVar0 = Global_2491469[iParam0 /*3*/][func_272(iParam1)];
	if (stats::stat_get_int(iVar0, &uVar1, -1))
	{
		return uVar1;
	}
	return 0;
}

int func_272(var uParam0)//Position - 0xEC7A
{
	int iVar0;
	int iVar1;
	
	iVar0 = uParam0;
	if (iVar0 == -1)
	{
		iVar1 = func_273();
		if (iVar1 > -1)
		{
			Global_2491182 = 0;
			iVar0 = iVar1;
		}
		else
		{
			iVar0 = 0;
			Global_2491182 = 1;
		}
	}
	return iVar0;
}

var func_273()//Position - 0xECAE
{
	return Global_1312731;
}

int func_274(int iParam0, int iParam1)//Position - 0xECBA
{
	int iVar0;
	var uVar1;
	
	iVar0 = Global_2506009[iParam0 /*3*/][func_272(iParam1)];
	if (stats::stat_get_bool(iVar0, &uVar1, -1))
	{
		return uVar1;
	}
	return 0;
}

void func_275(int iParam0, int iParam1, var uParam2, var uParam3, int iParam4, int iParam5)//Position - 0xECE6
{
	int iVar0;
	
	iVar0 = func_37(iParam0);
	if (iParam0 != 0)
	{
		*uParam2 = ped::get_ped_prop_index(iParam0, iParam1);
		*uParam3 = ped::get_ped_prop_texture_index(iParam0, iParam1);
	}
	else
	{
		iVar0 = iParam5;
	}
	if (iParam4 == 0)
	{
		return;
	}
	if (iParam1 == 0)
	{
		if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
		{
			if (iParam0 != 0)
			{
				if (ped::is_ped_wearing_helmet(iParam0) && ped::_0x451294E859ECC018(iParam0) != -1)
				{
					*uParam2 = ped::_0x451294E859ECC018(iParam0);
					*uParam3 = ped::_0x9D728C1E12BF5518(iParam0);
				}
			}
		}
	}
	switch (iVar0)
	{
		case 0:
			if (iParam1 == 0)
			{
				if (*uParam2 == 7)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 11)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 21)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 16 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 23)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 27)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 28)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 >= 14 && *uParam2 <= 20)
				{
					if (iParam4 & 2 != 0 || iParam4 & 4 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			else if (iParam1 == 1)
			{
				if (*uParam2 == 1)
				{
					if (iParam4 & 2 != 0 || iParam4 & 64 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			break;
		
		case 1:
			if (iParam1 == 0)
			{
				if (*uParam2 == 2)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 4)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 16 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 6)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 17)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 20)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 21)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 >= 8 && *uParam2 <= 14)
				{
					if (iParam4 & 2 != 0 || iParam4 & 4 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			break;
		
		case 2:
			if (iParam1 == 0)
			{
				if (*uParam2 == 9)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 11)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 12)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 21)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 23)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 27)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if ((*uParam2 >= 14 && *uParam2 <= 20) || *uParam2 == 2)
				{
					if (iParam4 & 2 != 0 || iParam4 & 4 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			break;
	}
}

void func_276(int iParam0, int iParam1, var uParam2, var uParam3, var uParam4, int iParam5, int iParam6)//Position - 0xF22E
{
	int iVar0;
	
	iVar0 = func_37(iParam0);
	if (iParam0 != 0)
	{
		*uParam2 = ped::get_ped_drawable_variation(iParam0, iParam1);
		*uParam3 = ped::get_ped_texture_variation(iParam0, iParam1);
		*uParam4 = ped::get_ped_palette_variation(iParam0, iParam1);
	}
	else
	{
		iVar0 = iParam6;
	}
	if (iParam5 == 0)
	{
		return;
	}
	switch (iVar0)
	{
		case 0:
			if (iParam1 == 8)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 15)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
				if (iParam5 & 2 != 0 || iParam5 & 64 != 0)
				{
					if (*uParam2 == 3 || *uParam2 == 22)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			else if (iParam1 == 9)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 5)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
				if (iParam5 & 2 != 0 || iParam5 & 4 != 0)
				{
					if (*uParam2 == 8)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			break;
		
		case 1:
			if (iParam1 == 8)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 1 || *uParam2 == 10)
					{
						*uParam2 = 14;
						*uParam3 = 0;
					}
				}
				if (iParam5 & 2 != 0 || iParam5 & 64 != 0)
				{
					if (*uParam2 == 19)
					{
						*uParam2 = 14;
						*uParam3 = 0;
					}
				}
			}
			else if (iParam1 == 9)
			{
				if (iParam5 & 2 != 0 || iParam5 & 4 != 0)
				{
					if (*uParam2 == 5)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			break;
		
		case 2:
			if (iParam1 == 8)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 3)
					{
						*uParam2 = 14;
						*uParam3 = 0;
					}
				}
			}
			else if (iParam1 == 9)
			{
				if (*uParam2 >= 5 && *uParam2 <= 7)
				{
					if (iParam5 & 2 != 0 || iParam5 & 4 != 0)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			break;
	}
}

var func_277()//Position - 0xF46F
{
	func_35();
	return Global_101553.f_1991.f_539.f_3549;
}

void func_278(int iParam0, int iParam1)//Position - 0xF488
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	
	iVar0 = func_37(iParam0);
	if (func_36(iVar0) && !ped::is_ped_injured(iParam0))
	{
		if (iParam0 == player::player_ped_id())
		{
			func_279(iParam0, &(Global_101553.f_1991.f_539.f_298[iVar0 /*284*/]));
			iVar2 = 0;
			while (iVar2 <= (8 - 1))
			{
				Global_101553.f_1991.f_539.f_1151[iVar2 /*4*/][iVar0] = ui::_0xA13E93403F26C812(iVar2);
				if (iParam1)
				{
					iVar1 = ui::_0xA48931185F0536FE();
					if (Global_101553.f_1991.f_539.f_1151[iVar2 /*4*/][iVar0] == iVar1)
					{
						Global_101553.f_1991.f_539.f_1184 = iVar2;
					}
				}
				iVar2++;
			}
			player::get_player_parachute_pack_tint_index(player::player_id(), &iVar3);
			if (iVar0 == 0)
			{
				stats::stat_set_int(joaat("sp0_parachute_current_tint"), iVar3, 1);
			}
			else if (iVar0 == 1)
			{
				stats::stat_set_int(joaat("sp1_parachute_current_tint"), iVar3, 1);
			}
			else if (iVar0 == 2)
			{
				stats::stat_set_int(joaat("sp2_parachute_current_tint"), iVar3, 1);
			}
		}
	}
}

void func_279(int iParam0, var uParam1)//Position - 0xF57B
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	vector3 vVar4;
	int iVar7;
	int iVar8;
	struct<2> Var9;
	struct<4> Var48;
	int iVar70;
	
	if (!ped::is_ped_injured(iParam0))
	{
		iVar0 = 0;
		while (iVar0 <= (44 - 1))
		{
			(uParam1[iVar0 /*3*/])->f_1 = 0;
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 <= (44 - 1))
		{
			iVar3 = func_283(iVar0);
			if (iVar3 != 0)
			{
				vVar4.x = weapon::get_ped_weapontype_in_slot(iParam0, func_283(iVar0));
				vVar4.y = 0;
				vVar4.z = 0;
				if (vVar4.x != 0 && vVar4.x != joaat("weapon_unarmed"))
				{
					vVar4.y = weapon::get_ammo_in_ped_weapon(iParam0, vVar4.x);
					if (vVar4.x == joaat("gadget_parachute"))
					{
						vVar4.y = 1;
					}
					gameplay::set_bit(&(vVar4.f_2), (20 + weapon::get_ped_weapon_tint_index(iParam0, vVar4.x)));
					if (vVar4.y == -1)
					{
						if (!weapon::get_max_ammo(iParam0, vVar4.x, &(vVar4.f_1)))
						{
							vVar4.y = 0;
						}
					}
					(uParam1[iVar0 /*3*/])->f_1 = vVar4.y;
					iVar1 = 0;
					iVar2 = func_281(vVar4.x, iVar1);
					while (iVar2 != 0)
					{
						if (weapon::has_ped_got_weapon_component(iParam0, vVar4.x, iVar2))
						{
							gameplay::set_bit(&(vVar4.f_2), iVar1);
						}
						iVar1++;
						iVar2 = func_281(vVar4.x, iVar1);
					}
				}
				*(uParam1[iVar0 /*3*/]) = { vVar4 };
			}
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 <= (50 - 1))
		{
			uParam1->f_133[iVar0 /*3*/].f_1 = 0;
			iVar0++;
		}
		iVar8 = dlc1::get_num_dlc_weapons();
		iVar7 = 0;
		while (iVar7 < iVar8)
		{
			if ((dlc1::get_dlc_weapon_data(iVar7, &Var9) && !func_280(Var9.f_1)) && iVar70 < 50)
			{
				if (!dlc1::_is_dlc_data_empty(Var9))
				{
					vVar4.x = Var9.f_1;
					vVar4.y = 0;
					vVar4.z = 0;
					vVar4.y = weapon::get_ammo_in_ped_weapon(iParam0, vVar4.x);
					if (weapon::has_ped_got_weapon(iParam0, vVar4.x, 0))
					{
						gameplay::set_bit(&(vVar4.f_2), (20 + weapon::get_ped_weapon_tint_index(iParam0, vVar4.x)));
					}
					else
					{
						gameplay::set_bit(&(vVar4.f_2), 20);
					}
					if (vVar4.y == -1)
					{
						if (!weapon::get_max_ammo(iParam0, vVar4.x, &(vVar4.f_1)))
						{
							vVar4.y = 0;
						}
					}
					uParam1->f_133[iVar70 /*3*/].f_1 = vVar4.y;
					iVar1 = 0;
					while (iVar1 < dlc1::get_num_dlc_weapon_components(iVar7))
					{
						if (dlc1::get_dlc_weapon_component_data(iVar7, iVar1, &Var48))
						{
							if (weapon::has_ped_got_weapon_component(iParam0, vVar4.x, Var48.f_3))
							{
								gameplay::set_bit(&(vVar4.f_2), iVar1);
							}
						}
						iVar1++;
					}
				}
				if (vVar4.x != 0)
				{
					if (!weapon::has_ped_got_weapon(iParam0, vVar4.x, 0))
					{
						vVar4.x = 0;
						vVar4.y = 0;
					}
				}
				uParam1->f_133[iVar70 /*3*/] = { vVar4 };
				iVar70++;
			}
			iVar7++;
		}
	}
}

bool func_280(int iParam0)//Position - 0xF7DF
{
	if (network::network_is_game_in_progress())
	{
	}
	else
	{
		switch (iParam0)
		{
			case joaat("weapon_pistol50"):
			case joaat("weapon_bullpupshotgun"):
			case joaat("weapon_assaultsmg"):
				return false;
				break;
			
			case joaat("weapon_bottle"):
			case joaat("weapon_snspistol"):
			case joaat("weapon_gusenberg"):
				return false;
				break;
			
			case joaat("weapon_heavypistol"):
			case joaat("weapon_specialcarbine"):
				return false;
				break;
			
			case joaat("weapon_bullpuprifle"):
				return false;
				break;
			
			case joaat("weapon_dagger"):
			case joaat("weapon_vintagepistol"):
				return false;
				break;
			
			case joaat("weapon_firework"):
			case joaat("weapon_musket"):
				return false;
				break;
			
			case joaat("weapon_heavyshotgun"):
			case joaat("weapon_marksmanrifle"):
				return false;
				break;
			
			case joaat("weapon_hominglauncher"):
			case joaat("weapon_proxmine"):
				return false;
				break;
			
			case joaat("weapon_combatpdw"):
			case joaat("weapon_knuckle"):
			case joaat("weapon_marksmanpistol"):
				return false;
				break;
			
			case -947031628:
			case -572349828:
			case 392730790:
			case -1523701417:
			case -2112826155:
			case -664359727:
			case -1887867191:
			case -837150131:
			case -344484024:
			case joaat("weapon_flaregun"):
			case joaat("weapon_handcuffs"):
			case joaat("weapon_snowball"):
			case joaat("weapon_garbagebag"):
			case joaat("weapon_flashlight"):
			case joaat("weapon_switchblade"):
			case joaat("weapon_revolver"):
			case joaat("weapon_dbshotgun"):
			case joaat("weapon_compactrifle"):
			case 317205821:
			case -1121678507:
			case 125959754:
			case -853065399:
			case -1169823560:
			case -1810795771:
			case 419712736:
				return true;
				break;
			}
	}
	return false;
}

int func_281(int iParam0, int iParam1)//Position - 0xF94D
{
	int iVar0;
	int iVar1;
	var uVar2;
	struct<4> Var41;
	
	iVar0 = 0;
	switch (iParam0)
	{
		case joaat("weapon_pistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_pistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_pistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp_02");
					break;
				
				case 4:
					iVar0 = joaat("component_pistol_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_combatpistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_combatpistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_combatpistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp");
					break;
				
				case 4:
					iVar0 = joaat("component_combatpistol_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_appistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_appistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_appistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp");
					break;
				
				case 4:
					iVar0 = joaat("component_appistol_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_microsmg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_microsmg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_microsmg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_macro");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 5:
					iVar0 = joaat("component_microsmg_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_smg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_smg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_smg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_smg_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_pi_supp");
					break;
				
				case 5:
					iVar0 = joaat("component_at_scope_macro_02");
					break;
				
				case 6:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 7:
					iVar0 = joaat("component_smg_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_assaultrifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_assaultrifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_assaultrifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_assaultrifle_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 5:
					iVar0 = joaat("component_at_scope_macro");
					break;
				
				case 6:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 7:
					iVar0 = joaat("component_assaultrifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_carbinerifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_carbinerifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_carbinerifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_carbinerifle_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_railcover_01");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 6:
					iVar0 = joaat("component_at_scope_medium");
					break;
				
				case 7:
					iVar0 = joaat("component_at_ar_supp");
					break;
				
				case 8:
					iVar0 = joaat("component_carbinerifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_advancedrifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_advancedrifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_advancedrifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_small");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp");
					break;
				
				case 5:
					iVar0 = joaat("component_advancedrifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_mg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_mg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_mg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_small_02");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 4:
					iVar0 = joaat("component_mg_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_combatmg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_combatmg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_combatmg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_medium");
					break;
				
				case 4:
					iVar0 = joaat("component_combatmg_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_pumpshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_at_sr_supp");
					break;
				
				case 1:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 2:
					iVar0 = joaat("component_pumpshotgun_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_assaultshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_assaultshotgun_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_assaultshotgun_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp");
					break;
			}
			break;
		
		case joaat("weapon_sniperrifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_sniperrifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_at_scope_large");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_max");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 4:
					iVar0 = joaat("component_sniperrifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_heavysniper"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_heavysniper_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_at_scope_large");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_max");
					break;
			}
			break;
		
		case joaat("weapon_grenadelauncher"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 1:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_small");
					break;
			}
			break;
		
		case joaat("weapon_minigun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_minigun_clip_01");
					break;
			}
			break;
		
		case joaat("weapon_assaultsmg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_assaultsmg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_assaultsmg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_macro");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 5:
					iVar0 = joaat("component_assaultsmg_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_bullpupshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 1:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
			}
			break;
		
		case joaat("weapon_pistol50"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_pistol50_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_pistol50_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 4:
					iVar0 = joaat("component_pistol50_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_combatpdw"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_combatpdw_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_combatpdw_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_combatpdw_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_scope_small");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
			}
			break;
		
		case joaat("weapon_sawnoffshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_sawnoffshotgun_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_bullpuprifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_bullpuprifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_bullpuprifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_small");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 6:
					iVar0 = joaat("component_bullpuprifle_varmod_low");
					break;
			}
			break;
		
		case joaat("weapon_snspistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_snspistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_snspistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_snspistol_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_specialcarbine"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_specialcarbine_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_specialcarbine_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_specialcarbine_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_scope_medium");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 6:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 7:
					iVar0 = joaat("component_specialcarbine_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_knuckle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_knuckle_varmod_pimp");
					break;
				
				case 1:
					iVar0 = joaat("component_knuckle_varmod_ballas");
					break;
				
				case 2:
					iVar0 = joaat("component_knuckle_varmod_dollar");
					break;
				
				case 3:
					iVar0 = joaat("component_knuckle_varmod_diamond");
					break;
				
				case 4:
					iVar0 = joaat("component_knuckle_varmod_hate");
					break;
				
				case 5:
					iVar0 = joaat("component_knuckle_varmod_love");
					break;
				
				case 6:
					iVar0 = joaat("component_knuckle_varmod_player");
					break;
				
				case 7:
					iVar0 = joaat("component_knuckle_varmod_king");
					break;
				
				case 8:
					iVar0 = joaat("component_knuckle_varmod_vagos");
					break;
			}
			break;
		
		case joaat("weapon_machinepistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_machinepistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_machinepistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_machinepistol_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp");
					break;
			}
			break;
		
		case joaat("weapon_switchblade"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_switchblade_varmod_var1");
					break;
				
				case 1:
					iVar0 = joaat("component_switchblade_varmod_var2");
					break;
			}
			break;
		
		case joaat("weapon_revolver"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_revolver_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_revolver_varmod_boss");
					break;
				
				case 2:
					iVar0 = joaat("component_revolver_varmod_goon");
					break;
			}
			break;
		
		case -1121678507:
			switch (iParam1)
			{
				case 0:
					iVar0 = -2067221805;
					break;
				
				case 1:
					iVar0 = -1820405577;
					break;
			}
			break;
		
		default:
			if (iParam0 != 0)
			{
				iVar1 = func_282(iParam0, &uVar2);
				if (iVar1 != -1)
				{
					if (iParam1 < dlc1::get_num_dlc_weapon_components(iVar1))
					{
						if (dlc1::get_dlc_weapon_component_data(iVar1, iParam1, &Var41))
						{
							return Var41.f_3;
						}
					}
				}
			}
			break;
	}
	return iVar0;
}

int func_282(int iParam0, var uParam1)//Position - 0x1043A
{
	int iVar0;
	int iVar1;
	
	iVar1 = dlc1::get_num_dlc_weapons();
	iVar0 = 0;
	while (iVar0 < iVar1)
	{
		if (dlc1::get_dlc_weapon_data(iVar0, uParam1))
		{
			if (uParam1->f_1 == iParam0)
			{
				return iVar0;
			}
		}
		iVar0++;
	}
	return -1;
}

int func_283(int iParam0)//Position - 0x10475
{
	int iVar0;
	
	iVar0 = 0;
	switch (iParam0)
	{
		case 0:
			iVar0 = 1993361168;
			break;
		
		case 1:
			iVar0 = 1277010230;
			break;
		
		case 2:
			iVar0 = 932043479;
			break;
		
		case 3:
			iVar0 = -690654591;
			break;
		
		case 4:
			iVar0 = -1459198205;
			break;
		
		case 5:
			iVar0 = 195782970;
			break;
		
		case 6:
			iVar0 = -438797331;
			break;
		
		case 7:
			iVar0 = 896793492;
			break;
		
		case 8:
			iVar0 = 495159329;
			break;
		
		case 9:
			iVar0 = -1155528315;
			break;
		
		case 10:
			iVar0 = -515636489;
			break;
		
		case 11:
			iVar0 = -871913299;
			break;
		
		case 12:
			iVar0 = -1352759032;
			break;
		
		case 13:
			iVar0 = -542958961;
			break;
		
		case 14:
			iVar0 = 1682645887;
			break;
		
		case 15:
			iVar0 = -859470162;
			break;
		
		case 16:
			iVar0 = -2125426402;
			break;
		
		case 17:
			iVar0 = 2067210266;
			break;
		
		case 18:
			iVar0 = -538172856;
			break;
		
		case 19:
			iVar0 = 1783244476;
			break;
		
		case 20:
			iVar0 = 439844898;
			break;
		
		case 21:
			iVar0 = -24829327;
			break;
		
		case 22:
			iVar0 = 1949306232;
			break;
		
		case 23:
			iVar0 = -1941230881;
			break;
		
		case 24:
			iVar0 = -1033554448;
			break;
		
		case 25:
			iVar0 = 320513715;
			break;
		
		case 26:
			iVar0 = -695165975;
			break;
		
		case 27:
			iVar0 = -281028447;
			break;
		
		case 28:
			iVar0 = -686713772;
			break;
		
		case 29:
			iVar0 = 347509793;
			break;
		
		case 30:
			iVar0 = 1769089473;
			break;
		
		case 31:
			iVar0 = 189935548;
			break;
		
		case 33:
			iVar0 = 248801358;
			break;
		
		case 34:
			iVar0 = 386596758;
			break;
		
		case 35:
			iVar0 = -157212362;
			break;
		
		case 36:
			iVar0 = 436985596;
			break;
		
		case 37:
			iVar0 = -47957369;
			break;
		
		case 38:
			iVar0 = 575938238;
			break;
	}
	return iVar0;
}

void func_284(int iParam0)//Position - 0x106E9
{
	int iVar0;
	
	iVar0 = func_37(iParam0);
	if (func_36(iVar0) && !ped::is_ped_injured(iParam0))
	{
		Global_101553.f_1991.f_539.f_294[iVar0] = ped::get_ped_armour(iParam0);
	}
}

void func_285(var uParam0, int iParam1)//Position - 0x10725
{
	int iVar0;
	vector3 vVar1;
	var uVar4;
	int iVar5;
	
	*uParam0 = { entity::get_entity_coords(player::player_ped_id(), 1) };
	uParam0->f_3 = entity::get_entity_heading(player::player_ped_id());
	uParam0->f_5 = ped::get_ped_parachute_state(player::player_ped_id());
	if (player::is_player_playing(player::player_id()))
	{
		uParam0->f_4 = player::get_player_wanted_level(player::player_id());
	}
	if (system::vdist(*uParam0, 320.9934f, 265.2515f, 82.1221f) < 10f)
	{
		*uParam0 = { 301.2162f, 202.1357f, 103.3797f };
		uParam0->f_3 = 156.5144f;
	}
	else if (system::vdist(*uParam0, 377.153f, -717.567f, 10.0536f) < 10f)
	{
		*uParam0 = { 394.2567f, -713.5439f, 28.2853f };
		uParam0->f_3 = 276.6273f;
	}
	else if (system::vdist(*uParam0, -1425.564f, -244.3f, 15.8053f) < 10f)
	{
		*uParam0 = { -1423.472f, -214.2539f, 45.5004f };
		uParam0->f_3 = 353.8757f;
	}
	else if (script::_get_number_of_instances_of_streamed_script(joaat("finale_choice")) > 0)
	{
		*uParam0 = { 4.2587f, 525.0214f, 173.6281f };
		uParam0->f_3 = 203.6746f;
	}
	else if (gameplay::is_bit_set(Global_69865, 4))
	{
		*uParam0 = { 452.0255f, 5571.85f, 780.1859f };
		uParam0->f_3 = 78.9858f;
	}
	else if (gameplay::is_bit_set(Global_69865, 5))
	{
		*uParam0 = { -745.4462f, 5595.146f, 40.6594f };
		uParam0->f_3 = 261.747f;
	}
	else if (gameplay::is_bit_set(Global_69865, 6))
	{
		*uParam0 = { -1675.521f, -1125.59f, 12.091f };
		uParam0->f_3 = 271.8208f;
	}
	else if (gameplay::is_bit_set(Global_69865, 7))
	{
		*uParam0 = { -1631.219f, -1112.805f, 12.0212f };
		uParam0->f_3 = 316.8879f;
	}
	else if (interior::get_interior_from_entity(player::player_ped_id()) == interior::get_interior_at_coords_with_type(1272.659f, -1715.467f, 53.7715f, "v_lesters"))
	{
		*uParam0 = { 1276.956f, -1725.189f, 53.6551f };
		uParam0->f_3 = 204.1703f;
	}
	else if (entity::is_entity_in_angled_area(player::player_ped_id(), -415.4365f, 2068.289f, 113.3002f, -564.9516f, 1884.703f, 134.0403f, 258.75f, 0, true, 0) || entity::is_entity_in_angled_area(player::player_ped_id(), -596.4706f, 2089.921f, 125.4128f, -581.2134f, 2036.256f, 136.2836f, 9.5f, 0, true, 0))
	{
		*uParam0 = { -601.59f, 2099.197f, 128.8928f };
		uParam0->f_3 = 204.7498f;
	}
	else if (system::vdist(*uParam0, -1007.393f, -477.9584f, 52.5357f) < 8f)
	{
		*uParam0 = { -1018.376f, -483.9436f, 36.0964f };
		uParam0->f_3 = 114.7664f;
	}
	else if (system::vdist(*uParam0, 480.6662f, -1317.808f, 28.20303f) < 15f)
	{
		*uParam0 = { 497.7238f, -1310.932f, 28.2372f };
		uParam0->f_3 = 289.3663f;
	}
	else if (system::vdist(*uParam0, 2329.527f, 2571.311f, 45.6779f) < 5f)
	{
		*uParam0 = { 2316.93f, 2594.153f, 45.7199f };
		uParam0->f_3 = 348.1325f;
	}
	if (iParam1 == 1)
	{
		if (func_288(&iVar0))
		{
			if (func_287(iVar0, &vVar1, &uVar4))
			{
				vVar1.z = (vVar1.y + 1f);
				*uParam0 = { vVar1 };
				uParam0->f_3 = uVar4;
			}
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), 207.4336f, -1019.795f, -100.4728f, 189.9338f, -1019.623f, -95.56883f, 17.1875f, 0, true, 0))
		{
			iVar5 = func_34();
			if (iVar5 == 0)
			{
				*uParam0 = { -65.1234f, 81.2517f, 70.5644f };
				uParam0->f_3 = 71.6237f;
			}
			else if (iVar5 == 1)
			{
				*uParam0 = { -68.5531f, -1824.377f, 25.9424f };
				uParam0->f_3 = 215.8295f;
			}
			else if (iVar5 == 2)
			{
				*uParam0 = { -220.8189f, -1162.302f, 22.0242f };
				uParam0->f_3 = 70.2711f;
			}
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), 483.7175f, -1326.63f, 28.2135f, 474.9644f, -1307.998f, 34.49498f, 12f, 0, true, 0))
		{
			*uParam0 = { 495.4108f, -1306.08f, 29.2883f };
			uParam0->f_3 = 213.6273f;
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), -1146.77f, -1534.22f, 3.37f, -1158.453f, -1517.75f, 6.374244f, 13f, 0, true, 0))
		{
			*uParam0 = { -1160.095f, -1515.407f, 3.1496f };
			uParam0->f_3 = 305.6424f;
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), 439.5432f, -996.9769f, 24.88307f, 428.2935f, -997.0192f, 28.57458f, 8.5f, 0, true, 0))
		{
			*uParam0 = { 431.8853f, -1013.133f, 28.7907f };
			uParam0->f_3 = 186.6814f;
		}
		else if (func_286(*uParam0, "v_hospital", 307.3065f, -589.9595f, 43.302f))
		{
			*uParam0 = { 279.4137f, -585.8815f, 43.2502f };
			uParam0->f_3 = 48.8028f;
		}
	}
}

bool func_286(vector3 vParam0, char* sParam3, vector3 vParam4)//Position - 0x10C80
{
	int iVar0;
	int iVar1;
	
	if (!interior::_are_coords_colliding_with_exterior(vParam0))
	{
		iVar0 = interior::get_interior_at_coords_with_type(vParam4, sParam3);
		if (!interior::is_valid_interior(iVar0))
		{
			return false;
		}
		iVar1 = interior::get_interior_from_collision(vParam0);
		if (iVar1 == iVar0)
		{
			return true;
		}
	}
	return false;
}

int func_287(int iParam0, var uParam1, var uParam2)//Position - 0x10CC4
{
	*uParam1 = { 0f, 0f, 0f };
	*uParam2 = 0f;
	switch (iParam0)
	{
		case 0:
			*uParam1 = { -829.842f, -191.7454f, 36.4386f };
			*uParam2 = 29.5061f;
			break;
		
		case 1:
			*uParam1 = { 129.8484f, -1716.528f, 28.0702f };
			*uParam2 = 50.3483f;
			break;
		
		case 2:
			*uParam1 = { -1296.913f, -1120.999f, 5.3951f };
			*uParam2 = 0.9933f;
			break;
		
		case 3:
			*uParam1 = { 1938.028f, 3718.736f, 31.3154f };
			*uParam2 = 118.2305f;
			break;
		
		case 4:
			*uParam1 = { 1197.866f, -469.3809f, 65.0885f };
			*uParam2 = 346.4477f;
			break;
		
		case 5:
			*uParam1 = { -32.2161f, -135.8212f, 56.0532f };
			*uParam2 = 186.0052f;
			break;
		
		case 6:
			*uParam1 = { -287.7696f, 6238.081f, 30.2902f };
			*uParam2 = 316.1349f;
			break;
		
		case 7:
			*uParam1 = { 99.2876f, -1395.16f, 28.2759f };
			*uParam2 = 320.2739f;
			break;
		
		case 8:
			*uParam1 = { 1679.445f, 4819.056f, 41.0035f };
			*uParam2 = 4.6192f;
			break;
		
		case 9:
			*uParam1 = { 411.3063f, -809.1863f, 28.1554f };
			*uParam2 = 1.8972f;
			break;
		
		case 10:
			*uParam1 = { -1088.054f, 2699.167f, 19.2748f };
			*uParam2 = 129.7382f;
			break;
		
		case 11:
			*uParam1 = { 1194.163f, 2695.644f, 36.9225f };
			*uParam2 = 1.1454f;
			break;
		
		case 12:
			*uParam1 = { -821.2829f, -1088.027f, 10.0499f };
			*uParam2 = 120.5883f;
			break;
		
		case 13:
			*uParam1 = { -3.3416f, 6521.303f, 30.2961f };
			*uParam2 = 316.4451f;
			break;
		
		case 14:
			*uParam1 = { -1208.417f, -785.9635f, 16.0139f };
			*uParam2 = 36.3181f;
			break;
		
		case 15:
			*uParam1 = { 623.1845f, 2739.191f, 40.9588f };
			*uParam2 = 3.5411f;
			break;
		
		case 16:
			*uParam1 = { 130.9555f, -198.2084f, 53.41f };
			*uParam2 = 251.3506f;
			break;
		
		case 17:
			*uParam1 = { -3164.065f, 1067.317f, 19.6778f };
			*uParam2 = 101.2229f;
			break;
		
		case 18:
			*uParam1 = { -713.2797f, -174.2767f, 35.8962f };
			*uParam2 = 29.8138f;
			break;
		
		case 19:
			*uParam1 = { -147.0616f, -306.4322f, 37.7912f };
			*uParam2 = 160.4526f;
			break;
		
		case 20:
			*uParam1 = { -1461.355f, -230.6092f, 48.3064f };
			*uParam2 = 318.7851f;
			break;
		
		case 21:
			*uParam1 = { -1347.739f, -1278.573f, 3.8952f };
			*uParam2 = 17.9365f;
			break;
		
		case 22:
			*uParam1 = { 325.6833f, 164.3263f, 102.4425f };
			*uParam2 = 68.6407f;
			break;
		
		case 23:
			*uParam1 = { 1858.774f, 3742.393f, 32.0779f };
			*uParam2 = 301.2329f;
			break;
		
		case 24:
			*uParam1 = { -286.3272f, 6202.802f, 30.3323f };
			*uParam2 = 225.1334f;
			break;
		
		case 25:
			*uParam1 = { -1161.596f, -1417.7f, 3.712f };
			*uParam2 = 246.9161f;
			break;
		
		case 26:
			*uParam1 = { 1308.952f, -1660.611f, 50.2362f };
			*uParam2 = 163.5456f;
			break;
		
		case 27:
			*uParam1 = { -3161.585f, 1074.214f, 19.6847f };
			*uParam2 = 98.6092f;
			break;
		
		case 28:
			*uParam1 = { 28.423f, -1110.814f, 28.2848f };
			*uParam2 = 85.2495f;
			break;
		
		case 29:
			*uParam1 = { 1704.966f, 3749.709f, 33.0188f };
			*uParam2 = 45.6778f;
			break;
		
		case 30:
			*uParam1 = { 223.949f, -38.7894f, 68.6483f };
			*uParam2 = 159.4265f;
			break;
		
		case 31:
			*uParam1 = { 837.7854f, -1017.963f, 26.3045f };
			*uParam2 = 181.0445f;
			break;
		
		case 32:
			*uParam1 = { -313.1914f, 6093.351f, 30.4625f };
			*uParam2 = 315.8405f;
			break;
		
		case 33:
			*uParam1 = { -663.4631f, -952.8069f, 20.3143f };
			*uParam2 = 92.6796f;
			break;
		
		case 34:
			*uParam1 = { -1323.06f, -392.8577f, 35.4596f };
			*uParam2 = 210.7398f;
			break;
		
		case 35:
			*uParam1 = { -1106.102f, 2684.35f, 18.0953f };
			*uParam2 = 127.0383f;
			break;
		
		case 36:
			*uParam1 = { -3157.932f, 1081.309f, 19.6953f };
			*uParam2 = 100.2942f;
			break;
		
		case 37:
			*uParam1 = { 2562.882f, 312.8641f, 107.4612f };
			*uParam2 = 179.205f;
			break;
		
		case 38:
			*uParam1 = { 822.48f, -2142.875f, 27.8496f };
			*uParam2 = 355.0598f;
			break;
		
		case 39:
			*uParam1 = { -1137.053f, -1993.916f, 12.1677f };
			*uParam2 = 43.1213f;
			break;
		
		case 40:
			*uParam1 = { 717.8107f, -1084.081f, 21.3094f };
			*uParam2 = 93.2649f;
			break;
		
		case 41:
			*uParam1 = { -387.6789f, -128.2568f, 37.6796f };
			*uParam2 = 119.1085f;
			break;
		
		case 42:
			*uParam1 = { 117.8835f, 6599.415f, 31.0134f };
			*uParam2 = 90.7225f;
			break;
		
		case 43:
			*uParam1 = { 1201.709f, 2664.813f, 36.8102f };
			*uParam2 = 133.9002f;
			break;
		
		case 44:
			*uParam1 = { -200.1521f, -1297.502f, 30.296f };
			*uParam2 = 269.0687f;
			break;
		
		case 45:
			*uParam1 = { 0f, 0f, 0f };
			*uParam2 = 0f;
			break;
	}
	return !func_137(*uParam1, 0f, 0f, 0f, 0);
}

bool func_288(var uParam0)//Position - 0x11353
{
	if (!entity::is_entity_dead(player::player_ped_id(), 0) && !ped::is_ped_injured(player::player_ped_id()))
	{
		if (func_299())
		{
			*uParam0 = func_294(entity::get_entity_coords(player::player_ped_id(), 0), 6, -1, 0, 1, -1);
			if (func_293(*uParam0) && !func_289(*uParam0))
			{
				return true;
			}
		}
	}
	return false;
}

int func_289(int iParam0)//Position - 0x113AE
{
	return func_290(iParam0, 0, 1);
}

int func_290(int iParam0, int iParam1, int iParam2)//Position - 0x113BE
{
	if (iParam2)
	{
		return gameplay::is_bit_set(Global_91458.f_1308[iParam0], iParam1);
	}
	else if (network::network_is_game_in_progress())
	{
		if (func_292() == 0)
		{
			return gameplay::is_bit_set(func_271(func_291(iParam0), -1, 0), iParam1);
		}
	}
	else
	{
		return gameplay::is_bit_set(Global_101553.f_668[iParam0], iParam1);
	}
	return false;
}

int func_291(int iParam0)//Position - 0x1141E
{
	switch (iParam0)
	{
		case 0:
			return 820;
			break;
		
		case 1:
			return 821;
			break;
		
		case 2:
			return 822;
			break;
		
		case 3:
			return 823;
			break;
		
		case 4:
			return 824;
			break;
		
		case 5:
			return 825;
			break;
		
		case 6:
			return 826;
			break;
		
		case 7:
			return 827;
			break;
		
		case 8:
			return 828;
			break;
		
		case 9:
			return 829;
			break;
		
		case 10:
			return 830;
			break;
		
		case 11:
			return 831;
			break;
		
		case 12:
			return 832;
			break;
		
		case 13:
			return 833;
			break;
		
		case 14:
			return 834;
			break;
		
		case 15:
			return 836;
			break;
		
		case 16:
			return 837;
			break;
		
		case 17:
			return 838;
			break;
		
		case 18:
			return 839;
			break;
		
		case 19:
			return 840;
			break;
		
		case 20:
			return 841;
			break;
		
		case 21:
			return 842;
			break;
		
		case 22:
			return 843;
			break;
		
		case 23:
			return 844;
			break;
		
		case 24:
			return 845;
			break;
		
		case 25:
			return 846;
			break;
		
		case 26:
			return 847;
			break;
		
		case 27:
			return 848;
			break;
		
		case 28:
			return 849;
			break;
		
		case 29:
			return 850;
			break;
		
		case 30:
			return 851;
			break;
		
		case 31:
			return 852;
			break;
		
		case 32:
			return 853;
			break;
		
		case 33:
			return 854;
			break;
		
		case 34:
			return 855;
			break;
		
		case 35:
			return 856;
			break;
		
		case 36:
			return 857;
			break;
		
		case 37:
			return 858;
			break;
		
		case 38:
			return 859;
			break;
		
		case 39:
			return 860;
			break;
		
		case 40:
			return 864;
			break;
		
		case 41:
			return 865;
			break;
		
		case 42:
			return 866;
			break;
		
		case 43:
			return 867;
			break;
		
		case 44:
			return 4442;
			break;
		
		case 45:
			return 3776;
			break;
		
		default:
			break;
	}
	return 4617;
}

var func_292()//Position - 0x116E5
{
	return Global_25185;
}

int func_293(int iParam0)//Position - 0x116F0
{
	return func_290(iParam0, 5, 1);
}

int func_294(vector3 vParam0, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7)//Position - 0x11700
{
	int iVar0;
	float fVar1;
	float fVar2;
	int iVar3;
	
	fVar2 = 1000000f;
	iVar3 = -1;
	iVar0 = 0;
	while (iVar0 <= 45)
	{
		if (iParam3 == 6 || iParam3 == func_298(iVar0))
		{
			if (!iParam5 || func_297(iVar0))
			{
				fVar1 = gameplay::get_distance_between_coords(vParam0, func_295(iVar0, 0), 1);
				if (((fVar1 < fVar2 && (fVar1 <= IntToFloat(iParam4) || iParam4 == -1)) && (iParam6 || iVar0 != 21)) && iVar0 != iParam7)
				{
					fVar2 = fVar1;
					iVar3 = iVar0;
				}
			}
		}
		iVar0++;
	}
	return iVar3;
}

Vector3 func_295(int iParam0, int iParam1)//Position - 0x117A2
{
	switch (iParam0)
	{
		case -1:
			return 0f, 0f, 0f;
			break;
		
		case 0:
			return -821.9946f, -187.1776f, 36.5689f;
			break;
		
		case 1:
			return 133.5702f, -1710.918f, 28.2916f;
			break;
		
		case 2:
			return -1287.082f, -1116.558f, 5.9901f;
			break;
		
		case 3:
			return 1933.119f, 3726.079f, 31.8444f;
			break;
		
		case 4:
			return 1208.333f, -470.917f, 65.208f;
			break;
		
		case 5:
			return -30.7448f, -148.4921f, 56.0765f;
			break;
		
		case 6:
			return -280.8165f, 6231.771f, 30.6955f;
			break;
		
		case 7:
			return 80.665f, -1391.669f, 28.3761f;
			break;
		
		case 8:
			return 1687.881f, 4820.55f, 41.0096f;
			break;
		
		case 9:
			return 419.531f, -807.5787f, 28.4896f;
			break;
		
		case 10:
			return -1094.049f, 2704.171f, 18.0873f;
			break;
		
		case 11:
			return 1197.972f, 2704.22f, 37.1572f;
			break;
		
		case 12:
			return -818.6218f, -1077.533f, 10.3282f;
			break;
		
		case 13:
			return -0.2361f, 6516.045f, 30.8684f;
			break;
		
		case 14:
			return -1199.809f, -776.6886f, 16.3237f;
			break;
		
		case 15:
			return 618.1857f, 2752.567f, 41.0881f;
			break;
		
		case 16:
			return 126.6853f, -212.5027f, 53.5578f;
			break;
		
		case 17:
			return -3168.966f, 1055.287f, 19.8632f;
			break;
		
		case 18:
			return -715.3598f, -155.7742f, 36.4105f;
			break;
		
		case 19:
			return -158.2199f, -304.9663f, 38.735f;
			break;
		
		case 20:
			return -1455.005f, -233.1862f, 48.7936f;
			break;
		
		case 21:
			return -1335.973f, -1278.555f, 3.8598f;
			break;
		
		case 22:
			return 321.6098f, 179.4165f, 102.5865f;
			break;
		
		case 23:
			return 1861.685f, 3750.08f, 32.0318f;
			break;
		
		case 24:
			return -290.1603f, 6199.095f, 30.4871f;
			break;
		
		case 25:
			return -1153.948f, -1425.019f, 3.9544f;
			break;
		
		case 26:
			return 1322.455f, -1651.125f, 51.1885f;
			break;
		
		case 27:
			return -3169.42f, 1074.727f, 19.8343f;
			break;
		
		case 28:
			return 17.6804f, -1114.288f, 28.797f;
			break;
		
		case 29:
			return 1697.979f, 3753.2f, 33.7053f;
			break;
		
		case 30:
			return 245.2711f, -45.8126f, 68.941f;
			break;
		
		case 31:
			return 844.1248f, -1025.571f, 27.1948f;
			break;
		
		case 32:
			return -325.8904f, 6077.026f, 30.4548f;
			break;
		
		case 33:
			return -664.2178f, -943.3646f, 20.8292f;
			break;
		
		case 34:
			return -1313.948f, -390.9637f, 35.592f;
			break;
		
		case 35:
			return -1111.238f, 2688.463f, 17.6131f;
			break;
		
		case 36:
			return -3165.231f, 1082.855f, 19.8438f;
			break;
		
		case 37:
			return 2569.612f, 302.576f, 107.7349f;
			break;
		
		case 38:
			return 811.8699f, -2149.102f, 28.6363f;
			break;
		
		case 39:
			return -1147.314f, -1992.434f, 12.1803f;
			break;
		
		case 40:
			return 724.524f, -1089.081f, 21.1692f;
			break;
		
		case 41:
			return -354.5272f, -135.4011f, 38.185f;
			break;
		
		case 42:
			return 113.2615f, 6624.28f, 30.7871f;
			break;
		
		case 43:
			return 1174.707f, 2644.45f, 36.7552f;
			break;
		
		case 44:
			if (iParam1)
			{
				return -211.5f, -1324.2f, 30.296f;
			}
			else
			{
				return -205.6654f, -1311.113f, 30.296f;
			}
			break;
		
		case 45:
			return func_296(Global_92918);
			break;
	}
	return 1000000f, 1000000f, 1000000f;
}

Vector3 func_296(int iParam0)//Position - 0x11CBC
{
	switch (iParam0)
	{
		case 1:
			return 1060f, -2990f, -35f;
			break;
		
		case 2:
			return 1060f, -2990f, -35f;
			break;
		
		case 3:
			return 1060f, -2990f, -35f;
			break;
		
		case 4:
			return 1102.515f, -3158.888f, -38.5186f;
			break;
		
		case 5:
			return 1005.861f, -3156.162f, -39.907f;
			break;
		
		default:
			return 0f, 0f, -200f;
			break;
	}
	return 0f, 0f, -200f;
}

int func_297(int iParam0)//Position - 0x11D66
{
	return func_290(iParam0, 0, 0);
}

int func_298(int iParam0)//Position - 0x11D76
{
	switch (iParam0)
	{
		case -1:
			return 6;
			break;
		
		case 0:
			return 0;
			break;
		
		case 1:
			return 0;
			break;
		
		case 2:
			return 0;
			break;
		
		case 3:
			return 0;
			break;
		
		case 4:
			return 0;
			break;
		
		case 5:
			return 0;
			break;
		
		case 6:
			return 0;
			break;
		
		case 7:
			return 1;
			break;
		
		case 8:
			return 1;
			break;
		
		case 9:
			return 1;
			break;
		
		case 10:
			return 1;
			break;
		
		case 11:
			return 1;
			break;
		
		case 12:
			return 1;
			break;
		
		case 13:
			return 1;
			break;
		
		case 14:
			return 1;
			break;
		
		case 15:
			return 1;
			break;
		
		case 16:
			return 1;
			break;
		
		case 17:
			return 1;
			break;
		
		case 18:
			return 1;
			break;
		
		case 19:
			return 1;
			break;
		
		case 20:
			return 1;
			break;
		
		case 21:
			return 1;
			break;
		
		case 22:
			return 2;
			break;
		
		case 23:
			return 2;
			break;
		
		case 24:
			return 2;
			break;
		
		case 25:
			return 2;
			break;
		
		case 26:
			return 2;
			break;
		
		case 27:
			return 2;
			break;
		
		case 28:
			return 3;
			break;
		
		case 29:
			return 3;
			break;
		
		case 30:
			return 3;
			break;
		
		case 31:
			return 3;
			break;
		
		case 32:
			return 3;
			break;
		
		case 33:
			return 3;
			break;
		
		case 34:
			return 3;
			break;
		
		case 35:
			return 3;
			break;
		
		case 36:
			return 3;
			break;
		
		case 37:
			return 3;
			break;
		
		case 38:
			return 3;
			break;
		
		case 39:
			return 4;
			break;
		
		case 40:
			return 4;
			break;
		
		case 41:
			return 4;
			break;
		
		case 42:
			return 4;
			break;
		
		case 43:
			return 4;
			break;
		
		case 44:
			return 4;
			break;
		
		case 45:
			return 5;
			break;
	}
	return 6;
}

int func_299()//Position - 0x11FE9
{
	return Global_91458.f_303 > 0;
}

var func_300()//Position - 0x11FFA
{
	var uVar0;
	
	func_310(&uVar0, time::get_clock_seconds());
	func_309(&uVar0, time::get_clock_minutes());
	func_308(&uVar0, time::get_clock_hours());
	func_303(&uVar0, time::get_clock_day_of_month());
	func_302(&uVar0, time::get_clock_month());
	func_301(&uVar0, time::get_clock_year());
	return uVar0;
}

void func_301(var uParam0, int iParam1)//Position - 0x12040
{
	if (iParam1 <= 0)
	{
		return;
	}
	if (iParam1 > 2043 || iParam1 < 1979)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 2080374784);
	if (iParam1 < 2011)
	{
		*uParam0 = (*uParam0 || system::shift_left((2011 - iParam1), 26));
		*uParam0 |= -2147483648;
	}
	else
	{
		*uParam0 = (*uParam0 || system::shift_left((iParam1 - 2011), 26));
		*uParam0 = (*uParam0 - *uParam0 & -2147483648);
	}
}

void func_302(var uParam0, int iParam1)//Position - 0x120C6
{
	if (iParam1 < 0 || iParam1 > 11)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 15);
	*uParam0 = (*uParam0 || iParam1);
}

void func_303(var uParam0, int iParam1)//Position - 0x120F9
{
	int iVar0;
	int iVar1;
	
	iVar0 = func_307(*uParam0);
	iVar1 = func_305(*uParam0);
	if (iParam1 < 1 || iParam1 > func_304(iVar0, iVar1))
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 496);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 4));
}

int func_304(int iParam0, int iParam1)//Position - 0x1214A
{
	if (iParam1 < 0)
	{
		iParam1 = 0;
	}
	switch (iParam0)
	{
		case 0:
		case 2:
		case 4:
		case 6:
		case 7:
		case 9:
		case 11:
			return 31;
			break;
		
		case 3:
		case 5:
		case 8:
		case 10:
			return 30;
			break;
		
		case 1:
			if ((iParam1 % 4) == 0)
			{
				if ((iParam1 % 100) != 0)
				{
					return 29;
				}
				else if ((iParam1 % 400) == 0)
				{
					return 29;
				}
			}
			return 28;
			break;
	}
	return 30;
}

var func_305(int iParam0)//Position - 0x121EC
{
	return (system::shift_right(iParam0, 26) & 31 * func_306(gameplay::is_bit_set(iParam0, 31), -1, 1)) + 2011;
}

int func_306(int iParam0, int iParam1, int iParam2)//Position - 0x12211
{
	if (iParam0)
	{
		return iParam1;
	}
	return iParam2;
}

int func_307(var uParam0)//Position - 0x12228
{
	return uParam0 & 15;
}

void func_308(var uParam0, int iParam1)//Position - 0x12235
{
	if (iParam1 < 0 || iParam1 > 24)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 15872);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 9));
}

void func_309(var uParam0, int iParam1)//Position - 0x1226F
{
	if (iParam1 < 0 || iParam1 >= 60)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 1032192);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 14));
}

void func_310(var uParam0, int iParam1)//Position - 0x122AA
{
	if (iParam1 < 0 || iParam1 >= 60)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 66060288);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 20));
}

int func_311(char* sParam0)//Position - 0x122E6
{
	if (gameplay::are_strings_equal("BailBond1", sParam0))
	{
		return 0;
	}
	else if (gameplay::are_strings_equal("BailBond2", sParam0))
	{
		return 1;
	}
	else if (gameplay::are_strings_equal("BailBond3", sParam0))
	{
		return 2;
	}
	else if (gameplay::are_strings_equal("BailBond4", sParam0))
	{
		return 3;
	}
	return -1;
}

struct<2> func_312(int iParam0)//Position - 0x1233C
{
	struct<2> Var0;
	
	StringCopy(&Var0, "", 8);
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var0, "ABI1", 8);
			break;
		
		case 1:
			StringCopy(&Var0, "ABI2", 8);
			break;
		
		case 2:
			StringCopy(&Var0, "BA1", 8);
			break;
		
		case 3:
			StringCopy(&Var0, "BA2", 8);
			break;
		
		case 4:
			StringCopy(&Var0, "BA3", 8);
			break;
		
		case 5:
			StringCopy(&Var0, "BA3A", 8);
			break;
		
		case 6:
			StringCopy(&Var0, "BA3C", 8);
			break;
		
		case 7:
			StringCopy(&Var0, "BA4", 8);
			break;
		
		case 8:
			StringCopy(&Var0, "DRE1", 8);
			break;
		
		case 9:
			StringCopy(&Var0, "EPS1", 8);
			break;
		
		case 10:
			StringCopy(&Var0, "EPS2", 8);
			break;
		
		case 11:
			StringCopy(&Var0, "EPS3", 8);
			break;
		
		case 12:
			StringCopy(&Var0, "EPS4", 8);
			break;
		
		case 13:
			StringCopy(&Var0, "EPS5", 8);
			break;
		
		case 14:
			StringCopy(&Var0, "EPS6", 8);
			break;
		
		case 15:
			StringCopy(&Var0, "EPS7", 8);
			break;
		
		case 16:
			StringCopy(&Var0, "EPS8", 8);
			break;
		
		case 17:
			StringCopy(&Var0, "EXT1", 8);
			break;
		
		case 18:
			StringCopy(&Var0, "EXT2", 8);
			break;
		
		case 19:
			StringCopy(&Var0, "EXT3", 8);
			break;
		
		case 20:
			StringCopy(&Var0, "EXT4", 8);
			break;
		
		case 21:
			StringCopy(&Var0, "FAN1", 8);
			break;
		
		case 22:
			StringCopy(&Var0, "FAN2", 8);
			break;
		
		case 23:
			StringCopy(&Var0, "FAN3", 8);
			break;
		
		case 24:
			StringCopy(&Var0, "HAO1", 8);
			break;
		
		case 25:
			StringCopy(&Var0, "HUN1", 8);
			break;
		
		case 26:
			StringCopy(&Var0, "HUN2", 8);
			break;
		
		case 27:
			StringCopy(&Var0, "JOS1", 8);
			break;
		
		case 28:
			StringCopy(&Var0, "JOS2", 8);
			break;
		
		case 29:
			StringCopy(&Var0, "JOS3", 8);
			break;
		
		case 30:
			StringCopy(&Var0, "JOS4", 8);
			break;
		
		case 31:
			StringCopy(&Var0, "MAU1", 8);
			break;
		
		case 32:
			StringCopy(&Var0, "MIN1", 8);
			break;
		
		case 33:
			StringCopy(&Var0, "MIN2", 8);
			break;
		
		case 34:
			StringCopy(&Var0, "MIN3", 8);
			break;
		
		case 35:
			StringCopy(&Var0, "MRS1", 8);
			break;
		
		case 36:
			StringCopy(&Var0, "MRS2", 8);
			break;
		
		case 37:
			StringCopy(&Var0, "NI1", 8);
			break;
		
		case 38:
			StringCopy(&Var0, "NI1A", 8);
			break;
		
		case 39:
			StringCopy(&Var0, "NI1B", 8);
			break;
		
		case 40:
			StringCopy(&Var0, "NI1C", 8);
			break;
		
		case 41:
			StringCopy(&Var0, "NI1D", 8);
			break;
		
		case 42:
			StringCopy(&Var0, "NI2", 8);
			break;
		
		case 43:
			StringCopy(&Var0, "NI3", 8);
			break;
		
		case 44:
			StringCopy(&Var0, "OME1", 8);
			break;
		
		case 45:
			StringCopy(&Var0, "OME2", 8);
			break;
		
		case 46:
			StringCopy(&Var0, "PA1", 8);
			break;
		
		case 47:
			StringCopy(&Var0, "PA2", 8);
			break;
		
		case 48:
			StringCopy(&Var0, "PA3", 8);
			break;
		
		case 49:
			StringCopy(&Var0, "PA3A", 8);
			break;
		
		case 50:
			StringCopy(&Var0, "PA3B", 8);
			break;
		
		case 51:
			StringCopy(&Var0, "PA4", 8);
			break;
		
		case 52:
			StringCopy(&Var0, "RAM1", 8);
			break;
		
		case 53:
			StringCopy(&Var0, "RAM2", 8);
			break;
		
		case 54:
			StringCopy(&Var0, "RAM3", 8);
			break;
		
		case 55:
			StringCopy(&Var0, "RAM4", 8);
			break;
		
		case 56:
			StringCopy(&Var0, "RAM5", 8);
			break;
		
		case 57:
			StringCopy(&Var0, "SAS1", 8);
			break;
		
		case 58:
			StringCopy(&Var0, "TON1", 8);
			break;
		
		case 59:
			StringCopy(&Var0, "TON2", 8);
			break;
		
		case 60:
			StringCopy(&Var0, "TON3", 8);
			break;
		
		case 61:
			StringCopy(&Var0, "TON4", 8);
			break;
		
		case 62:
			StringCopy(&Var0, "TON5", 8);
			break;
		
		default:
			break;
	}
	return Var0;
}

int func_313(char* sParam0, int iParam1)//Position - 0x12788
{
	int iVar0;
	char* sVar1;
	int iVar33;
	int iVar34;
	
	iVar33 = gameplay::get_hash_key(sParam0);
	iVar34 = 0;
	iVar34 = 0;
	while (iVar34 < 63)
	{
		iVar0 = iVar34;
		func_314(iVar0, &sVar1);
		if (gameplay::get_hash_key(sVar1) == iVar33)
		{
			return iVar0;
		}
		iVar34++;
	}
	if (iParam1 == 0)
	{
	}
	return -1;
}

void func_314(int iParam0, var uParam1)//Position - 0x127D1
{
	switch (iParam0)
	{
		case 0:
			func_315(uParam1, "Abigail1", func_317(iParam0), 0, 0, 4, -1604.668f, 5239.1f, 3.01f, 66, "", 109, 0, "ambient_Diving", 0, 0, 1, 4, 1, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 1:
			func_315(uParam1, "Abigail2", func_317(iParam0), 0, 0, 4, -1592.84f, 5214.04f, 3.01f, 400, "", 110, 0, "", 0, 0, -1, 4, 1, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 2:
			func_315(uParam1, "Barry1", func_317(iParam0), 0, 1, 4, 190.26f, -956.35f, 29.63f, 381, "", 74, 0, "", 0, 1, -1, 4, 1, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 3:
			func_315(uParam1, "Barry2", func_317(iParam0), 0, 1, 4, 190.26f, -956.35f, 29.63f, 381, "", -1, 0, "", 0, 1, -1, 4, 4, 0, 2359, func_316(iParam0), 1, 1);
			break;
		
		case 4:
			func_315(uParam1, "Barry3", func_317(iParam0), 0, 1, 4, 414f, -761f, 29f, 381, "", -1, 0, "", 164, 1, -1, 0, 2, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 5:
			func_315(uParam1, "Barry3A", func_317(iParam0), 1, 1, 0, 1199.27f, -1255.63f, 34.23f, 381, "BARSTASH", 84, 0, "", 166, 0, 7, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 6:
			func_315(uParam1, "Barry3C", func_317(iParam0), 3, 1, 0, -468.9f, -1713.06f, 18.21f, 381, "", 84, 0, "", 166, 0, 7, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 7:
			func_315(uParam1, "Barry4", func_317(iParam0), 0, 1, 4, 237.65f, -385.41f, 44.4f, 381, "", 85, 0, "postRC_Barry4", 0, 0, -1, 4, 2, 800, 2000, func_316(iParam0), 0, 0);
			break;
		
		case 8:
			func_315(uParam1, "Dreyfuss1", func_317(iParam0), 0, 2, 4, -1458.97f, 485.99f, 115.38f, 66, "LETTERS_HINT", 106, 0, "", 0, 0, -1, 4, 2, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 9:
			func_315(uParam1, "Epsilon1", func_317(iParam0), 0, 3, 4, -1622.89f, 4204.87f, 83.3f, 66, "", 86, 0, "", 0, 1, 10, 4, 1, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 10:
			func_315(uParam1, "Epsilon2", func_317(iParam0), 0, 3, 4, 242.7f, 362.7f, 104.74f, 206, "", 87, 16, "", 0, 0, 11, 4, 1, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 11:
			func_315(uParam1, "Epsilon3", func_317(iParam0), 0, 3, 4, 1835.53f, 4705.86f, 38.1f, 206, "", 88, 16, "epsCars", 0, 0, 12, 4, 1, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 12:
			func_315(uParam1, "Epsilon4", func_317(iParam0), 0, 3, 4, 1826.13f, 4698.88f, 38.92f, 206, "", 90, 16, "postRC_Epsilon4", 0, 0, 13, 4, 1, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 13:
			func_315(uParam1, "Epsilon5", func_317(iParam0), 0, 3, 4, 637.02f, 119.7093f, 89.5f, 206, "", 89, 16, "epsRobes", 0, 0, 14, 4, 1, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 14:
			func_315(uParam1, "Epsilon6", func_317(iParam0), 0, 3, 4, -2892.93f, 3192.37f, 11.66f, 206, "", 93, 0, "", 0, 0, 15, 4, 1, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 15:
			func_315(uParam1, "Epsilon7", func_317(iParam0), 0, 3, 4, 524.43f, 3079.82f, 39.48f, 206, "", -1, 16, "epsDesert", 0, 0, 16, 4, 1, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 16:
			func_315(uParam1, "Epsilon8", func_317(iParam0), 0, 3, 4, -697.75f, 45.38f, 43.03f, 206, "", 94, 16, "epsilonTract", 0, 0, -1, 4, 1, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 17:
			func_315(uParam1, "Extreme1", func_317(iParam0), 0, 4, 4, -188.22f, 1296.1f, 302.86f, 66, "", -1, 0, "", 4, 1, 18, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 18:
			func_315(uParam1, "Extreme2", func_317(iParam0), 0, 4, 4, -954.19f, -2760.05f, 14.64f, 382, "", 96, 0, "", 171, 0, 19, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 19:
			func_315(uParam1, "Extreme3", func_317(iParam0), 0, 4, 4, -63.8f, -809.5f, 321.8f, 382, "", 97, 0, "", 0, 0, 20, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 20:
			func_315(uParam1, "Extreme4", func_317(iParam0), 0, 4, 4, 1731.41f, 96.96f, 170.39f, 382, "", 98, 16, "", 0, 0, -1, 4, 2, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 21:
			func_315(uParam1, "Fanatic1", func_317(iParam0), 0, 5, 4, -1877.82f, -440.649f, 45.05f, 405, "", 74, 0, "", 0, 1, -1, 4, 1, 700, 2000, func_316(iParam0), 1, 0);
			break;
		
		case 22:
			func_315(uParam1, "Fanatic2", func_317(iParam0), 0, 5, 4, 809.66f, 1279.76f, 360.49f, 405, "", -1, 0, "", 0, 1, -1, 4, 4, 700, 2000, func_316(iParam0), 1, 0);
			break;
		
		case 23:
			func_315(uParam1, "Fanatic3", func_317(iParam0), 0, 5, 4, -915.6f, 6139.2f, 5.5f, 405, "", -1, 0, "", 0, 1, -1, 4, 2, 700, 2000, func_316(iParam0), 0, 1);
			break;
		
		case 24:
			func_315(uParam1, "Hao1", func_317(iParam0), 0, 6, 4, -72.29f, -1260.63f, 28.14f, 66, "", -1, 0, "controller_Races", 13, 1, -1, 4, 2, 2000, 500, func_316(iParam0), 0, 1);
			break;
		
		case 25:
			func_315(uParam1, "Hunting1", func_317(iParam0), 0, 7, 4, 1804.32f, 3931.33f, 32.82f, 66, "", -1, 0, "", 174, 1, 26, 4, 4, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 26:
			func_315(uParam1, "Hunting2", func_317(iParam0), 0, 7, 4, -684.17f, 5839.16f, 16.09f, 384, "", 99, 0, "", 7, 0, -1, 4, 4, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 27:
			func_315(uParam1, "Josh1", func_317(iParam0), 0, 8, 4, -1104.93f, 291.25f, 64.3f, 66, "", -1, 0, "forSaleSigns", 0, 1, 28, 4, 4, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 28:
			func_315(uParam1, "Josh2", func_317(iParam0), 0, 8, 4, 565.39f, -1772.88f, 29.77f, 385, "", 105, 0, "", 0, 0, 29, 4, 4, 0, 2359, func_316(iParam0), 1, 1);
			break;
		
		case 29:
			func_315(uParam1, "Josh3", func_317(iParam0), 0, 8, 4, 565.39f, -1772.88f, 29.77f, 385, "", -1, 16, "", 0, 0, 30, 4, 4, 0, 2359, func_316(iParam0), 1, 1);
			break;
		
		case 30:
			func_315(uParam1, "Josh4", func_317(iParam0), 0, 8, 4, -1104.93f, 291.25f, 64.3f, 385, "", -1, 36, "", 0, 0, -1, 4, 4, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 31:
			func_315(uParam1, "Maude1", func_317(iParam0), 0, 9, 4, 2726.1f, 4145f, 44.3f, 66, "", -1, 0, "BailBond_Launcher", 0, 1, -1, 4, 4, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 32:
			func_315(uParam1, "Minute1", func_317(iParam0), 0, 10, 4, 327.85f, 3405.7f, 35.73f, 66, "", -1, 0, "", 0, 1, 33, 4, 4, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 33:
			func_315(uParam1, "Minute2", func_317(iParam0), 0, 10, 4, 18f, 4527f, 105f, 386, "", -1, 10, "", 0, 0, 34, 4, 4, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 34:
			func_315(uParam1, "Minute3", func_317(iParam0), 0, 10, 4, -303.82f, 6211.29f, 31.05f, 386, "", -1, 10, "", 0, 0, -1, 4, 4, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 35:
			func_315(uParam1, "MrsPhilips1", func_317(iParam0), 0, 11, 4, 1972.59f, 3816.43f, 32.42f, 66, "", -1, 0, "ambient_MrsPhilips", 0, 1, -1, 4, 4, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 36:
			func_315(uParam1, "MrsPhilips2", func_317(iParam0), 0, 11, 4, 0f, 0f, 0f, -1, "", -1, 0, "", 0, 1, -1, 4, 4, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 37:
			func_315(uParam1, "Nigel1", func_317(iParam0), 0, 12, 4, -1097.16f, 790.01f, 164.52f, 66, "", -1, 0, "", 177, 1, -1, 1, 4, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 38:
			func_315(uParam1, "Nigel1A", func_317(iParam0), 0, 12, 1, -558.65f, 284.49f, 90.86f, 149, "NIGITEMS", 100, 0, "", 0, 0, 42, 4, 4, 0, 2359, func_316(iParam0), 1, 1);
			break;
		
		case 39:
			func_315(uParam1, "Nigel1B", func_317(iParam0), 0, 12, 1, -1034.15f, 366.08f, 80.11f, 149, "", 100, 0, "", 0, 0, 42, 4, 4, 700, 2000, func_316(iParam0), 1, 1);
			break;
		
		case 40:
			func_315(uParam1, "Nigel1C", func_317(iParam0), 0, 12, 1, -623.91f, -266.17f, 37.76f, 149, "", 100, 0, "", 0, 0, 42, 4, 4, 700, 2000, func_316(iParam0), 1, 1);
			break;
		
		case 41:
			func_315(uParam1, "Nigel1D", func_317(iParam0), 0, 12, 1, -1096.85f, 67.68f, 52.95f, 149, "", 100, 0, "", 0, 0, 42, 4, 4, 700, 2000, func_316(iParam0), 1, 1);
			break;
		
		case 42:
			func_315(uParam1, "Nigel2", func_317(iParam0), 0, 12, 4, -1310.7f, -640.22f, 26.54f, 149, "", -1, 8, "", 0, 0, 43, 4, 4, 0, 2359, func_316(iParam0), 1, 1);
			break;
		
		case 43:
			func_315(uParam1, "Nigel3", func_317(iParam0), 0, 12, 4, -44.75f, -1288.67f, 28.21f, 149, "", -1, 16, "postRC_Nigel3", 0, 0, -1, 4, 4, 0, 2359, func_316(iParam0), 1, 1);
			break;
		
		case 44:
			func_315(uParam1, "Omega1", func_317(iParam0), 0, 13, 4, 2468.51f, 3437.39f, 49.9f, 66, "", -1, 0, "spaceshipParts", 0, 1, 45, 4, 2, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 45:
			func_315(uParam1, "Omega2", func_317(iParam0), 0, 13, 4, 2319.44f, 2583.58f, 46.76f, 387, "", 107, 0, "", 0, 0, -1, 4, 2, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 46:
			func_315(uParam1, "Paparazzo1", func_317(iParam0), 0, 14, 4, -149.75f, 285.81f, 93.67f, 66, "", -1, 0, "", 0, 1, 47, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 47:
			func_315(uParam1, "Paparazzo2", func_317(iParam0), 0, 14, 4, -70.71f, 301.43f, 106.79f, 389, "", -1, 8, "", 0, 0, 48, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 48:
			func_315(uParam1, "Paparazzo3", func_317(iParam0), 0, 14, 4, -257.22f, 292.85f, 90.63f, 389, "", -1, 8, "", 183, 1, -1, 2, 2, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 49:
			func_315(uParam1, "Paparazzo3A", func_317(iParam0), 0, 14, 2, 305.52f, 157.19f, 102.94f, 389, "PAPPHOTO", 102, 0, "", 0, 0, 51, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 50:
			func_315(uParam1, "Paparazzo3B", func_317(iParam0), 0, 14, 2, 1040.96f, -534.42f, 60.17f, 389, "", 102, 0, "", 0, 0, 51, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 51:
			func_315(uParam1, "Paparazzo4", func_317(iParam0), 0, 14, 4, -484.2f, 229.68f, 82.21f, 389, "", -1, 8, "", 0, 1, -1, 4, 2, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 52:
			func_315(uParam1, "Rampage1", func_317(iParam0), 0, 15, 4, 908f, 3643.7f, 32.2f, 66, "", -1, 0, "", 0, 1, 54, 4, 4, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 54:
			func_315(uParam1, "Rampage3", func_317(iParam0), 0, 15, 4, 465.1f, -1849.3f, 27.8f, 84, "", -1, 0, "", 0, 1, 55, 4, 4, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 55:
			func_315(uParam1, "Rampage4", func_317(iParam0), 0, 15, 4, -161f, -1669.7f, 33f, 84, "", -1, 0, "", 0, 0, 56, 4, 4, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 56:
			func_315(uParam1, "Rampage5", func_317(iParam0), 0, 15, 4, -1298.2f, 2504.14f, 21.09f, 84, "", -1, 0, "", 0, 0, 53, 4, 4, 0, 2359, func_316(iParam0), 0, 0);
			break;
		
		case 53:
			func_315(uParam1, "Rampage2", func_317(iParam0), 0, 15, 4, 1181.5f, -400.1f, 67.5f, 84, "", -1, 0, "rampage_controller", 0, 0, -1, 4, 4, 0, 2359, func_316(iParam0), 1, 0);
			break;
		
		case 57:
			func_315(uParam1, "TheLastOne", func_317(iParam0), 0, 16, 4, -1298.98f, 4640.16f, 105.67f, 66, "", 133, 1, "", 0, 1, -1, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 58:
			func_315(uParam1, "Tonya1", func_317(iParam0), 0, 17, 4, -14.39f, -1472.69f, 29.58f, 66, "AM_H_RCFS", -1, 0, "ambient_TonyaCall", 24, 1, 59, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 59:
			func_315(uParam1, "Tonya2", func_317(iParam0), 0, 17, 4, -14.39f, -1472.69f, 29.58f, 388, "", -1, 48, "ambient_Tonya", 185, 0, 60, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 60:
			func_315(uParam1, "Tonya3", func_317(iParam0), 0, 17, 4, 0f, 0f, 0f, -1, "", -1, 0, "", 187, 0, 61, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 61:
			func_315(uParam1, "Tonya4", func_317(iParam0), 0, 17, 4, 0f, 0f, 0f, -1, "", -1, 0, "", 0, 0, 62, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		case 62:
			func_315(uParam1, "Tonya5", func_317(iParam0), 0, 17, 4, -14.39f, -1472.69f, 29.58f, 388, "", -1, 48, "", 0, 0, -1, 4, 2, 0, 2359, func_316(iParam0), 0, 1);
			break;
		
		default:
			break;
	}
}

void func_315(var uParam0, char* sParam1, struct<2> Param2, int iParam4, int iParam5, int iParam6, vector3 vParam7, int iParam10, char* sParam11, int iParam12, int iParam13, char* sParam14, int iParam15, int iParam16, int iParam17, int iParam18, int iParam19, int iParam20, int iParam21, var uParam22, int iParam23, int iParam24)//Position - 0x13986
{
	uParam0->f_4 = iParam5;
	*uParam0 = sParam1;
	uParam0->f_1 = { Param2 };
	uParam0->f_3 = iParam4;
	uParam0->f_5 = iParam6;
	uParam0->f_6 = { vParam7 };
	uParam0->f_9 = iParam10;
	StringCopy(&(uParam0->f_10), sParam11, 16);
	uParam0->f_14 = iParam12;
	uParam0->f_15 = iParam13;
	StringCopy(&(uParam0->f_16), sParam14, 24);
	uParam0->f_22 = iParam15;
	uParam0->f_23 = iParam16;
	uParam0->f_24 = iParam17;
	uParam0->f_25 = iParam18;
	uParam0->f_26 = iParam19;
	uParam0->f_27 = iParam20;
	uParam0->f_28 = iParam21;
	uParam0->f_29 = uParam22;
	uParam0->f_30 = iParam23;
	uParam0->f_31 = iParam24;
}

bool func_316(int iParam0)//Position - 0x13A17
{
	switch (iParam0)
	{
		case 0:
			return false;
			break;
		
		case 1:
			return false;
			break;
		
		case 2:
			return true;
			break;
		
		case 3:
			return true;
			break;
		
		case 4:
			return false;
			break;
		
		case 5:
			return true;
			break;
		
		case 6:
			return true;
			break;
		
		case 7:
			return false;
			break;
		
		case 8:
			return true;
			break;
		
		case 9:
			return false;
			break;
		
		case 10:
			return false;
			break;
		
		case 11:
			return false;
			break;
		
		case 12:
			return true;
			break;
		
		case 13:
			return false;
			break;
		
		case 14:
			return true;
			break;
		
		case 15:
			return false;
			break;
		
		case 16:
			return true;
			break;
		
		case 17:
			return true;
			break;
		
		case 18:
			return true;
			break;
		
		case 19:
			return true;
			break;
		
		case 20:
			return true;
			break;
		
		case 21:
			return true;
			break;
		
		case 22:
			return true;
			break;
		
		case 23:
			return true;
			break;
		
		case 24:
			return true;
			break;
		
		case 25:
			return true;
			break;
		
		case 26:
			return true;
			break;
		
		case 27:
			return false;
			break;
		
		case 28:
			return true;
			break;
		
		case 29:
			return true;
			break;
		
		case 30:
			return true;
			break;
		
		case 31:
			return false;
			break;
		
		case 32:
			return true;
			break;
		
		case 33:
			return true;
			break;
		
		case 34:
			return true;
			break;
		
		case 35:
			return false;
			break;
		
		case 36:
			return false;
			break;
		
		case 37:
			return false;
			break;
		
		case 38:
			return true;
			break;
		
		case 39:
			return true;
			break;
		
		case 40:
			return true;
			break;
		
		case 41:
			return true;
			break;
		
		case 42:
			return true;
			break;
		
		case 43:
			return true;
			break;
		
		case 44:
			return false;
			break;
		
		case 45:
			return false;
			break;
		
		case 46:
			return true;
			break;
		
		case 47:
			return true;
			break;
		
		case 48:
			return false;
			break;
		
		case 49:
			return true;
			break;
		
		case 50:
			return true;
			break;
		
		case 51:
			return true;
			break;
		
		case 52:
			return true;
			break;
		
		case 54:
			return true;
			break;
		
		case 55:
			return true;
			break;
		
		case 56:
			return true;
			break;
		
		case 53:
			return true;
			break;
		
		case 57:
			return true;
			break;
		
		case 58:
			return true;
			break;
		
		case 59:
			return true;
			break;
		
		case 60:
			return true;
			break;
		
		case 61:
			return true;
			break;
		
		case 62:
			return true;
			break;
		
		default:
			break;
	}
	return false;
}

struct<2> func_317(int iParam0)//Position - 0x13D5D
{
	struct<2> Var0;
	char[] cVar2[8];
	
	StringCopy(&Var0, "", 8);
	cVar2 = { func_312(iParam0) };
	if (gameplay::is_string_null_or_empty(&cVar2))
	{
	}
	else
	{
		StringCopy(&Var0, "RC_", 8);
		StringConCat(&Var0, &cVar2, 8);
	}
	return Var0;
}

int func_318(int iParam0)//Position - 0x13D94
{
	switch (iParam0)
	{
		case 69:
		case 70:
			return func_319(Global_101553.f_7940.f_99.f_205[10]);
			break;
		
		case 74:
		case 75:
			return func_319(Global_101553.f_7940.f_99.f_205[8]);
			break;
		
		case 84:
		case 85:
			return func_319(Global_101553.f_7940.f_99.f_205[11]);
			break;
		
		case 90:
			return func_319(Global_101553.f_7940.f_99.f_205[7]);
			break;
		
		case 93:
			return func_319(Global_101553.f_7940.f_99.f_205[9]);
			break;
	}
	return 0;
}

int func_319(int iParam0)//Position - 0x13E50
{
	switch (iParam0)
	{
		case 1:
		case 3:
		case 5:
		case 6:
		case 8:
			return 0;
			break;
		
		case 2:
		case 4:
		case 7:
		case 9:
			return 1;
			break;
	}
	return -1;
}

int func_320(char* sParam0, int iParam1)//Position - 0x13EA4
{
	int iVar0;
	int iVar1;
	
	iVar0 = gameplay::get_hash_key(sParam0);
	iVar1 = func_321(iVar0, 1);
	if (iVar1 == -1 && !iParam1)
	{
	}
	return iVar1;
}

int func_321(int iParam0, int iParam1)//Position - 0x13ECE
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 94)
	{
		if (Global_82527[iVar0 /*34*/].f_6 == iParam0)
		{
			return iVar0;
		}
		iVar0++;
	}
	if (!iParam1)
	{
	}
	return -1;
}

void func_322(char* sParam0, int iParam1, int iParam2)//Position - 0x13F04
{
	iParam2 = iParam2;
	ui::_set_text_entry_2(sParam0);
	ui::_draw_subtitle_timed(iParam1, 1);
}

void func_323(var uParam0, vector3 vParam1, var uParam4)//Position - 0x13F1D
{
	if (ui::does_blip_exist(*uParam0))
	{
		Global_100589 = *uParam0;
		Global_100594 = { vParam1 };
		Global_100598 = uParam4;
	}
}

void func_324()//Position - 0x13F46
{
	func_248(&(Local_1044.f_16), 1, player::player_ped_id(), "FRANKLIN", 0, 1);
	Local_1044.f_3 = { -544.4251f, -1829.619f, 21.9962f };
	Local_1044.f_6 = 95.3853f;
}

void func_325(int iParam0, int iParam1, int iParam2)//Position - 0x13F82
{
	if (iParam2)
	{
		if (ui::does_blip_exist(iParam1->f_2))
		{
		}
		else
		{
			if (entity::does_entity_exist(iParam1->f_7))
			{
				iParam1->f_2 = ui::add_blip_for_entity(Local_1044.f_7);
			}
			else
			{
				iParam1->f_2 = ui::add_blip_for_coord(iParam0->f_18);
			}
			ui::set_blip_route(iParam1->f_2, true);
			ui::set_blip_colour(iParam1->f_2, 3);
			ui::set_blip_route_colour(iParam1->f_2, 3);
		}
	}
}

void func_326(int iParam0)//Position - 0x13FE1
{
	if (!func_104(iParam0))
	{
		func_119(iParam0);
	}
}

void func_327(int iParam0)//Position - 0x13FF9
{
	if (!cam::is_screen_faded_in())
	{
		cam::do_screen_fade_in(iParam0);
		while (!cam::is_screen_faded_in())
		{
			system::wait(0);
		}
	}
}

void func_328()//Position - 0x14021
{
	func_334(&iLocal_2524);
	func_333(&Local_1044);
	func_332();
	cam::set_gameplay_cam_relative_heading(0f);
	cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
	player::set_player_wanted_level(player::player_id(), 0, 0);
	player::set_player_wanted_level_now(player::player_id(), 0);
	func_189();
	func_329(0, -1, 1);
	func_327(500);
	iLocal_1041 = 12;
}

void func_329(int iParam0, int iParam1, int iParam2)//Position - 0x14074
{
	if (func_439() && func_331())
	{
		while (Global_91401 != 6)
		{
			system::wait(0);
		}
		gameplay::set_game_paused(false);
		if (entity::does_entity_exist(player::player_ped_id()))
		{
			if (!ped::is_ped_injured(player::player_ped_id()))
			{
				ped::clear_ped_wetness(player::player_ped_id());
			}
		}
		if (iParam0 != 0)
		{
			if (!ped::is_ped_injured(player::player_ped_id()))
			{
				if (entity::does_entity_exist(iParam0))
				{
					if (vehicle::is_vehicle_driveable(iParam0, 0))
					{
						if (!ped::is_ped_in_vehicle(player::player_ped_id(), iParam0, 0))
						{
							ped::set_ped_into_vehicle(player::player_ped_id(), iParam0, iParam1);
							cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
							cam::set_gameplay_cam_relative_heading(0f);
							system::wait(0);
						}
					}
				}
			}
		}
		if (iParam2 == 1)
		{
			if (player::is_player_playing(player::player_id()))
			{
				player::set_player_control(player::player_id(), true, 0);
			}
		}
		graphics::_stop_all_screen_effects();
		func_330(0);
	}
}

void func_330(int iParam0)//Position - 0x14138
{
	if (iParam0 == 1)
	{
		gameplay::set_bit(&(Global_91406.f_20), 13);
	}
	else
	{
		gameplay::clear_bit(&(Global_91406.f_20), 13);
	}
}

int func_331()//Position - 0x14161
{
	return gameplay::is_bit_set(Global_91406.f_20, 13);
}

void func_332()//Position - 0x14175
{
	if (entity::does_entity_exist(iLocal_1028))
	{
		ped::delete_ped(&iLocal_1028);
	}
	if (entity::does_entity_exist(Local_1044.f_8))
	{
		vehicle::delete_vehicle(&(Local_1044.f_8));
	}
}

void func_333(int iParam0)//Position - 0x141A3
{
	int iVar0;
	
	if (!ped::is_ped_injured(*iParam0))
	{
		ped::delete_ped(iParam0);
	}
	if (ui::does_blip_exist(iParam0->f_2))
	{
		ui::remove_blip(&(iParam0->f_2));
	}
	if (entity::does_entity_exist(iParam0->f_7))
	{
		ped::delete_ped(&(iParam0->f_7));
	}
	if (entity::does_entity_exist(iParam0->f_8))
	{
		vehicle::delete_vehicle(&(iParam0->f_8));
	}
	if (entity::does_entity_exist(iParam0->f_9))
	{
		ped::delete_ped(&(iParam0->f_9));
	}
	if (entity::does_entity_exist(iParam0->f_10))
	{
		vehicle::delete_vehicle(&(iParam0->f_10));
	}
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < 4)
	{
		if (entity::does_entity_exist(iParam0->f_11[iVar0]))
		{
			object::delete_object(&(iParam0->f_11[iVar0]));
		}
		iVar0++;
	}
}

void func_334(int iParam0)//Position - 0x1424B
{
	if (entity::does_entity_exist(*iParam0))
	{
		ped::delete_ped(iParam0);
	}
	if (entity::does_entity_exist(iParam0->f_1[0]))
	{
		ped::delete_ped(&(iParam0->f_1[0]));
	}
	if (entity::does_entity_exist(iParam0->f_1[1]))
	{
		ped::delete_ped(&(iParam0->f_1[1]));
	}
	if (entity::does_entity_exist(iParam0->f_1[2]))
	{
		ped::delete_ped(&(iParam0->f_1[2]));
	}
	if (entity::does_entity_exist(iParam0->f_6))
	{
		ped::delete_ped(&(iParam0->f_6));
	}
	if (entity::does_entity_exist(iParam0->f_1[3]))
	{
		ped::delete_ped(&(iParam0->f_1[3]));
	}
	if (entity::does_entity_exist(iParam0->f_1[3]))
	{
		ped::delete_ped(&(iParam0->f_1[3]));
	}
	if (entity::does_entity_exist(iLocal_2009))
	{
		vehicle::delete_vehicle(&iLocal_2009);
	}
	gameplay::clear_area(-598.1845f, -1790.477f, 22.612f, 10f, 1, 0, 0, false);
}

void func_335()//Position - 0x14320
{
	int iVar0;
	
	iLocal_1973 = 1;
	iLocal_1974 = 1;
	iLocal_1983 = 0;
	iLocal_1490 = false;
	fLocal_2008 = -1f;
	while (!func_243())
	{
		system::wait(0);
	}
	while (!func_181())
	{
		system::wait(0);
	}
	if (Local_1684.f_14 != 0)
	{
		Local_1044.f_7 = ped::create_ped(5, Local_1684.f_14, Local_1684.f_18, Local_1684.f_21, 1, true);
		ped::set_ped_can_use_auto_conversation_lookat(Local_1044.f_7, 1);
		func_248(&(Local_1044.f_16), 4, Local_1044.f_7, "OJAhkHOOKER", 0, 1);
		ped::set_blocking_of_non_temporary_events(Local_1044.f_7, true);
		ped::set_ped_combat_attributes(Local_1044.f_7, 17, true);
		ped::set_ped_flee_attributes(Local_1044.f_7, 128, true);
		ped::set_ped_config_flag(Local_1044.f_7, 134, true);
		func_241(Local_1044.f_7);
		func_210(&Local_1044, 0);
		ui::remove_blip(&(Local_1044.f_2));
		if (!ui::does_blip_exist(Local_1044.f_2))
		{
			Local_1044.f_2 = func_185(Local_1044.f_7, 1, 0);
			ui::set_blip_colour(Local_1044.f_2, 3);
			ui::set_blip_route(Local_1044.f_2, true);
			ui::set_blip_route_colour(Local_1044.f_2, 3);
		}
	}
	iLocal_1489 = 0;
	func_336(0);
	func_332();
	func_179(&Local_1684, &Local_1044);
	func_178(&Local_1684, &Local_1044);
	func_177(&Local_1044);
	func_176(&Local_1044);
	func_242(&Local_1044, &iLocal_2524);
	system::settimera(10000);
	gameplay::clear_area_of_peds(-607.262f, -1800.9f, 22.3211f, 10f, 0);
	gameplay::clear_area(vLocal_2031, fLocal_2055, 1, 0, 0, false);
	audio::trigger_music_event("ASS3_RESTART2");
	cam::set_gameplay_cam_relative_heading(0f);
	cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
	iVar0 = false;
	if ((entity::does_entity_exist(iLocal_2010) && !entity::is_entity_dead(iLocal_2010, 0)) && !entity::is_entity_dead(player::player_ped_id(), 0))
	{
		iVar0 = true;
	}
	if (iVar0)
	{
		func_329(iLocal_2010, -1, 1);
	}
	else
	{
		func_329(0, -1, 1);
	}
	func_327(500);
	iLocal_1460 = 2;
	iLocal_1041 = 10;
}

void func_336(int iParam0)//Position - 0x144FA
{
	if (entity::does_entity_exist(iLocal_2012))
	{
		if (entity::is_entity_occluded(iLocal_2012) && !iParam0)
		{
			entity::set_ped_as_no_longer_needed(&iLocal_2012);
		}
		else
		{
			ped::delete_ped(&iLocal_2012);
		}
	}
	if (entity::does_entity_exist(iLocal_2011))
	{
		if (entity::is_entity_occluded(iLocal_2011) && !iParam0)
		{
			entity::set_vehicle_as_no_longer_needed(&iLocal_2011);
		}
		else
		{
			vehicle::delete_vehicle(&iLocal_2011);
		}
	}
}

void func_337()//Position - 0x1455C
{
	while (!func_243())
	{
		system::wait(0);
	}
	while (!func_181())
	{
		system::wait(0);
	}
	gameplay::clear_area_of_peds(-607.262f, -1800.9f, 22.3211f, 10f, 0);
	func_324();
	func_238(&Local_1684, &Local_1044, 0);
	func_210(&Local_1044, 1);
	func_242(&Local_1044, &iLocal_2524);
	audio::trigger_music_event("ASS3_RESTART1");
	cam::set_gameplay_cam_relative_heading(0f);
	cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
	func_329(0, -1, 1);
	func_327(500);
	iLocal_1460 = 0;
	iLocal_1041 = 10;
}

void func_338()//Position - 0x145ED
{
	func_325(&Local_1684, &Local_1044, 1);
	func_324();
	cam::set_gameplay_cam_relative_heading(0f);
	cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
	func_329(0, -1, 1);
	func_327(500);
	iLocal_1041 = 6;
}

void func_339(int iParam0, float fParam1)//Position - 0x14625
{
	iParam0->f_1 = (func_102(gameplay::is_bit_set(*iParam0, 4)) - fParam1);
	gameplay::set_bit(iParam0, 1);
	gameplay::clear_bit(iParam0, 2);
	iParam0->f_2 = 0f;
}

void func_340(int iParam0, var uParam1, int iParam2)//Position - 0x14653
{
	player::set_wanted_level_multiplier(0.2f);
	if (iParam0->f_274 == 1)
	{
		ui::request_additional_text("ASS_hk", 3);
		ai::request_waypoint_recording("OJAShk_101");
		ai::request_waypoint_recording("OJAShk_102");
		ai::request_waypoint_recording("OJAShk_103");
		ai::request_waypoint_recording("OJAShk_104");
		streaming::request_anim_dict("ODDJOBS@assassinate@vice@incar");
		streaming::request_anim_dict("mini@hookers_spvanilla");
	}
	else if (iParam0->f_274 == 0)
	{
		ui::request_additional_text("ASS_bs", 3);
		ai::request_waypoint_recording("OJASbs_102");
		ai::request_waypoint_recording("OJASbs01");
		ai::request_waypoint_recording("OJASbs02");
		ai::request_waypoint_recording("OJASbs03");
		ai::request_waypoint_recording("OJASbs04");
		streaming::request_anim_dict("ODDJOBS@assassinate@old_lady");
		streaming::request_clip_set("move_m@casual@d");
		vehicle::request_vehicle_asset(iParam0->f_5, 3);
		vehicle::request_vehicle_asset(iParam0->f_15, 3);
		streaming::request_ptfx_asset();
	}
	else if (iParam0->f_274 == 2)
	{
		ui::request_additional_text("ASS_ml", 3);
		streaming::request_ptfx_asset();
	}
	func_350(&(iParam0->f_34));
	func_347(&(iParam0->f_46), uParam1);
	if (iParam2)
	{
		func_435();
		while (!func_434())
		{
			func_385(uParam1);
			system::wait(0);
		}
	}
	if (iParam0->f_274 == 0)
	{
		while (((((((((!ai::get_is_waypoint_recording_loaded("OJASbs_102") || !ai::get_is_waypoint_recording_loaded("OJASbs01")) || !ai::get_is_waypoint_recording_loaded("OJASbs02")) || !ai::get_is_waypoint_recording_loaded("OJASbs03")) || !ai::get_is_waypoint_recording_loaded("OJASbs04")) || !streaming::has_anim_dict_loaded("ODDJOBS@assassinate@old_lady")) || !vehicle::has_vehicle_asset_loaded(iParam0->f_5)) || !vehicle::has_vehicle_asset_loaded(iParam0->f_15)) || !streaming::has_ptfx_asset_loaded()) || !streaming::has_clip_set_loaded("move_m@casual@d"))
		{
			func_385(uParam1);
			system::wait(0);
		}
	}
	else if (iParam0->f_274 == 1)
	{
		while (((((!ai::get_is_waypoint_recording_loaded("OJAShk_101") || !ai::get_is_waypoint_recording_loaded("OJAShk_102")) || !ai::get_is_waypoint_recording_loaded("OJAShk_103")) || !ai::get_is_waypoint_recording_loaded("OJAShk_104")) || !streaming::has_anim_dict_loaded("ODDJOBS@assassinate@vice@incar")) || !streaming::has_anim_dict_loaded("mini@hookers_spvanilla"))
		{
			func_385(uParam1);
			system::wait(0);
		}
	}
	else if (iParam0->f_274 == 2)
	{
		while (!streaming::has_ptfx_asset_loaded())
		{
			func_385(uParam1);
			system::wait(0);
		}
	}
	while ((!ui::has_additional_text_loaded(3) || !func_346(&(iParam0->f_34))) || !func_341(uParam1))
	{
		func_385(uParam1);
		system::wait(0);
	}
	if (iParam0->f_274 == 1)
	{
		gameplay::clear_area_of_vehicles(iParam0->f_18, 100f, 0, 0, 0, 0, false);
		vehicle::set_all_vehicle_generators_active_in_area(-690.763f, -1607.467f, -100.9649f, -404.4197f, -1856.529f, 100.5908f, false, 1);
		vehicle::set_random_vehicle_density_multiplier_this_frame(0.2f);
		StringCopy(&Local_726, "ASS_HK_PASSED", 24);
		StringCopy(&(Local_726.f_6), "ASS_HK_NAME", 24);
		StringCopy(&(Local_726.f_12), "ASS_HK_TIMER", 24);
		StringCopy(&(Local_726.f_18), "ASS_HK_BASE", 24);
		StringCopy(&(Local_726.f_24), "ASS_HK_BDESC", 24);
		StringCopy(&(Local_726.f_30), "ASS_HK_CASH", 24);
		StringCopy(&(Local_726.f_36), "ASS_HK_COMP", 24);
		StringCopy(&(Local_726.f_42), "ASS_HK_COMP", 24);
		StringCopy(&(Local_726.f_48), "ASS_HK_COMP", 24);
		StringCopy(&(Local_726.f_54), "ASS_HK_COMP", 24);
		StringCopy(&(Local_726.f_60), "ASS_HK_CONT", 24);
		fLocal_135 = 3000f;
		fLocal_136 = 2000f;
	}
	else if (iParam0->f_274 == 0)
	{
		StringCopy(&Local_726, "ASS_BS_PASSED", 24);
		StringCopy(&(Local_726.f_6), "ASS_BS_NAME", 24);
		StringCopy(&(Local_726.f_12), "ASS_BS_TIMER", 24);
		StringCopy(&(Local_726.f_18), "ASS_BS_BASE", 24);
		StringCopy(&(Local_726.f_24), "ASS_BS_BDESC", 24);
		StringCopy(&(Local_726.f_30), "ASS_BS_CASH", 24);
		StringCopy(&(Local_726.f_36), "ASS_BS_COMP", 24);
		StringCopy(&(Local_726.f_42), "ASS_BS_COMP", 24);
		StringCopy(&(Local_726.f_48), "ASS_BS_COMP", 24);
		StringCopy(&(Local_726.f_54), "ASS_BS_COMP", 24);
		StringCopy(&(Local_726.f_60), "ASS_BS_CONT", 24);
		fLocal_135 = 5000f;
		fLocal_136 = 2000f;
	}
	else if (iParam0->f_274 == 2)
	{
		StringCopy(&Local_726, "ASS_ML_PASSED", 24);
		StringCopy(&(Local_726.f_6), "ASS_ML_NAME", 24);
		StringCopy(&(Local_726.f_12), "ASS_ML_TIMER", 24);
		StringCopy(&(Local_726.f_18), "ASS_ML_BASE", 24);
		StringCopy(&(Local_726.f_24), "ASS_ML_BDESC", 24);
		StringCopy(&(Local_726.f_30), "ASS_ML_CASH", 24);
		StringCopy(&(Local_726.f_36), "ASS_ML_COMP", 24);
		StringCopy(&(Local_726.f_42), "ASS_ML_COMP", 24);
		StringCopy(&(Local_726.f_48), "ASS_ML_COMP", 24);
		StringCopy(&(Local_726.f_54), "ASS_ML_COMP", 24);
		StringCopy(&(Local_726.f_60), "ASS_ML_CONT", 24);
		fLocal_135 = 5000f;
		fLocal_136 = 2000f;
	}
	player::clear_player_has_damaged_at_least_one_ped(player::player_id());
}

int func_341(var uParam0)//Position - 0x14AB4
{
	return func_342(uParam0);
}

bool func_342(var uParam0)//Position - 0x14AC2
{
	int iVar0;
	
	if (!uParam0->f_271)
	{
		return true;
	}
	iVar0 = 0;
	while (iVar0 < 15)
	{
		if (gameplay::is_bit_set((*uParam0)[iVar0 /*18*/], 30))
		{
			if (!gameplay::is_bit_set((*uParam0)[iVar0 /*18*/], 29))
			{
				return false;
			}
			if (!func_343(uParam0[iVar0 /*18*/]))
			{
				return false;
			}
		}
		iVar0++;
	}
	uParam0->f_271 = 0;
	return true;
}

int func_343(var uParam0)//Position - 0x14B26
{
	return func_344(*uParam0, &(uParam0->f_2), uParam0->f_1);
}

int func_344(int iParam0, char* sParam1, int iParam2)//Position - 0x14B3D
{
	if (gameplay::is_bit_set(iParam0, 30))
	{
		if (gameplay::is_bit_set(iParam0, 29))
		{
			switch (func_345(iParam0))
			{
				case 0:
					return streaming::has_model_loaded(iParam2);
					break;
				
				case 1:
					return streaming::has_anim_dict_loaded(sParam1);
					break;
				
				case 2:
					return streaming::has_clip_set_loaded(sParam1);
					break;
				
				case 3:
					return graphics::has_streamed_texture_dict_loaded(sParam1);
					break;
				
				case 4:
					return vehicle::has_vehicle_recording_been_loaded(iParam2, sParam1);
					break;
				
				case 5:
					return ai::get_is_waypoint_recording_loaded(sParam1);
					break;
				
				case 6:
					return audio::request_script_audio_bank(sParam1, gameplay::is_bit_set(iParam0, 27), -1);
					break;
				
				case 7:
					return script::_has_streamed_script_loaded(iParam2);
					break;
				
				case 8:
					return ui::has_additional_text_loaded(iParam2);
					break;
				
				case 9:
					return streaming::has_ptfx_asset_loaded();
					break;
				
				default:
					break;
			}
		}
		else
		{
			return false;
		}
	}
	return false;
}

int func_345(int iParam0)//Position - 0x14C31
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 10)
	{
		if (gameplay::is_bit_set(iParam0, iVar0))
		{
			return iVar0;
		}
		iVar0++;
	}
	return -1;
}

bool func_346(var uParam0)//Position - 0x14C5D
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		if ((*uParam0)[iVar0] != 0)
		{
			if (!streaming::has_model_loaded((*uParam0)[iVar0]))
			{
				if (!streaming::has_model_loaded((*uParam0)[iVar0]))
				{
				}
				return false;
			}
		}
		iVar0++;
	}
	return true;
}

void func_347(var uParam0, var uParam1)//Position - 0x14CA4
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		if (!gameplay::is_string_null((*uParam0)[iVar0]))
		{
			func_348(uParam1, (*uParam0)[iVar0]);
		}
		iVar0++;
	}
}

void func_348(var uParam0, char* sParam1)//Position - 0x14CDA
{
	func_349(uParam0, 1, -1, sParam1, 0);
}

void func_349(var uParam0, int iParam1, int iParam2, char* sParam3, int iParam4)//Position - 0x14CED
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 15)
	{
		if (gameplay::is_bit_set((*uParam0)[iVar0 /*18*/], 30))
		{
			if (gameplay::is_bit_set((*uParam0)[iVar0 /*18*/], iParam1))
			{
				if (iParam2 != -1)
				{
					if ((uParam0[iVar0 /*18*/])->f_1 == iParam2)
					{
						return;
					}
				}
				if (iParam1 != 4)
				{
					if (!gameplay::are_strings_equal(sParam3, "NULL"))
					{
						if (gameplay::are_strings_equal(&((uParam0[iVar0 /*18*/])->f_2), sParam3))
						{
							return;
						}
					}
				}
				if (iParam1 == 9)
				{
					return;
				}
			}
		}
		iVar0++;
	}
	if (!uParam0->f_271)
	{
		uParam0->f_271 = 1;
	}
	iVar0 = 0;
	while (iVar0 < 15)
	{
		if (!gameplay::is_bit_set((*uParam0)[iVar0 /*18*/], 30))
		{
			StringCopy(&((uParam0[iVar0 /*18*/])->f_2), sParam3, 64);
			(uParam0[iVar0 /*18*/])->f_1 = iParam2;
			(*uParam0)[iVar0 /*18*/] = iParam4;
			gameplay::set_bit(uParam0[iVar0 /*18*/], iParam1);
			gameplay::set_bit(uParam0[iVar0 /*18*/], 30);
			return;
		}
		iVar0++;
	}
}

void func_350(var uParam0)//Position - 0x14DD7
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		if ((*uParam0)[iVar0] != 0)
		{
			streaming::request_model((*uParam0)[iVar0]);
		}
		iVar0++;
	}
}

void func_351()//Position - 0x14E07
{
	vLocal_2021[0 /*3*/] = { -558.4283f, -1827.586f, 22.1976f };
	vLocal_2021[1 /*3*/] = { -632.9443f, -1797.236f, 23.01625f };
	Local_1684 = joaat("a_m_m_business_01");
	Local_1684.f_14 = joaat("s_f_y_hooker_03");
	Local_1684.f_16 = joaat("a_m_y_genstreet_02");
	Local_1684.f_5 = joaat("peyote");
	Local_1684.f_17 = joaat("emperor2");
	Local_1684.f_15 = joaat("ruiner");
	Local_1684.f_1 = { -579.8f, -1796.049f, 22.39f };
	Local_1684.f_4 = 352f;
	Local_1684.f_13 = joaat("weapon_pistol");
	Local_1684.f_18 = { -595.316f, -1809.967f, 22.102f };
	Local_1684.f_21 = 158.3596f;
	Local_1684.f_9 = { -588.9072f, -1769.172f, 21.6539f };
	Local_1684.f_12 = 130f;
	Local_1684.f_26 = { -596.2801f, -1811.086f, 22.1921f };
	Local_1684.f_29 = 70f;
	Local_1684.f_30 = { -576.8151f, -1734.927f, 22.4815f };
	Local_1684.f_33 = 234f;
	Local_1684.f_76 = { -594.4413f, -1810.63f, 23.632f };
	Local_1684.f_79 = { 0.6454f, 0f, 62.131f };
	Local_1684.f_82 = 35f;
	StringCopy(&(Local_1684.f_57), "ASS_hk", 24);
	StringCopy(&(Local_1684.f_83[0 /*16*/]), "ODDJOBS@ASSASSINATE@VICE@SEX", 64);
	StringCopy(&(Local_1684.f_83[1 /*16*/]), "ODDJOBS@ASSASSINATE@VICE@HOOKER", 64);
	StringCopy(&(Local_1684.f_83[2 /*16*/]), "ODDJOBS@ASSASSINATE@VICE@PARK", 64);
	StringCopy(&(Local_1684.f_83[3 /*16*/]), "ODDJOBS@ASSASSINATE@VICE@IDLE", 64);
	StringCopy(&(Local_1684.f_83[4 /*16*/]), "ODDJOBS@ASSASSINATE@VICE@DEALER", 64);
	StringCopy(&(Local_1684.f_83[5 /*16*/]), "amb@world_human_prostitute@hooker@idle_a", 64);
	func_354(&(Local_1684.f_34), iLocal_2238);
	func_354(&(Local_1684.f_34), Local_1684.f_5);
	func_354(&(Local_1684.f_34), Local_1684.f_15);
	func_354(&(Local_1684.f_34), Local_1684.f_17);
	func_352(&(Local_1684.f_46), &(Local_1684.f_83[0 /*16*/]));
	func_352(&(Local_1684.f_46), &(Local_1684.f_83[1 /*16*/]));
	func_352(&(Local_1684.f_46), &(Local_1684.f_83[2 /*16*/]));
	func_352(&(Local_1684.f_46), &(Local_1684.f_83[3 /*16*/]));
	func_352(&(Local_1684.f_46), &(Local_1684.f_83[4 /*16*/]));
	func_352(&(Local_1684.f_46), &(Local_1684.f_83[5 /*16*/]));
	StringCopy(&(Local_1684.f_63[0 /*6*/]), "ASS_HK_WAIT", 24);
	Local_1684.f_271 = { -556.8734f, -1822.528f, 22.2149f };
	Local_1684.f_274 = 1;
	Local_1684.f_267 = 1;
	Local_1684.f_268 = 1;
	Local_1684.f_269 = 1;
	vLocal_122.z = 28f;
	ped::set_ped_model_is_suppressed(Local_1684, true);
	pathfind::set_roads_in_angled_area(-706.106f, -1708.865f, -100f, -512.576f, -1842.173f, 100f, 100f, 0, false, 1);
}

bool func_352(var uParam0, char* sParam1)//Position - 0x150D4
{
	int iVar0;
	int iVar1;
	
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		if (!gameplay::is_string_null((*uParam0)[iVar0]))
		{
			if (gameplay::are_strings_equal((*uParam0)[iVar0], sParam1))
			{
				return false;
			}
		}
		iVar0++;
	}
	iVar1 = func_353(uParam0);
	if (iVar1 < 0 || iVar1 >= *uParam0)
	{
		return false;
	}
	(*uParam0)[iVar1] = sParam1;
	return true;
}

int func_353(var uParam0)//Position - 0x15139
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		if (gameplay::is_string_null((*uParam0)[iVar0]))
		{
			return iVar0;
		}
		iVar0++;
	}
	return -1;
}

bool func_354(var uParam0, int iParam1)//Position - 0x15168
{
	int iVar0;
	int iVar1;
	
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		if ((*uParam0)[iVar0] != 0)
		{
			if ((*uParam0)[iVar0] == iParam1)
			{
				return false;
			}
		}
		iVar0++;
	}
	iVar1 = func_355(uParam0);
	if (iVar1 < 0 || iVar1 >= *uParam0)
	{
		return false;
	}
	(*uParam0)[iVar1] = iParam1;
	return true;
}

int func_355(var uParam0)//Position - 0x151C5
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		if ((*uParam0)[iVar0] == 0)
		{
			return iVar0;
		}
		iVar0++;
	}
	return -1;
}

void func_356(var uParam0)//Position - 0x151F1
{
	switch (iLocal_1461)
	{
		case 0:
			streaming::request_anim_dict("oddjobs@assassinate@vice@call");
			streaming::request_model(-1559354806);
			if (streaming::has_anim_dict_loaded("oddjobs@assassinate@vice@call") && streaming::has_model_loaded(-1559354806))
			{
				iLocal_1996 = true;
			}
			if (iLocal_1996)
			{
				if (entity::does_entity_exist(iLocal_1462))
				{
					func_372(216.8742f, -854.3179f, 28.32152f, 210.0361f, -851.7643f, 34.49434f, 5f, 220.3139f, -851.9946f, 29.1151f, 250.2144f, 1, 1, 1, 0, 0);
					gameplay::clear_area(214.4495f, -852.8672f, 29.3496f, 3.5f, 1, 0, 0, false);
					if (!func_104(&iLocal_1484))
					{
						func_326(&iLocal_1484);
					}
					if (entity::does_entity_exist(iLocal_1462))
					{
						entity::set_entity_visible(iLocal_1462, false, 0);
						entity::set_entity_collision(iLocal_1462, false, 0);
						entity::set_entity_can_be_damaged(iLocal_1462, false);
						iLocal_1463 = object::create_object(-1559354806, 214.4495f, -852.8672f, 29.3496f, 1, true, false);
						entity::set_entity_rotation(iLocal_1463, 0f, 0f, -21.25324f, 2, 1);
						entity::set_entity_collision(iLocal_1463, false, 0);
						entity::set_entity_can_be_damaged(iLocal_1463, false);
						entity::set_entity_visible(player::player_ped_id(), true, 0);
					}
					iLocal_1500 = streaming::_0x219C7B8D53E429FD(214.4495f, -852.8672f, 29.3496f, 350f, 12, 127);
					func_364(1, 1, 1, 0);
					gameplay::clear_area_of_peds(214.4495f, -852.8672f, 29.3396f, 5f, 0);
					if (!entity::is_entity_dead(player::player_ped_id(), 0))
					{
						ped::_0x2208438012482A1A(player::player_ped_id(), 0, 0);
						entity::set_entity_coords(player::player_ped_id(), vLocal_1468, 1, false, 0, 1);
						entity::set_entity_heading(player::player_ped_id(), fLocal_1471);
						weapon::set_current_ped_weapon(player::player_ped_id(), joaat("weapon_unarmed"), true);
						ped::remove_ped_helmet(player::player_ped_id(), 1);
					}
					iLocal_1497 = ped::create_synchronized_scene(vLocal_1491, vLocal_1494, 2);
					if (entity::does_entity_exist(iLocal_1463))
					{
						ped::attach_synchronized_scene_to_entity(iLocal_1497, iLocal_1463, -1);
					}
					ai::task_synchronized_scene(player::player_ped_id(), iLocal_1497, "oddjobs@assassinate@vice@call", "ass_call_vice_p1", 1000f, -2f, 2, 0, 1148846080, 0);
					entity::play_synchronized_entity_anim(iLocal_1463, iLocal_1497, "ass_call_vice_phone", "oddjobs@assassinate@vice@call", 1000f, -2f, 0, 1148846080);
					if (!cam::does_cam_exist(iLocal_1464))
					{
						iLocal_1464 = cam::create_camera_with_params(26379945, vLocal_1475, vLocal_1478, 31.3943f, 1, 2);
						cam::render_script_cams(true, false, 3000, 1, 0, 0);
						cam::shake_cam(iLocal_1464, "HAND_SHAKE", 0.2f);
					}
					func_248(&(uParam0->f_16), 3, 0, "LESTER", 0, 1);
					func_248(&(uParam0->f_16), 1, player::player_ped_id(), "FRANKLIN", 0, 1);
					ui::display_radar(false);
					ui::display_hud(false);
					iLocal_1499 = pathfind::add_navmesh_blocking_object(214.4495f, -852.8672f, 29.3496f, 1.3f, 1.3f, 2f, 152.0039f, 0, 7);
					weapon::set_current_ped_weapon(player::player_ped_id(), joaat("weapon_unarmed"), false);
					player::set_player_control(player::player_id(), false, 56);
					func_363(23, 1);
					iLocal_1461 = 1;
				}
				else
				{
					streaming::request_anim_dict("oddjobs@assassinate@vice@call");
					streaming::request_model(-1559354806);
					if (!entity::does_entity_exist(iLocal_1462))
					{
						iLocal_1462 = object::get_closest_object_of_type(vLocal_1465, 5f, 1281992692, 1, 0, 1);
					}
				}
			}
			break;
		
		case 1:
			func_360();
			if (func_104(&iLocal_1481))
			{
				if (func_101(&iLocal_1481) > 1f)
				{
					if (func_359())
					{
						iLocal_1487 = true;
						if (!cam::is_screen_faded_out())
						{
							func_358(800);
						}
						iLocal_1461 = 2;
						break;
					}
				}
			}
			if (!iLocal_1488)
			{
				if (!entity::is_entity_dead(player::player_ped_id(), 0))
				{
					if (ped::is_synchronized_scene_running(iLocal_1497))
					{
						if (ped::get_synchronized_scene_phase(iLocal_1497) > 0.05f)
						{
							if (func_168(&(uParam0->f_16), "OJASAUD", "OJAScnt_hk", 9, 0, 0, 0))
							{
								if (!func_104(&iLocal_1481))
								{
									func_326(&iLocal_1481);
									iLocal_1488 = 1;
									if (func_4(0))
									{
										func_327(500);
									}
								}
							}
						}
					}
				}
			}
			if (func_104(&iLocal_1481))
			{
				if ((func_101(&iLocal_1481) > fLocal_1472 || (ped::is_synchronized_scene_running(iLocal_1497) && ped::get_synchronized_scene_phase(iLocal_1497) >= 0.958f)) || iLocal_1487)
				{
					iLocal_1461 = 3;
				}
			}
			break;
		
		case 2:
			audio::stop_scripted_conversation(false);
			if (iLocal_1487)
			{
				if (cam::is_screen_faded_out())
				{
					if (!entity::is_entity_dead(player::player_ped_id(), 0))
					{
						ped::_0x2208438012482A1A(player::player_ped_id(), 0, 0);
						entity::set_entity_coords(player::player_ped_id(), 213.8028f, -853.5229f, 29.3963f, 1, false, 0, 1);
						entity::set_entity_heading(player::player_ped_id(), 63.2918f);
					}
					func_357(1);
					entity::stop_synchronized_entity_anim(iLocal_1463, -1000f, 1);
					system::wait(0);
					cam::do_screen_fade_in(500);
					cam::destroy_all_cams(0);
					cam::render_script_cams(false, false, 3000, 1, 0, 0);
					cam::set_gameplay_cam_relative_heading(0f);
					cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
					iLocal_1461 = 3;
				}
			}
			break;
		
		case 3:
			if (!iLocal_1487)
			{
				cam::_0xC819F3CBB62BF692(0, 0, 3, 0);
				cam::destroy_all_cams(0);
			}
			if (streaming::_0x07C313F94746702C(iLocal_1500))
			{
				streaming::_0x1EE7D8DF4425F053(iLocal_1500);
			}
			func_357(0);
			entity::set_entity_collision(iLocal_1463, true, 0);
			ui::display_radar(true);
			ui::display_hud(true);
			ai::clear_ped_tasks(player::player_ped_id());
			player::set_player_control(player::player_id(), true, 0);
			ped::force_ped_motion_state(player::player_ped_id(), -1871534317, true, 0, 0);
			func_363(23, 0);
			func_364(0, 1, 1, 0);
			player::set_player_wanted_level(player::player_id(), 0, 0);
			player::set_player_wanted_level_now(player::player_id(), 0);
			streaming::remove_anim_dict("oddjobs@assassinate@vice@call");
			entity::set_object_as_no_longer_needed(&iLocal_1462);
			if (pathfind::_0x0EAEB0DB4B132399(iLocal_1499))
			{
				pathfind::remove_navmesh_blocking_object(iLocal_1499);
			}
			iLocal_1041 = 4;
			break;
	}
}

void func_357(int iParam0)//Position - 0x15748
{
	if (iParam0)
	{
		if (entity::does_entity_exist(iLocal_2013))
		{
			ped::delete_ped(&iLocal_2013);
		}
	}
	else if (entity::does_entity_exist(iLocal_2013))
	{
		if (!entity::is_entity_on_screen(iLocal_2013) || entity::is_entity_occluded(iLocal_2013))
		{
			ped::delete_ped(&iLocal_2013);
		}
		else
		{
			streaming::set_model_as_no_longer_needed(iLocal_2014);
			entity::set_ped_as_no_longer_needed(&iLocal_2013);
		}
	}
}

bool func_358(int iParam0)//Position - 0x157A3
{
	cam::do_screen_fade_out(iParam0);
	while (!cam::is_screen_faded_out())
	{
		system::wait(0);
	}
	return true;
}

bool func_359()//Position - 0x157C2
{
	if (ui::is_pause_menu_active())
	{
		return false;
	}
	if (controls::is_control_just_pressed(0, 18) || controls::is_control_just_pressed(2, 18))
	{
		return true;
	}
	return false;
}

void func_360()//Position - 0x157F4
{
	if (iLocal_1498 >= 1)
	{
		func_362();
	}
	switch (iLocal_1498)
	{
		case 0:
			if (func_361(&iLocal_1464, 6f, 212.308f, -852.1151f, 30.8906f, -2.0463f, 0.0491f, -123.0298f, 25.5584f, 1, 0.2f))
			{
				iLocal_1498 = 1;
			}
			break;
		
		case 1:
			if (func_361(&iLocal_1464, 12f, 217.3616f, -852.5518f, 30.5727f, 0.307f, -0.0981f, 113.7617f, 37.2383f, 1, 0.3f))
			{
				iLocal_1498 = 2;
			}
			break;
		
		case 2:
			if (func_361(&iLocal_1464, 19f, 212.0356f, -856.7463f, 30.7787f, -4.488f, 0f, -21.4972f, 33.2457f, 1, 0.3f))
			{
				iLocal_1498 = 3;
			}
			break;
		
		case 3:
			if (func_361(&iLocal_1464, 23f, 209.2922f, -849.7044f, 30.8068f, -0.0685f, 0f, -134.7147f, 33.8575f, 1, 0.2f))
			{
				iLocal_1498 = 4;
			}
			break;
		
		case 4:
			if (func_361(&iLocal_1464, 28f, 212.308f, -852.1151f, 30.8906f, -2.0463f, 0.0491f, -123.0298f, 26.1877f, 1, 0.2f))
			{
				iLocal_1498 = 5;
			}
			break;
		
		case 5:
			if (func_361(&iLocal_1464, 34f, 216.347f, -855.0798f, 30.8728f, -1.8635f, 0.0174f, 55.7844f, 33.2457f, 1, 0.2f))
			{
				iLocal_1498 = 6;
			}
			break;
		
		case 6:
			break;
	}
}

bool func_361(int iParam0, float fParam1, vector3 vParam2, vector3 vParam5, float fParam8, int iParam9, float fParam10)//Position - 0x159AA
{
	if (cam::does_cam_exist(*iParam0))
	{
		if (func_104(&iLocal_1484))
		{
			if (func_101(&iLocal_1484) >= fParam1)
			{
				cam::set_cam_coord(iLocal_1464, vParam2);
				cam::set_cam_rot(iLocal_1464, vParam5, 2);
				cam::set_cam_fov(iLocal_1464, fParam8);
				if (iParam9)
				{
					cam::shake_cam(iLocal_1464, "HAND_SHAKE", fParam10);
				}
				return true;
			}
		}
	}
	return false;
}

void func_362()//Position - 0x15A0A
{
	int iVar0;
	int iVar1;
	
	switch (iLocal_2007)
	{
		case 0:
			iVar1 = (gameplay::get_random_int_in_range(0, 65535) % 3);
			if (iVar1 == 0)
			{
				iLocal_2014 = joaat("a_f_m_beach_01");
			}
			else if (iVar1 == 1)
			{
				iLocal_2014 = joaat("a_f_y_soucent_03");
			}
			else
			{
				iLocal_2014 = joaat("a_f_y_scdressy_01");
			}
			iLocal_2007 = 1;
			break;
		
		case 1:
			streaming::request_model(iLocal_2014);
			if (streaming::has_model_loaded(iLocal_2014))
			{
				gameplay::clear_area_of_peds(195.6209f, -848.7115f, 29.84f, 1f, 0);
				iLocal_2013 = ped::create_ped(5, iLocal_2014, 195.6209f, -848.7115f, 29.84f, 252.7701f, 1, true);
				if (iLocal_2014 == joaat("a_f_m_beach_01"))
				{
					ped::set_ped_component_variation(iLocal_2013, 0, 0, 2, 0);
					ped::set_ped_component_variation(iLocal_2013, 2, 3, 0, 0);
					ped::set_ped_component_variation(iLocal_2013, 3, 1, 1, 0);
					ped::set_ped_component_variation(iLocal_2013, 4, 1, 2, 0);
					ped::set_ped_component_variation(iLocal_2013, 8, 1, 0, 0);
					ped::set_ped_component_variation(iLocal_2013, 10, 0, 0, 0);
				}
				ped::set_blocking_of_non_temporary_events(iLocal_2013, true);
				streaming::set_model_as_no_longer_needed(iLocal_2014);
			}
			if (entity::does_entity_exist(iLocal_2013) && !entity::is_entity_dead(iLocal_2013, 0))
			{
				ai::clear_sequence_task(&iVar0);
				ai::open_sequence_task(&iVar0);
				ai::task_follow_nav_mesh_to_coord(0, 207.2075f, -853.1223f, 29.5467f, 1f, -1, 0.25f, 0, 245.8158f);
				ai::task_follow_nav_mesh_to_coord(0, 212.1299f, -854.8853f, 29.423f, 1f, -1, 0.25f, 0, 245.8158f);
				ai::task_follow_nav_mesh_to_coord(0, 229.6208f, -861.2581f, 28.9823f, 1f, -1, 0.25f, 0, 245.8158f);
				ai::task_wander_standard(0, 248.3764f, 0);
				ai::close_sequence_task(iVar0);
				ai::task_perform_sequence(iLocal_2013, iVar0);
				ai::clear_sequence_task(&iVar0);
				ped::set_ped_keep_task(iLocal_2013, true);
				if (!entity::is_entity_dead(player::player_ped_id(), 0))
				{
					ai::task_look_at_entity(iLocal_2013, player::player_ped_id(), -1, 0, 4);
				}
				iLocal_2007 = 2;
			}
			break;
		
		case 2:
			if (!entity::is_entity_dead(iLocal_2013, 0))
			{
				if (entity::is_entity_at_coord(iLocal_2013, 229.6208f, -861.2581f, 28.9823f, 1f, 1f, 1f, false, true, 0))
				{
					iLocal_2007 = 3;
				}
			}
			break;
		
		case 3:
			break;
	}
}

void func_363(int iParam0, int iParam1)//Position - 0x15C1B
{
	if (iParam1)
	{
		gameplay::set_bit(&Global_25429, iParam0);
	}
	else
	{
		gameplay::clear_bit(&Global_25429, iParam0);
	}
}

void func_364(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x15C3D
{
	if (iParam0)
	{
		player::special_ability_deactivate_fast(player::player_id());
		player::set_all_random_peds_flee(player::player_id(), 1);
		player::set_police_ignore_player(player::player_id(), 1);
		func_371(1);
		ui::_0xA8FDB297A8D25FBA();
		ui::_0xFDB423997FA30340();
		if (Global_14443.f_1 > 3)
		{
			if (audio::is_mobile_phone_call_ongoing())
			{
				audio::stop_scripted_conversation(false);
			}
			if (!func_82())
			{
				Global_14443.f_1 = 3;
			}
			Global_15745 = 5;
		}
		func_370(1, iParam3, iParam2, 0);
		Global_55822 = 1;
		Global_68128 = 1;
		Global_69615 = 1;
	}
	else
	{
		func_371(0);
		ui::_0xE1CD1E48E025E661();
		Global_55822 = 0;
		if (iParam1)
		{
			graphics::_0x03FC694AE06C5A20();
		}
		player::set_all_random_peds_flee(player::player_id(), 0);
		player::set_police_ignore_player(player::player_id(), 0);
		func_370(0, iParam3, iParam2, 0);
		if (network::network_is_game_in_progress())
		{
			if (((!ped::is_ped_injured(player::player_ped_id()) && !func_368(player::player_id())) && !func_366(player::player_id(), 0)) && !func_365())
			{
				entity::set_entity_invincible(player::player_ped_id(), false);
			}
		}
		else if (!ped::is_ped_injured(player::player_ped_id()) && !func_368(player::player_id()))
		{
			entity::set_entity_invincible(player::player_ped_id(), false);
		}
		Global_69615 = 0;
	}
}

int func_365()//Position - 0x15D56
{
	return gameplay::is_bit_set(Global_1588660[player::player_id() /*532*/].f_39.f_18, 14);
}

int func_366(int iParam0, int iParam1)//Position - 0x15D73
{
	int iVar0;
	
	if (iParam0 == player::player_id())
	{
		iVar0 = func_367(-1, 0) == 8;
	}
	else
	{
		iVar0 = Global_1588660[iParam0 /*532*/].f_201 == 8;
	}
	if (iParam1 == 1)
	{
		if (network::network_is_player_active(iParam0))
		{
			iVar0 = player::get_player_team(iParam0) == 8;
		}
	}
	return iVar0;
}

int func_367(int iParam0, int iParam1)//Position - 0x15DBE
{
	int iVar0;
	int iVar1;
	
	iVar1 = iParam0;
	if (iVar1 == -1)
	{
		iVar1 = func_273();
	}
	if (Global_1315209[iVar1] == 1)
	{
		if (iParam1)
		{
		}
		iVar0 = 8;
	}
	else
	{
		iVar0 = Global_1312725[iVar1];
		if (iParam1)
		{
		}
	}
	return iVar0;
}

bool func_368(int iParam0)//Position - 0x15DFF
{
	if (func_366(iParam0, 0))
	{
		return true;
	}
	if (func_369())
	{
		if (iParam0 == player::player_id())
		{
			return true;
		}
	}
	if (gameplay::is_bit_set(Global_2421327[iParam0 /*353*/].f_196, 2))
	{
		return true;
	}
	return false;
}

int func_369()//Position - 0x15E41
{
	return gameplay::is_bit_set(Global_2359301, 3);
}

int func_370(int iParam0, int iParam1, var uParam2, int iParam3)//Position - 0x15E52
{
	int iVar0;
	
	iVar0 = 0;
	if (gameplay::is_pc_version())
	{
		if (cutscene::_0xA0FE76168A189DDB() != iParam0 && uParam2)
		{
			cutscene::_0x20746F7B1032A3C7(iParam0, iParam1, 1, iParam3);
			iVar0 = 1;
		}
	}
	return iVar0;
}

void func_371(int iParam0)//Position - 0x15E85
{
	if (iParam0 == 1)
	{
		gameplay::set_bit(&Global_2313, 13);
	}
	else
	{
		gameplay::clear_bit(&Global_2313, 13);
	}
}

void func_372(vector3 vParam0, vector3 vParam3, float fParam6, vector3 vParam7, float fParam10, int iParam11, int iParam12, int iParam13, int iParam14, int iParam15)//Position - 0x15EA8
{
	func_373(vParam0, vParam3, fParam6, vParam7, fParam10, 0f, 0f, 0f, iParam11, iParam12, iParam13, iParam14, iParam15);
}

void func_373(vector3 vParam0, vector3 vParam3, float fParam6, vector3 vParam7, float fParam10, vector3 vParam11, int iParam14, int iParam15, int iParam16, int iParam17, int iParam18)//Position - 0x15ED1
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	vector3 vVar4;
	vector3 vVar7;
	vector3 vVar10;
	int iVar13;
	int iVar14;
	int iVar15;
	
	if (iParam15)
	{
		iParam15 = false;
	}
	iVar2 = true;
	iVar3 = 0;
	iVar0 = player::get_players_last_vehicle();
	if (entity::does_entity_exist(iVar0))
	{
		if (!entity::is_entity_a_mission_entity(iVar0))
		{
			entity::set_entity_as_mission_entity(iVar0, true, 0);
			iVar3 = 1;
		}
		if (vehicle::is_vehicle_driveable(iVar0, 0))
		{
			if (iParam18)
			{
				func_377(iVar0);
			}
			if (entity::is_entity_in_angled_area(iVar0, vParam0, vParam3, fParam6, 0, true, 0))
			{
				iVar1 = true;
			}
			else
			{
				vVar10 = { entity::get_entity_coords(iVar0, 1) };
				if ((vVar10.y > vParam0.y && vVar10.y < vParam3.y) || (vVar10.y > vParam3.y && vVar10.y < vParam0.y))
				{
					if (func_374(iVar0, vParam0, vParam3, fParam6))
					{
						iVar1 = true;
					}
				}
			}
			if (vehicle::is_vehicle_driveable(iVar0, 0))
			{
				if (vehicle::is_vehicle_model(iVar0, joaat("taxi")))
				{
					if (vehicle::get_ped_in_vehicle_seat(iVar0, -1, 0) != player::player_ped_id() && vehicle::get_ped_in_vehicle_seat(iVar0, -1, 0) != 0)
					{
						if (gameplay::get_distance_between_coords(vParam0 + vParam3 / Vector(2f, 2f, 2f), entity::get_entity_coords(iVar0, 1), 1) < 20f)
						{
							iVar1 = true;
							iVar2 = false;
						}
					}
				}
			}
			if (iParam16)
			{
				if (func_268(iVar0, func_34(), 1))
				{
					iVar1 = false;
				}
			}
			if (iVar1)
			{
				if (!func_239(vParam11))
				{
					if (vehicle::is_vehicle_driveable(iVar0, 0))
					{
						iVar13 = entity::get_entity_model(iVar0);
						vehicle::_0xDF7E3EEB29642C38(iVar0, &vVar4, &vVar7);
						if (vehicle::is_this_model_a_heli(iVar13))
						{
							vParam11.x = (vParam11.x + 3f);
							vParam11.y = (vParam11.y + 3f);
						}
						if (((iVar13 == joaat("zentorno") || iVar13 == joaat("btype")) || iVar13 == joaat("dubsta3")) || iVar13 == joaat("monster"))
						{
							vParam11 = { vParam11 * Vector(1.1f, 1.1f, 1.1f) };
						}
						else if (iVar13 == joaat("t20") || iVar13 == joaat("virgo"))
						{
							vParam11 = { vParam11 * Vector(1.2f, 1.2f, 1.2f) };
						}
						if ((vVar7.x - vVar4.x) > vParam11.x)
						{
							iVar2 = false;
						}
						else if ((vVar7.y - vVar4.y) > vParam11.y)
						{
							iVar2 = false;
						}
						else if ((vVar7.y - vVar4.y) > vParam11.y)
						{
							iVar2 = false;
						}
					}
				}
				if (vehicle::is_vehicle_driveable(iVar0, 0))
				{
					if (iVar2)
					{
						gameplay::clear_area_of_vehicles(vParam7, 5f, 0, 0, 0, 0, false);
						entity::set_entity_heading(iVar0, fParam10);
						entity::set_entity_coords(iVar0, vParam7, 1, false, 0, 1);
						vehicle::set_vehicle_on_ground_properly(iVar0);
						if (iParam17)
						{
							vehicle::set_vehicle_engine_on(iVar0, false, 1, 0);
							vehicle::set_vehicle_doors_shut(iVar0, 1);
						}
					}
					else
					{
						if (!entity::is_entity_a_mission_entity(iVar0) || !entity::does_entity_belong_to_this_script(iVar0, 1))
						{
							entity::set_entity_as_mission_entity(iVar0, true, 1);
						}
						if (ped::is_ped_in_vehicle(player::player_ped_id(), iVar0, 0))
						{
							entity::set_entity_coords(player::player_ped_id(), entity::get_entity_coords(iVar0, 1), 1, false, 0, 1);
						}
						vehicle::delete_vehicle(&iVar0);
					}
				}
			}
			if (iParam14)
			{
				gameplay::clear_angled_area_of_vehicles(vParam0, vParam3, fParam6, 0, 0, 0, 0, 0);
			}
			if (iVar3 == 1)
			{
				if (entity::does_entity_exist(iVar0))
				{
					if (entity::is_entity_a_mission_entity(iVar0))
					{
						entity::set_vehicle_as_no_longer_needed(&iVar0);
					}
				}
			}
		}
		else
		{
			if (!entity::is_entity_a_mission_entity(iVar0))
			{
				entity::set_entity_as_mission_entity(iVar0, true, 0);
			}
			iVar14 = vehicle::get_ped_in_vehicle_seat(iVar0, -1, 0);
			if (entity::does_entity_exist(iVar14) && !ped::is_ped_injured(iVar14))
			{
				entity::set_entity_coords(iVar14, entity::get_entity_coords(iVar14, 1), 1, false, 0, 1);
			}
			iVar15 = vehicle::_get_vehicle_model_max_number_of_passengers(entity::get_entity_model(iVar0));
			if (iVar15 <= 2)
			{
				iVar14 = vehicle::get_ped_in_vehicle_seat(iVar0, 0, 0);
				if (entity::does_entity_exist(iVar14) && !ped::is_ped_injured(iVar14))
				{
					entity::set_entity_coords(iVar14, entity::get_entity_coords(iVar14, 1), 1, false, 0, 1);
				}
			}
			if (iVar15 <= 4)
			{
				iVar14 = vehicle::get_ped_in_vehicle_seat(iVar0, 1, 0);
				if (entity::does_entity_exist(iVar14) && !ped::is_ped_injured(iVar14))
				{
					entity::set_entity_coords(iVar14, entity::get_entity_coords(iVar14, 1), 1, false, 0, 1);
				}
				iVar14 = vehicle::get_ped_in_vehicle_seat(iVar0, 2, 0);
				if (entity::does_entity_exist(iVar14) && !ped::is_ped_injured(iVar14))
				{
					entity::set_entity_coords(iVar14, entity::get_entity_coords(iVar14, 1), 1, false, 0, 1);
				}
			}
			vehicle::delete_vehicle(&iVar0);
		}
	}
}

bool func_374(int iParam0, vector3 vParam1, vector3 vParam4, float fParam7)//Position - 0x162BE
{
	vector3 vVar0;
	vector3 vVar3;
	vector3 vVar6;
	vector3 vVar9;
	vector3 vVar12;
	vector3 vVar15;
	vector3 vVar18[4];
	struct<2> Var31;
	struct<2> Var34;
	
	if (vehicle::is_vehicle_driveable(iParam0, 0))
	{
		vParam1.z = vParam4.y;
		vVar0 = { func_376(vParam1 - vParam4) };
		vVar3 = { vVar0 };
		vVar0.x = -vVar3.y;
		vVar0.y = vVar3.x;
		vVar0.z = 0f;
		vVar6 = { vParam1 - vVar0 * FtoV((fParam7 / 2f)) };
		vVar9 = { vParam1 + vVar0 * FtoV((fParam7 / 2f)) };
		vVar12 = { vParam4 - vVar0 * FtoV((fParam7 / 2f)) };
		vVar15 = { vParam4 + vVar0 * FtoV((fParam7 / 2f)) };
		gameplay::get_model_dimensions(entity::get_entity_model(iParam0), &Var31, &Var34);
		vVar18[0 /*3*/] = { entity::get_offset_from_entity_in_world_coords(iParam0, Var31, Var31.f_1, 0f) };
		vVar18[1 /*3*/] = { entity::get_offset_from_entity_in_world_coords(iParam0, Var31, Var34.f_1, 0f) };
		vVar18[2 /*3*/] = { entity::get_offset_from_entity_in_world_coords(iParam0, Var34, Var31.f_1, 0f) };
		vVar18[3 /*3*/] = { entity::get_offset_from_entity_in_world_coords(iParam0, Var34, Var34.f_1, 0f) };
		if (((((((((((((((func_375(vVar18[0 /*3*/], vVar18[1 /*3*/], vVar6, vVar9) || func_375(vVar18[0 /*3*/], vVar18[1 /*3*/], vVar9, vVar15)) || func_375(vVar18[0 /*3*/], vVar18[1 /*3*/], vVar12, vVar15)) || func_375(vVar18[0 /*3*/], vVar18[1 /*3*/], vVar6, vVar12)) || func_375(vVar18[1 /*3*/], vVar18[3 /*3*/], vVar6, vVar9)) || func_375(vVar18[1 /*3*/], vVar18[3 /*3*/], vVar9, vVar15)) || func_375(vVar18[1 /*3*/], vVar18[3 /*3*/], vVar12, vVar15)) || func_375(vVar18[1 /*3*/], vVar18[3 /*3*/], vVar6, vVar12)) || func_375(vVar18[3 /*3*/], vVar18[2 /*3*/], vVar6, vVar9)) || func_375(vVar18[3 /*3*/], vVar18[2 /*3*/], vVar9, vVar15)) || func_375(vVar18[3 /*3*/], vVar18[2 /*3*/], vVar12, vVar15)) || func_375(vVar18[3 /*3*/], vVar18[2 /*3*/], vVar6, vVar12)) || func_375(vVar18[2 /*3*/], vVar18[0 /*3*/], vVar6, vVar9)) || func_375(vVar18[2 /*3*/], vVar18[0 /*3*/], vVar9, vVar15)) || func_375(vVar18[2 /*3*/], vVar18[0 /*3*/], vVar12, vVar15)) || func_375(vVar18[2 /*3*/], vVar18[0 /*3*/], vVar6, vVar12))
		{
			return true;
		}
	}
	return false;
}

bool func_375(struct<2> Param0, var uParam2, struct<2> Param3, var uParam5, struct<2> Param6, var uParam8, struct<2> Param9, var uParam11)//Position - 0x165B4
{
	float fVar0;
	float fVar1;
	float fVar2;
	float fVar3;
	float fVar4;
	float fVar5;
	float fVar6;
	float fVar7;
	float fVar8;
	float fVar9;
	float fVar10;
	float fVar11;
	float fVar12;
	float fVar13;
	
	fVar0 = Param0;
	fVar1 = Param0.f_1;
	fVar2 = Param3;
	fVar3 = Param3.f_1;
	fVar4 = Param6;
	fVar5 = Param6.f_1;
	fVar6 = Param9;
	fVar7 = Param9.f_1;
	fVar8 = (fVar2 - fVar0);
	fVar9 = (fVar3 - fVar1);
	fVar10 = (fVar6 - fVar4);
	fVar11 = (fVar7 - fVar5);
	fVar12 = (((-fVar9 * (fVar0 - fVar4)) + (fVar8 * (fVar1 - fVar5))) / ((-fVar10 * fVar9) + (fVar8 * fVar11)));
	fVar13 = (((fVar10 * (fVar1 - fVar5)) - (fVar11 * (fVar0 - fVar4))) / ((-fVar10 * fVar9) + (fVar8 * fVar11)));
	if (((fVar12 >= 0f && fVar12 <= 1f) && fVar13 >= 0f) && fVar13 <= 1f)
	{
		return true;
	}
	return false;
}

Vector3 func_376(vector3 vParam0)//Position - 0x16668
{
	float fVar0;
	float fVar1;
	
	fVar0 = system::vmag(vParam0);
	if (fVar0 != 0f)
	{
		fVar1 = (1f / fVar0);
		vParam0 = { vParam0 * Vector(fVar1, fVar1, fVar1) };
	}
	else
	{
		vParam0.x = 0f;
		vParam0.y = 0f;
		vParam0.z = 0f;
	}
	return vParam0;
}

void func_377(int iParam0)//Position - 0x166A7
{
	if (entity::does_entity_exist(iParam0))
	{
		if (vehicle::is_vehicle_driveable(iParam0, 0))
		{
			if (vehicle::get_vehicle_engine_health(iParam0) <= 200f)
			{
				vehicle::set_vehicle_engine_health(iParam0, 500f);
			}
			if (vehicle::get_vehicle_petrol_tank_health(iParam0) <= 700f)
			{
				vehicle::set_vehicle_engine_health(iParam0, 900f);
			}
			if (entity::get_entity_health(iParam0) < 200)
			{
				vehicle::set_vehicle_engine_health(iParam0, 500f);
			}
		}
	}
}

void func_378()//Position - 0x1670C
{
	unk1::_0xEB2D525B57F42B40();
	func_379();
}

void func_379()//Position - 0x1671C
{
	Global_17151.f_134 = 1;
}

void func_380(var uParam0)//Position - 0x1672A
{
	func_440(uParam0);
}

bool func_381()//Position - 0x16738
{
	if (Global_3)
	{
		return true;
	}
	if (Global_91406 == 7 || Global_91406 == 8)
	{
		return true;
	}
	return false;
}

bool func_382(var uParam0)//Position - 0x16765
{
	if (uParam0->f_270)
	{
		return true;
	}
	return false;
}

void func_383(var uParam0, float fParam1, int iParam2)//Position - 0x1677A
{
	if (func_384(uParam0, fParam1))
	{
		if (iParam2)
		{
			func_173(&cLocal_1018, -1);
		}
		else
		{
			func_322(&cLocal_1018, 7500, 1);
		}
	}
}

bool func_384(var uParam0, float fParam1)//Position - 0x167A8
{
	if (func_159(uParam0, fParam1))
	{
		func_197(uParam0);
		return true;
	}
	return false;
}

void func_385(var uParam0)//Position - 0x167C6
{
	int iVar0;
	
	if (uParam0->f_271)
	{
		if ((gameplay::get_frame_count() >= (uParam0->f_272 + uParam0->f_273) || gameplay::is_bit_set(Global_91406.f_20, 2)) || gameplay::is_bit_set(Global_91406.f_20, 13))
		{
			iVar0 = 0;
			while (iVar0 < 15)
			{
				if (gameplay::is_bit_set((*uParam0)[iVar0 /*18*/], 30))
				{
					if (!gameplay::is_bit_set((*uParam0)[iVar0 /*18*/], 29))
					{
						func_386(uParam0[iVar0 /*18*/]);
						uParam0->f_272 = gameplay::get_frame_count();
						return;
					}
				}
				iVar0++;
			}
		}
	}
}

void func_386(int iParam0)//Position - 0x16854
{
	func_387(iParam0, &(iParam0->f_2), iParam0->f_1);
}

void func_387(int iParam0, char* sParam1, int iParam2)//Position - 0x1686A
{
	if (gameplay::is_bit_set(*iParam0, 30))
	{
		switch (func_345(*iParam0))
		{
			case 0:
				streaming::request_model(iParam2);
				break;
			
			case 1:
				streaming::request_anim_dict(sParam1);
				break;
			
			case 2:
				streaming::request_clip_set(sParam1);
				break;
			
			case 3:
				graphics::request_streamed_texture_dict(sParam1, gameplay::is_bit_set(*iParam0, 28));
				break;
			
			case 4:
				vehicle::request_vehicle_recording(iParam2, sParam1);
				break;
			
			case 5:
				ai::request_waypoint_recording(sParam1);
				break;
			
			case 6:
				audio::request_script_audio_bank(sParam1, gameplay::is_bit_set(*iParam0, 27), -1);
				break;
			
			case 7:
				script::_request_streamed_script(iParam2);
				break;
			
			case 8:
				ui::request_additional_text(sParam1, iParam2);
				break;
			
			case 9:
				streaming::request_ptfx_asset();
				break;
			
			default:
				break;
		}
		gameplay::set_bit(iParam0, 29);
	}
}

struct<39> func_388(int iParam0)//Position - 0x16944
{
	struct<39> Var0;
	
	if (iParam0 == 0)
	{
		Var0 = 1;
		Var0.f_1 = { 0f, 0f, 0f };
		Var0.f_4 = { 0f, 0f, 0f };
		Var0.f_7 = { func_389(0) };
		Var0.f_22 = "Assassin_Valet";
		Var0.f_23 = 7000f;
		Var0.f_24 = 2000f;
		Var0.f_32 = -1;
		Var0.f_25 = { -1700.015f, -1066.335f, 12.144f };
		Var0.f_28 = { -1691.564f, -1066.514f, 12.076f };
		Var0.f_31 = 35.4714f;
		Var0.f_10 = { -1700.467f, -1066.672f, 13.8795f };
		Var0.f_13 = { -4.8332f, 0f, -177.1283f };
		Var0.f_16 = { -1700.467f, -1066.672f, 13.8795f };
		Var0.f_19 = { -4.8332f, 0f, -177.1283f };
		Var0.f_33 = { -1700.098f, -1067.939f, 12.1547f };
		Var0.f_36 = 162.4559f;
		Var0.f_37 = 1;
	}
	else if (iParam0 == 1)
	{
		Var0 = 0;
		Var0.f_1 = { -699.3992f, -917.5043f, 18.2143f };
		Var0.f_4 = { 0f, 0f, 0f };
		Var0.f_7 = { func_389(1) };
		Var0.f_22 = "Assassin_Multi";
		Var0.f_23 = 5000f;
		Var0.f_24 = 2000f;
		Var0.f_32 = -1;
		Var0.f_25 = { -700.1855f, -917.9558f, 18.2143f };
		Var0.f_28 = { -699.9455f, -921.7786f, 18.0144f };
		Var0.f_31 = 78.0874f;
		Var0.f_10 = { -697.8064f, -921.4629f, 20.5104f };
		Var0.f_13 = { -13.5249f, 0f, 30.6033f };
		Var0.f_16 = { -702.4851f, -921.2747f, 21.1235f };
		Var0.f_19 = { -22.5196f, 0f, -43.0435f };
		Var0.f_33 = { 0f, 0f, 0f };
		Var0.f_36 = 0f;
		Var0.f_37 = 0;
	}
	else if (iParam0 == 2)
	{
		Var0 = 0;
		Var0.f_1 = { 215.1206f, -853.3143f, 29.3684f };
		Var0.f_4 = { 0f, 0f, 87.1787f };
		Var0.f_7 = { func_389(2) };
		Var0.f_22 = "Assassin_Hooker";
		Var0.f_23 = 3000f;
		Var0.f_24 = 2000f;
		Var0.f_32 = -1;
		Var0.f_25 = { 213.7994f, -853.9389f, 29.3929f };
		Var0.f_28 = { 205.2641f, -847.2667f, 29.4903f };
		Var0.f_31 = 140.1039f;
		Var0.f_10 = { 216.7391f, -856.0031f, 32.7127f };
		Var0.f_13 = { -25.1365f, 0f, 41.3912f };
		Var0.f_16 = { 210.4668f, -851.3092f, 32.1099f };
		Var0.f_19 = { -16.3326f, 0f, -127.0114f };
		Var0.f_33 = { 213.8733f, -853.8161f, 29.3922f };
		Var0.f_36 = 344.0112f;
		Var0.f_37 = 0;
	}
	else if (iParam0 == 3)
	{
		Var0 = 0;
		Var0.f_1 = { -22.5499f, -107.3546f, 56.0161f };
		Var0.f_4 = { 0f, 0f, 269.7924f };
		Var0.f_7 = { func_389(3) };
		Var0.f_22 = "Assassin_Bus";
		Var0.f_23 = 5000f;
		Var0.f_24 = 2000f;
		Var0.f_32 = -1;
		Var0.f_25 = { -22.3125f, -108.9183f, 56.0068f };
		Var0.f_28 = { -17.2677f, -118.5915f, 55.8734f };
		Var0.f_31 = 1.4374f;
		Var0.f_10 = { -26.1094f, -108.0298f, 59.052f };
		Var0.f_13 = { -21.2059f, 0f, -109.0176f };
		Var0.f_16 = { -20.1189f, -111.9639f, 59.4377f };
		Var0.f_19 = { -27.0037f, 0f, 29.464f };
		Var0.f_33 = { 0f, 0f, 0f };
		Var0.f_36 = 0f;
		Var0.f_37 = 0;
	}
	else if (iParam0 == 4)
	{
		Var0 = 0;
		Var0.f_1 = { 806.1469f, -1070.21f, 27.3361f };
		Var0.f_4 = { 0f, 0f, 90f };
		Var0.f_7 = { func_389(4) };
		Var0.f_22 = "Assassin_Construction";
		Var0.f_23 = 8000f;
		Var0.f_24 = 2000f;
		Var0.f_32 = 1;
		Var0.f_25 = { 804.9559f, -1070.46f, 27.3361f };
		Var0.f_28 = { 799.8408f, -1079.142f, 27.321f };
		Var0.f_31 = 69.6524f;
		Var0.f_10 = { 801.8048f, -1068.068f, 30.3496f };
		Var0.f_13 = { -20.8953f, 0f, -132.9451f };
		Var0.f_16 = { 805.8168f, -1074.496f, 28.9803f };
		Var0.f_19 = { -1.5585f, 0f, 6.9143f };
		Var0.f_33 = { 804.8776f, -1070.523f, 27.3416f };
		Var0.f_36 = 287.8741f;
		Var0.f_37 = 0;
	}
	return Var0;
}

Vector3 func_389(int iParam0)//Position - 0x16DFC
{
	switch (iParam0)
	{
		case 0:
			return -1704.427f, -1077.316f, 12.1111f;
		
		case 1:
			return -700.429f, -916.7467f, 18.2143f;
		
		case 2:
			return 214.1641f, -852.8006f, 29.3929f;
		
		case 3:
			return -21.9871f, -107.4823f, 55.997f;
		
		case 4:
			return 806.1469f, -1070.21f, 27.3361f;
		
		default:
	}
	return 0f, 0f, 0f;
}

void func_390()//Position - 0x16E86
{
	int iVar0;
	
	iVar0 = func_39(Global_101553.f_18818.f_1, 4096);
	Global_101553.f_18818.f_1 = 0;
	if (iVar0)
	{
		func_449(&(Global_101553.f_18818.f_1), 4096);
	}
}

void func_391()//Position - 0x16EBF
{
}

void func_392(vector3 vParam0, float fParam3, int iParam4, int iParam5)//Position - 0x16EC7
{
	if (func_439())
	{
		gameplay::set_this_script_can_be_paused(0);
		gameplay::clear_bit(&(Global_91406.f_20), 2);
		gameplay::set_game_paused(true);
		if (player::is_player_playing(player::player_id()))
		{
			player::set_player_control(player::player_id(), false, 0);
		}
		Global_91402 = { vParam0 };
		Global_91405 = fParam3;
		Global_91401 = 1;
		if (iParam4 == 1)
		{
			gameplay::set_bit(&(Global_91406.f_20), 14);
		}
		else
		{
			gameplay::clear_bit(&(Global_91406.f_20), 14);
		}
		if (iParam5 == 1)
		{
			gameplay::set_bit(&(Global_91406.f_20), 24);
		}
		else
		{
			gameplay::clear_bit(&(Global_91406.f_20), 24);
		}
		func_330(1);
	}
}

int func_393(vector3 vParam0, float fParam3)//Position - 0x16F5C
{
	return func_394(&(Global_95894.f_2311), vParam0, fParam3, 0);
}

int func_394(var uParam0, vector3 vParam1, float fParam4, int iParam5)//Position - 0x16F76
{
	int iVar0;
	vector3 vVar1;
	int iVar4;
	var uVar5;
	int iVar8;
	
	if (func_433(uParam0))
	{
		if (func_137(vParam1, 0f, 0f, 0f, 0))
		{
			vParam1 = { *uParam0 };
			fParam4 = uParam0->f_6;
		}
		if (uParam0->f_12.f_66 == joaat("monster") || uParam0->f_12.f_66 == joaat("marshall"))
		{
			if (object::is_point_in_angled_area(vParam1, -816.8716f, 185.6238f, 71.40275f, -807.4894f, 189.3762f, 75.27323f, 6.5f, 0, true))
			{
				vParam1 = { -850.93f, 158.82f, 65.7f };
				fParam4 = 89.5f;
			}
		}
		if (func_432(uParam0))
		{
			gameplay::clear_area(vParam1, 5f, 1, 0, 0, false);
			func_431(vParam1, 5f, 0);
			iVar0 = vehicle::create_vehicle(uParam0->f_12.f_66, vParam1, fParam4, 1, true);
			if (entity::does_entity_exist(iVar0))
			{
				vVar1 = { entity::get_entity_coords(iVar0, 1) };
				if (system::vdist2(vVar1, -1151.15f, -1530.32f, 7.48925f) <= 3f)
				{
					entity::set_entity_coords_no_offset(iVar0, vParam1, 0, 0, 1);
				}
				func_423(iVar0, &(uParam0->f_12), 0, 1);
				iVar4 = true;
				if (vehicle::is_this_model_a_boat(uParam0->f_12.f_66) || vehicle::_is_this_model_an_emergency_boat(uParam0->f_12.f_66))
				{
					if (!water::test_probe_against_water(vParam1.x, vParam1.y, (vParam1.y + 30f), vParam1.x, vParam1.y, (vParam1.y - 30f), &uVar5))
					{
						iVar4 = false;
					}
				}
				if (iVar4)
				{
					vehicle::set_vehicle_on_ground_properly(iVar0);
				}
				if (uParam0->f_7 == 1)
				{
					if (iParam5)
					{
						if (vehicle::is_this_model_a_car(entity::get_entity_model(iVar0)))
						{
							func_422(uParam0->f_11, 1);
						}
						else if (vehicle::is_this_model_a_bike(entity::get_entity_model(iVar0)))
						{
							func_422(uParam0->f_11, 2);
						}
					}
					vehicle::_0xAB04325045427AAE(iVar0, 0);
					vehicle::_0x428BACCDF5E26EAD(iVar0, false);
					vehicle::set_vehicle_has_strong_axles(iVar0, true);
					func_421(iVar0, uParam0->f_11);
				}
				else if ((!func_418(iVar0, uParam0->f_3, uParam0->f_8) && uParam0->f_10) && gameplay::are_strings_equal(script::get_this_script_name(), "startup_positioning"))
				{
					iVar8 = func_417(iVar0);
					if (iVar8 == -1)
					{
						uParam0->f_10 = 0;
					}
					else
					{
						func_412(iVar8);
					}
				}
				if (((Global_91406 != 13 && Global_91406 != 10) && Global_91406 != 11) && Global_91406 != 12)
				{
					if (gameplay::get_hash_key(&(Global_91406.f_3)) == Global_69434)
					{
						if (uParam0->f_12.f_66 == Global_101553.f_18972.f_69[21 /*78*/].f_66)
						{
							func_409(24, 0);
							func_412(24);
						}
					}
				}
				if (uParam0->f_9 == 1)
				{
					func_395(iVar0, uParam0->f_11);
				}
				streaming::set_model_as_no_longer_needed(uParam0->f_12.f_66);
				vVar1 = { entity::get_entity_coords(iVar0, 1) };
			}
			return iVar0;
		}
	}
	return iVar0;
}

void func_395(int iParam0, int iParam1)//Position - 0x17222
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (!func_396(iParam0))
	{
		return;
	}
	if ((iParam1 != 0 && iParam1 != 1) && iParam1 != 2)
	{
		iVar0 = vehicle::get_ped_in_vehicle_seat(iParam0, -1, 0);
		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_101553.f_1991.f_539.f_3549;
		}
	}
	iVar1 = 0;
	while (iVar1 < 3)
	{
		iVar2 = 0;
		while (iVar2 < 2)
		{
			if (entity::get_entity_model(iParam0) == Global_101553.f_18972.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_66)
			{
				if (!gameplay::is_string_null_or_empty(&(Global_101553.f_18972.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_1)))
				{
					if (gameplay::are_strings_equal(vehicle::get_vehicle_number_plate_text(iParam0), &(Global_101553.f_18972.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_1)))
					{
						Global_101553.f_18972.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_66 = 0;
						Global_101553.f_18972.f_5592[iVar1] = iVar2;
					}
				}
			}
			iVar2++;
		}
		iVar1++;
	}
	iVar1 = 0;
	while (iVar1 < 3)
	{
		if (entity::get_entity_model(iParam0) == Global_101553.f_18972.f_5600[iVar1 /*78*/].f_66)
		{
			if (!gameplay::is_string_null_or_empty(&(Global_101553.f_18972.f_5600[iVar1 /*78*/].f_1)))
			{
				if (gameplay::are_strings_equal(vehicle::get_vehicle_number_plate_text(iParam0), &(Global_101553.f_18972.f_5600[iVar1 /*78*/].f_1)))
				{
					Global_101553.f_18972.f_5600[iVar1 /*78*/].f_66 = 0;
				}
			}
		}
		iVar1++;
	}
	Global_101553.f_18972.f_5590 = iParam1;
	Global_69351 = iParam0;
	Global_101553.f_18972.f_5588 = 1;
	func_258(iParam0, &(Global_101553.f_18972.f_5510));
}

bool func_396(int iParam0)//Position - 0x17424
{
	if ((((((((((!entity::does_entity_exist(iParam0) || !vehicle::is_vehicle_driveable(iParam0, 0)) || func_268(iParam0, 0, 0)) || func_268(iParam0, 1, 0)) || func_268(iParam0, 2, 0)) || func_254(iParam0) != 145) || func_408(iParam0)) || func_407(iParam0)) || func_406(iParam0)) || func_405(iParam0)) || !func_397(entity::get_entity_model(iParam0)))
	{
		if (func_407(iParam0))
		{
		}
		if (func_407(iParam0))
		{
		}
		if (func_268(iParam0, 0, 0))
		{
		}
		if (func_268(iParam0, 1, 0))
		{
		}
		if (func_268(iParam0, 2, 0))
		{
		}
		if (func_254(iParam0) != 145)
		{
		}
		return false;
	}
	return true;
}

bool func_397(int iParam0)//Position - 0x17501
{
	if (iParam0 == 0)
	{
		return false;
	}
	if (!func_398(iParam0, 0))
	{
		return false;
	}
	if (((vehicle::is_this_model_a_boat(iParam0) || vehicle::is_this_model_a_plane(iParam0)) || vehicle::is_this_model_a_heli(iParam0)) || vehicle::is_this_model_a_train(iParam0))
	{
		return false;
	}
	switch (iParam0)
	{
		case joaat("bus"):
		case joaat("stretch"):
		case joaat("barracks"):
		case joaat("armytanker"):
		case joaat("rhino"):
		case joaat("armytrailer"):
		case joaat("barracks2"):
		case joaat("flatbed"):
		case joaat("ripley"):
		case joaat("towtruck"):
		case joaat("towtruck2"):
		case joaat("airbus"):
		case joaat("coach"):
		case joaat("rentalbus"):
		case joaat("tourbus"):
		case 1938952078:
		case joaat("pbus"):
		case joaat("trash"):
		case joaat("benson"):
		case joaat("boattrailer"):
		case joaat("biff"):
		case joaat("hauler"):
		case joaat("docktrailer"):
		case joaat("phantom"):
		case joaat("pounder"):
		case joaat("tractor2"):
		case joaat("bulldozer"):
		case joaat("handler"):
		case joaat("tiptruck"):
		case joaat("cutter"):
		case joaat("dump"):
		case joaat("mixer"):
		case joaat("mixer2"):
		case joaat("rubble"):
		case joaat("scrap"):
		case joaat("tiptruck2"):
		case joaat("camper"):
		case joaat("taco"):
		case joaat("boxville"):
		case joaat("boxville2"):
		case joaat("boxville3"):
		case joaat("journey"):
		case joaat("mule"):
		case joaat("mule2"):
		case joaat("police"):
		case joaat("police2"):
		case joaat("police3"):
		case joaat("police4"):
		case joaat("policeb"):
		case joaat("policeold1"):
		case joaat("policeold2"):
		case joaat("policet"):
		case joaat("taxi"):
		case joaat("submersible"):
		case joaat("submersible2"):
		case joaat("monster"):
			return false;
			break;
	}
	return true;
}

bool func_398(int iParam0, int iParam1)//Position - 0x176B2
{
	int iVar0;
	struct<2> Var1;
	
	if (iParam0 == 0)
	{
		return false;
	}
	if (!streaming::is_model_a_vehicle(iParam0))
	{
		return false;
	}
	if ((((((((((((iParam0 == joaat("dodo") || iParam0 == joaat("dukes")) || iParam0 == joaat("dukes2")) || (iParam0 == joaat("dominator2") && !network::network_is_game_in_progress())) || (iParam0 == joaat("buffalo3") && !network::network_is_game_in_progress())) || (iParam0 == joaat("gauntlet2") && !network::network_is_game_in_progress())) || iParam0 == joaat("blimp2")) || iParam0 == joaat("stalion")) || (iParam0 == joaat("stalion2") && !network::network_is_game_in_progress())) || iParam0 == joaat("submersible2")) || iParam0 == joaat("marshall")) || iParam0 == joaat("blista2")) || iParam0 == joaat("blista3"))
	{
		if (!func_404())
		{
			return false;
		}
	}
	else
	{
		iVar0 = 0;
		while (iVar0 < dlc1::get_num_dlc_vehicles())
		{
			if (dlc1::get_dlc_vehicle_data(iVar0, &Var1))
			{
				if (iParam0 == Var1.f_1)
				{
					if (dlc1::_is_dlc_data_empty(Var1))
					{
						return false;
					}
				}
			}
			iVar0++;
		}
	}
	if (iParam0 == joaat("blimp"))
	{
		if ((((!func_403() && !func_402()) && !func_401()) && !func_400()) && !func_404())
		{
			return false;
		}
	}
	if ((iParam0 == joaat("hotknife") || iParam0 == joaat("carbonrs")) || iParam0 == joaat("khamelion"))
	{
		if ((gameplay::is_durango_version() || gameplay::is_pc_version()) || gameplay::is_orbis_version())
		{
		}
		else if (!func_401())
		{
			return false;
		}
	}
	if (iParam1)
	{
		if (!func_399(iParam0))
		{
			return false;
		}
	}
	return true;
}

int func_399(int iParam0)//Position - 0x17894
{
	int iVar0;
	int iVar1;
	
	if (Global_2471234)
	{
		return 1;
	}
	iVar0 = 1;
	iVar1 = network::_get_posix_time();
	if (iParam0 == joaat("btype3"))
	{
		if ((!Global_262145.f_5415 && !Global_262145.f_11342) && iVar1 < Global_262145.f_11343)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("faction3"))
	{
		if (!Global_262145.f_12154 && iVar1 < Global_262145.f_12166)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("virgo3") || iParam0 == joaat("virgo2"))
	{
		if (!Global_262145.f_12150 && iVar1 < Global_262145.f_12162)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("sabregt2"))
	{
		if (!Global_262145.f_12151 && iVar1 < Global_262145.f_12163)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tornado5"))
	{
		if (!Global_262145.f_12152 && iVar1 < Global_262145.f_12164)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("minivan2"))
	{
		if (!Global_262145.f_12153 && iVar1 < Global_262145.f_12165)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("slamvan3"))
	{
		if (!Global_262145.f_12155 && iVar1 < Global_262145.f_12167)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("prototipo"))
	{
		if (!Global_262145.f_12156 && iVar1 < Global_262145.f_12159)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("seven70"))
	{
		if (!Global_262145.f_12157 && iVar1 < Global_262145.f_12160)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("pfister811"))
	{
		if (!Global_262145.f_12158 && iVar1 < Global_262145.f_12161)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("bf400"))
	{
		if (!Global_262145.f_14731 && iVar1 < Global_262145.f_14696)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("brioso"))
	{
		if (!Global_262145.f_14726 && iVar1 < Global_262145.f_14691)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("cliffhanger"))
	{
		if (!Global_262145.f_14730 && iVar1 < Global_262145.f_14695)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("contender"))
	{
		if (!Global_262145.f_14729 && iVar1 < Global_262145.f_14694)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("le7b"))
	{
		if (!Global_262145.f_14723 && iVar1 < Global_262145.f_14688)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("omnis"))
	{
		if (!Global_262145.f_14724 && iVar1 < Global_262145.f_14689)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("trophytruck"))
	{
		if (!Global_262145.f_14727 && iVar1 < Global_262145.f_14692)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("trophytruck2"))
	{
		if (!Global_262145.f_14728 && iVar1 < Global_262145.f_14693)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tropos"))
	{
		if (!Global_262145.f_14725 && iVar1 < Global_262145.f_14690)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("gargoyle"))
	{
		if (!Global_262145.f_14733 && iVar1 < Global_262145.f_14698)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("rallytruck"))
	{
		if (!Global_262145.f_14734 && iVar1 < Global_262145.f_14699)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tampa2"))
	{
		if (!Global_262145.f_14722 && iVar1 < Global_262145.f_14687)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tyrus"))
	{
		if (!Global_262145.f_14721 && iVar1 < Global_262145.f_14686)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("sheava"))
	{
		if (!Global_262145.f_14720 && iVar1 < Global_262145.f_14685)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("lynx"))
	{
		if (!Global_262145.f_14732 && iVar1 < Global_262145.f_14697)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("stalion2"))
	{
		if (!Global_262145.f_14735 && iVar1 < Global_262145.f_14700)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("gauntlet2"))
	{
		if (!Global_262145.f_14736 && iVar1 < Global_262145.f_14701)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("dominator2"))
	{
		if (!Global_262145.f_14737 && iVar1 < Global_262145.f_14702)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("buffalo3"))
	{
		if (!Global_262145.f_14738 && iVar1 < Global_262145.f_14703)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("defiler"))
	{
		if (!Global_262145.f_14884 && iVar1 < Global_262145.f_14906)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("nightblade"))
	{
		if (!Global_262145.f_14885 && iVar1 < Global_262145.f_14907)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("zombiea"))
	{
		if (!Global_262145.f_14886 && iVar1 < Global_262145.f_14908)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("esskey"))
	{
		if (!Global_262145.f_14888 && iVar1 < Global_262145.f_14909)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("avarus"))
	{
		if (!Global_262145.f_14889 && iVar1 < Global_262145.f_14910)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("zombieb"))
	{
		if (!Global_262145.f_14890 && iVar1 < Global_262145.f_14911)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("hakuchou2"))
	{
		if (!Global_262145.f_14891 && iVar1 < Global_262145.f_14912)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("vortex"))
	{
		if (!Global_262145.f_14892 && iVar1 < Global_262145.f_14913)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("shotaro"))
	{
		if (!Global_262145.f_14893 && iVar1 < Global_262145.f_14914)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("chimera"))
	{
		if (!Global_262145.f_14894 && iVar1 < Global_262145.f_14915)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("raptor"))
	{
		if (!Global_262145.f_14895 && iVar1 < Global_262145.f_14916)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("daemon2"))
	{
		if (!Global_262145.f_14896 && iVar1 < Global_262145.f_14917)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("blazer4"))
	{
		if (!Global_262145.f_14897 && iVar1 < Global_262145.f_14918)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tornado6"))
	{
		if (!Global_262145.f_14903 && iVar1 < Global_262145.f_14925)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("youga2"))
	{
		if (!Global_262145.f_14900 && iVar1 < Global_262145.f_14921)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("wolfsbane"))
	{
		if (!Global_262145.f_14901 && iVar1 < Global_262145.f_14922)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("faggio3"))
	{
		if (!Global_262145.f_14902 && iVar1 < Global_262145.f_14923)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("faggio"))
	{
		if (!Global_262145.f_14887 && iVar1 < Global_262145.f_14924)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("bagger"))
	{
		if (!Global_262145.f_14904 && iVar1 < Global_262145.f_14926)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("sanctus"))
	{
		if (!Global_262145.f_14898 && iVar1 < Global_262145.f_14919)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("manchez"))
	{
		if (!Global_262145.f_14899 && iVar1 < Global_262145.f_14920)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("ratbike"))
	{
		if (!Global_262145.f_14905 && iVar1 < Global_262145.f_14927)
		{
			iVar0 = 0;
		}
	}
	return iVar0;
}

bool func_400()//Position - 0x1811E
{
	return false;
}

bool func_401()//Position - 0x18127
{
	return true;
}

bool func_402()//Position - 0x18130
{
	return true;
}

bool func_403()//Position - 0x18139
{
	if (dlc2::is_dlc_present(-1226939934))
	{
		return true;
	}
	return false;
}

bool func_404()//Position - 0x18152
{
	int iVar0;
	
	if (network::network_is_signed_in())
	{
		if (network::_network_are_ros_available())
		{
			if (network::_0x593570C289A77688())
			{
				stats::stat_get_int(joaat("sp_unlock_exclus_content"), &iVar0, -1);
				gameplay::set_bit(&iVar0, 2);
				gameplay::set_bit(&iVar0, 4);
				gameplay::set_bit(&iVar0, 6);
				gameplay::set_bit(&Global_25, 2);
				gameplay::set_bit(&Global_25, 4);
				gameplay::set_bit(&Global_25, 6);
				stats::stat_set_int(joaat("sp_unlock_exclus_content"), iVar0, 1);
				if (gameplay::_0x5AA3BEFA29F03AD4())
				{
					iVar0 = gameplay::get_profile_setting(866);
					gameplay::set_bit(&iVar0, 0);
					stats::_0xDAC073C7901F9E15(iVar0);
				}
				return true;
			}
		}
	}
	if (Global_138925 == 2)
	{
		return true;
	}
	else if (Global_138925 == 3)
	{
		return false;
	}
	if (gameplay::_0x5AA3BEFA29F03AD4())
	{
		if (gameplay::is_bit_set(gameplay::get_profile_setting(866), 0))
		{
			return true;
		}
	}
	return false;
}

bool func_405(int iParam0)//Position - 0x1820D
{
	int iVar0;
	char* sVar1;
	
	iVar0 = entity::get_entity_model(iParam0);
	sVar1 = vehicle::get_vehicle_number_plate_text(iParam0);
	if (iVar0 == joaat("speedo") && gameplay::are_strings_equal(sVar1, "LAMAR G "))
	{
		return true;
	}
	if (!func_398(iVar0, 0))
	{
		return true;
	}
	return false;
}

bool func_406(int iParam0)//Position - 0x18253
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 3)
	{
		if (entity::does_entity_exist(Global_89100[iVar0]))
		{
			if (Global_89100[iVar0] == iParam0)
			{
				return true;
			}
		}
		iVar0++;
	}
	return false;
}

bool func_407(int iParam0)//Position - 0x1828E
{
	int iVar0;
	
	if (entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0))
	{
		iVar0 = 0;
		while (iVar0 < 9)
		{
			if (entity::does_entity_exist(Global_89070[iVar0]) && vehicle::is_vehicle_driveable(Global_89070[iVar0], 0))
			{
				if (Global_89070[iVar0] == iParam0 && entity::get_entity_model(Global_89070[iVar0]) == entity::get_entity_model(iParam0))
				{
					return true;
				}
			}
			iVar0++;
		}
	}
	return false;
}

bool func_408(int iParam0)//Position - 0x1830A
{
	int iVar0;
	
	if (entity::does_entity_exist(Global_68446.f_484[24]))
	{
		if (iParam0 == Global_68446.f_484[24])
		{
			return false;
		}
	}
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if (entity::does_entity_exist(Global_68446.f_484[iVar0]))
		{
			if ((((((((((((iVar0 != 24 && iVar0 != 21) && iVar0 != 22) && iVar0 != 23) && iVar0 != 27) && iVar0 != 30) && iVar0 != 33) && iVar0 != 28) && iVar0 != 31) && iVar0 != 34) && iVar0 != 26) && iVar0 != 29) && iVar0 != 32)
			{
				if (iParam0 == Global_68446.f_484[iVar0])
				{
					return true;
				}
			}
		}
		iVar0++;
	}
	return false;
}

void func_409(int iParam0, int iParam1)//Position - 0x183F2
{
	if (iParam0 == -1)
	{
		return;
	}
	if (iParam1)
	{
		if (!func_411(iParam0, 0))
		{
			func_410(iParam0, 1, 0);
			func_410(iParam0, 2, 0);
			func_410(iParam0, 3, 0);
			func_410(iParam0, 4, 0);
			func_410(iParam0, 0, 1);
			Global_68446[iParam0] = 1;
		}
	}
	else
	{
		func_410(iParam0, 0, 0);
	}
}

void func_410(int iParam0, int iParam1, int iParam2)//Position - 0x1844F
{
	if (iParam0 == -1)
	{
		return;
	}
	if (iParam2)
	{
		gameplay::set_bit(&(Global_101553.f_18972[iParam0]), iParam1);
	}
	else
	{
		gameplay::clear_bit(&(Global_101553.f_18972[iParam0]), iParam1);
	}
}

int func_411(int iParam0, int iParam1)//Position - 0x1848A
{
	if (iParam0 == -1)
	{
		return false;
	}
	return gameplay::is_bit_set(Global_101553.f_18972[iParam0], iParam1);
}

void func_412(int iParam0)//Position - 0x184AD
{
	int iVar0;
	
	if (iParam0 == -1)
	{
		return;
	}
	if (func_416(&(Global_68446.f_555[0 /*21*/]), iParam0))
	{
		if (entity::does_entity_exist(Global_68446.f_139[iParam0]))
		{
			iVar0 = true;
			if (!ped::is_ped_injured(player::player_ped_id()))
			{
				if (vehicle::is_vehicle_driveable(Global_68446.f_139[iParam0], 0))
				{
					if (ped::is_ped_in_vehicle(player::player_ped_id(), Global_68446.f_139[iParam0], 0))
					{
						iVar0 = false;
					}
				}
			}
			if (iVar0)
			{
				entity::set_entity_as_mission_entity(Global_68446.f_139[iParam0], true, 1);
				vehicle::delete_vehicle(&(Global_68446.f_139[iParam0]));
			}
		}
		Global_68446[iParam0] = 1;
		if (gameplay::is_bit_set(Global_68446.f_555[0 /*21*/].f_9, 13))
		{
			if (((((iParam0 == 24 && func_411(iParam0, 0)) && Global_69355.f_66 == 0) && Global_101553.f_18972.f_1958[Global_68446.f_555[0 /*21*/].f_14] != 0) && Global_101553.f_18972.f_1958[Global_68446.f_555[0 /*21*/].f_14] > 3) && (!func_414(0, Global_68446.f_555[0 /*21*/].f_12) || !func_414(1, Global_68446.f_555[0 /*21*/].f_12)))
			{
				func_413(&(Global_101553.f_18972.f_69[Global_68446.f_555[0 /*21*/].f_14 /*78*/]), &Global_69355);
				Global_69433 = Global_101553.f_18972.f_5591;
			}
			func_409(iParam0, 0);
		}
	}
}

void func_413(var uParam0, var uParam1)//Position - 0x1861F
{
	uParam1->f_66 = uParam0->f_66;
	*uParam1 = *uParam0;
	uParam1->f_1 = { uParam0->f_1 };
	uParam1->f_5 = uParam0->f_5;
	uParam1->f_6 = uParam0->f_6;
	uParam1->f_7 = uParam0->f_7;
	uParam1->f_8 = uParam0->f_8;
	uParam1->f_9 = { uParam0->f_9 };
	uParam1->f_59 = { uParam0->f_59 };
	uParam1->f_62 = uParam0->f_62;
	uParam1->f_63 = uParam0->f_63;
	uParam1->f_64 = uParam0->f_64;
	uParam1->f_65 = uParam0->f_65;
	uParam1->f_77 = uParam0->f_77;
	uParam1->f_67 = uParam0->f_67;
	uParam1->f_69 = uParam0->f_69;
	uParam1->f_68 = uParam0->f_68;
	uParam1->f_71 = uParam0->f_71;
	uParam1->f_72 = uParam0->f_72;
	uParam1->f_73 = uParam0->f_73;
	uParam1->f_74 = uParam0->f_74;
	uParam1->f_75 = uParam0->f_75;
	uParam1->f_76 = uParam0->f_76;
}

int func_414(int iParam0, int iParam1)//Position - 0x186EB
{
	int iVar0;
	
	switch (iParam1)
	{
		case 0:
			iVar0 = 0;
			break;
		
		case 1:
			iVar0 = 1;
			break;
		
		case 2:
			iVar0 = 2;
			break;
	}
	if (iParam0 < 0 || iParam0 >= func_415(&(Global_101553.f_18972.f_5038[iVar0 /*157*/])))
	{
		return 0;
	}
	return func_398(Global_101553.f_18972.f_5038[iVar0 /*157*/][iParam0 /*78*/].f_66, 0);
}

var func_415(var uParam0)//Position - 0x1875D
{
	return *uParam0;
}

int func_416(var uParam0, int iParam1)//Position - 0x18768
{
	int iVar0;
	int iVar1;
	
	*uParam0 = { 0f, 0f, 0f };
	uParam0->f_3 = 0f;
	uParam0->f_4 = 0;
	StringCopy(&(uParam0->f_5), "", 16);
	uParam0->f_9 = 0;
	uParam0->f_10 = 0;
	uParam0->f_11 = 0;
	uParam0->f_12 = 145;
	uParam0->f_13 = -1;
	uParam0->f_14 = 0;
	uParam0->f_15 = { 0f, 0f, 0f };
	uParam0->f_18 = { 0f, 0f, 0f };
	switch (iParam1)
	{
		case 0:
			*uParam0 = { -831.8538f, 172.1154f, 69.9058f };
			uParam0->f_3 = 157.5705f;
			uParam0->f_4 = func_256(0, 1);
			uParam0->f_12 = 0;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 1:
			*uParam0 = { 1970.943f, 3801.684f, 31.1396f };
			uParam0->f_3 = 301.3964f;
			uParam0->f_4 = func_256(0, 1);
			uParam0->f_12 = 0;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 2:
			*uParam0 = { -22.6297f, -1439.137f, 29.6549f };
			uParam0->f_3 = 180.0808f;
			uParam0->f_4 = func_256(1, 1);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 3:
			*uParam0 = { -22.5229f, -1434.699f, 29.6552f };
			uParam0->f_3 = 141.6114f;
			uParam0->f_4 = func_256(1, 2);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 19);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 4:
			*uParam0 = { 10.9281f, 545.669f, 174.7951f };
			uParam0->f_3 = 61.392f;
			uParam0->f_4 = func_256(1, 1);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 5:
			*uParam0 = { 6.1093f, 544.9742f, 174.2835f };
			uParam0->f_3 = 92.1548f;
			uParam0->f_4 = func_256(1, 2);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 19);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 6:
			*uParam0 = { 1981.416f, 3808.131f, 31.1384f };
			uParam0->f_3 = 117.2557f;
			uParam0->f_4 = func_256(2, 1);
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 7:
			*uParam0 = { -1158.488f, -1529.367f, 3.8995f };
			uParam0->f_3 = 35.7505f;
			uParam0->f_4 = func_256(2, 1);
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 8:
			*uParam0 = { 148.2868f, -1270.569f, 28.2252f };
			uParam0->f_3 = 208.4685f;
			uParam0->f_4 = func_256(2, 1);
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 9:
			*uParam0 = { 1459.509f, -1380.45f, 78.3259f };
			uParam0->f_3 = 99.6211f;
			uParam0->f_4 = joaat("scorcher");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 10:
			*uParam0 = { -1518.947f, -1387.865f, -0.5134f };
			uParam0->f_3 = 98.3867f;
			uParam0->f_4 = joaat("seashark");
			iVar0 = 1;
			gameplay::set_bit(&(uParam0->f_9), 6);
			break;
		
		case 11:
			*uParam0 = { 353.0926f, 3577.593f, 32.351f };
			uParam0->f_3 = 16.6205f;
			uParam0->f_4 = joaat("duster");
			iVar0 = 1;
			gameplay::set_bit(&(uParam0->f_9), 6);
			break;
		
		case 12:
			uParam0->f_14 = 0;
			*uParam0 = { -1652.004f, -3142.348f, 12.9921f };
			uParam0->f_3 = 329.1082f;
			uParam0->f_12 = 0;
			uParam0->f_13 = 359;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 13:
			uParam0->f_14 = 1;
			*uParam0 = { -1271.649f, -3380.685f, 12.9451f };
			uParam0->f_3 = 329.5137f;
			uParam0->f_12 = 1;
			uParam0->f_13 = 359;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 14:
			uParam0->f_14 = 2;
			*uParam0 = { 1735.586f, 3294.531f, 40.1651f };
			uParam0->f_3 = 194.9525f;
			uParam0->f_12 = 2;
			uParam0->f_13 = 359;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 15:
			uParam0->f_14 = 3;
			*uParam0 = { -846.27f, -1363.19f, 0.22f };
			uParam0->f_3 = 108.78f;
			uParam0->f_12 = 0;
			uParam0->f_13 = 356;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 16:
			uParam0->f_14 = 4;
			*uParam0 = { -849.47f, -1354.99f, 0.24f };
			uParam0->f_3 = 109.84f;
			uParam0->f_12 = 1;
			uParam0->f_13 = 356;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 17:
			uParam0->f_14 = 5;
			*uParam0 = { -852.47f, -1346.2f, 0.21f };
			uParam0->f_3 = 108.76f;
			uParam0->f_12 = 2;
			uParam0->f_13 = 356;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 18:
			uParam0->f_14 = 6;
			*uParam0 = { -745.857f, -1433.904f, 4.0005f };
			uParam0->f_12 = 0;
			uParam0->f_13 = 360;
			uParam0->f_15 = { -756.2952f, -1441.609f, 2.9184f };
			uParam0->f_18 = { -738.0606f, -1423.068f, 8.2835f };
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 19:
			uParam0->f_14 = 7;
			*uParam0 = { -761.8486f, -1453.829f, 4.0005f };
			uParam0->f_12 = 1;
			uParam0->f_13 = 360;
			uParam0->f_15 = { -772.8158f, -1459.957f, 3.2894f };
			uParam0->f_18 = { -754.3353f, -1440.836f, 8.3334f };
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 20:
			uParam0->f_14 = 8;
			*uParam0 = { 1769.3f, 3244f, 41.1f };
			uParam0->f_12 = 2;
			uParam0->f_13 = 360;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 21:
			uParam0->f_14 = 9;
			*uParam0 = { 192.7897f, -1020.539f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = 0;
			uParam0->f_13 = 357;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 28);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 22:
			uParam0->f_14 = 10;
			*uParam0 = { 192.7897f, -1020.539f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = 1;
			uParam0->f_13 = 357;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 28);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 23:
			uParam0->f_14 = 11;
			*uParam0 = { 192.7897f, -1020.539f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = 2;
			uParam0->f_13 = 357;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 28);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 26:
		case 27:
		case 28:
			iVar1 = (iParam1 - 26);
			uParam0->f_14 = (12 + iVar1);
			*uParam0 = { 196.2794f, -1020.479f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = (0 + iVar1);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 27);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 29:
		case 30:
		case 31:
			iVar1 = (iParam1 - 29);
			uParam0->f_14 = (15 + iVar1);
			*uParam0 = { 199.8872f, -1020.048f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = (0 + iVar1);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 27);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 32:
		case 33:
		case 34:
			iVar1 = (iParam1 - 32);
			uParam0->f_14 = (18 + iVar1);
			*uParam0 = { 203.6006f, -1019.776f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = (0 + iVar1);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 27);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 24:
			uParam0->f_14 = 21;
			*uParam0 = { 0f, 0f, 0f };
			uParam0->f_3 = 0f;
			uParam0->f_4 = 0;
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 11);
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 12);
			iVar0 = 1;
			break;
		
		case 25:
			uParam0->f_14 = 22;
			*uParam0 = { 723.2515f, -632.0496f, 27.1484f };
			uParam0->f_3 = 12.9316f;
			uParam0->f_4 = joaat("tailgater");
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 11);
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 12);
			iVar0 = 1;
			break;
		
		case 35:
			*uParam0 = { -51.23f, 3111.9f, 24.95f };
			uParam0->f_3 = 46.78f;
			uParam0->f_4 = joaat("proptrailer");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 36:
			*uParam0 = { -55.7984f, -1096.586f, 25.4223f };
			uParam0->f_3 = 308.0596f;
			uParam0->f_4 = joaat("bjxl");
			uParam0->f_10 = 126;
			uParam0->f_11 = 126;
			gameplay::set_bit(&(uParam0->f_9), 9);
			gameplay::set_bit(&(uParam0->f_9), 13);
			iVar0 = 1;
			break;
		
		case 37:
			*uParam0 = { -2892.93f, 3192.37f, 11.66f };
			uParam0->f_3 = -132.35f;
			uParam0->f_4 = joaat("velum");
			uParam0->f_10 = 157;
			uParam0->f_11 = 157;
			gameplay::set_bit(&(uParam0->f_9), 9);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 13);
			iVar0 = 1;
			break;
		
		case 38:
			*uParam0 = { 1744.308f, 3270.673f, 40.2076f };
			uParam0->f_3 = 125f;
			uParam0->f_4 = joaat("cargobob3");
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 39:
			*uParam0 = { 1751.44f, 3322.643f, 42.1855f };
			uParam0->f_3 = 268.134f;
			uParam0->f_4 = joaat("submersible");
			gameplay::set_bit(&(uParam0->f_9), 23);
			iVar0 = 1;
			break;
		
		case 41:
			*uParam0 = { 1377.104f, -2076.2f, 52f };
			uParam0->f_3 = 37.5f;
			uParam0->f_4 = joaat("towtruck");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 40:
			*uParam0 = { 1380.42f, -2072.77f, 51.7607f };
			uParam0->f_3 = 37.5f;
			uParam0->f_4 = joaat("trash");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 42:
			*uParam0 = { 1359.389f, 3618.441f, 33.8907f };
			uParam0->f_3 = 108.2337f;
			uParam0->f_4 = joaat("barracks");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 43:
			*uParam0 = { 693.1154f, -1018.155f, 21.6387f };
			uParam0->f_3 = 177.6454f;
			uParam0->f_4 = 1938952078;
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 44:
			*uParam0 = { -73.6963f, 495.124f, 143.5226f };
			uParam0->f_3 = 155.5994f;
			uParam0->f_4 = joaat("vacca");
			iVar0 = 1;
			break;
		
		case 45:
			*uParam0 = { -67.6314f, 891.8266f, 234.5348f };
			uParam0->f_3 = 294.993f;
			uParam0->f_4 = joaat("surano");
			iVar0 = 1;
			break;
		
		case 46:
			*uParam0 = { 533.9048f, -169.2469f, 53.7005f };
			uParam0->f_3 = 1.2998f;
			uParam0->f_4 = joaat("tornado2");
			iVar0 = 1;
			break;
		
		case 47:
			*uParam0 = { -726.8914f, -408.6952f, 34.0416f };
			uParam0->f_3 = 267.7392f;
			uParam0->f_4 = joaat("superd");
			iVar0 = 1;
			break;
		
		case 48:
			*uParam0 = { -1321.519f, 261.3993f, 61.5709f };
			uParam0->f_3 = 350.7697f;
			uParam0->f_4 = joaat("double");
			iVar0 = 1;
			break;
		
		case 49:
			*uParam0 = { -1267.999f, 451.6463f, 93.7071f };
			uParam0->f_3 = 48.9311f;
			uParam0->f_4 = joaat("double");
			iVar0 = 1;
			break;
		
		case 50:
			*uParam0 = { -1062.076f, -226.7637f, 37.157f };
			uParam0->f_3 = 234.2767f;
			uParam0->f_4 = joaat("double");
			iVar0 = 1;
			break;
		
		case 51:
			*uParam0 = { 68.16914f, -1558.958f, 29.46904f };
			uParam0->f_3 = 49.90575f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 52:
			*uParam0 = { 589.4399f, 2736.708f, 42.03316f };
			uParam0->f_3 = -175.7105f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 53:
			*uParam0 = { -488.774f, -344.5721f, 34.36356f };
			uParam0->f_3 = 82.4042f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 54:
			*uParam0 = { 288.8808f, -585.4728f, 43.15428f };
			uParam0->f_3 = -20.80707f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 55:
			*uParam0 = { 304.8294f, -1383.674f, 31.67744f };
			uParam0->f_3 = -41.11603f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 56:
			*uParam0 = { 1126.194f, -1481.486f, 34.7016f };
			uParam0->f_3 = -91.43369f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 57:
			*uParam0 = { -1598.36f, 5252.84f, 0f };
			uParam0->f_3 = 28.14f;
			uParam0->f_4 = joaat("submersible");
			uParam0->f_13 = 308;
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 30);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 58:
			*uParam0 = { -1602.62f, 5260.37f, 0.86f };
			uParam0->f_3 = 25.32f;
			uParam0->f_4 = joaat("dinghy");
			uParam0->f_13 = 404;
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 59:
			*uParam0 = { 2116.571f, 4763.279f, 40.1596f };
			uParam0->f_3 = 198.723f;
			uParam0->f_4 = joaat("bfinjection");
			iVar0 = 1;
			break;
		
		case 60:
			*uParam0 = { 1133.21f, 120.2f, 80.9f };
			uParam0->f_3 = 134.4f;
			if (func_404())
			{
				uParam0->f_4 = joaat("blimp2");
			}
			else
			{
				uParam0->f_4 = joaat("blimp");
			}
			uParam0->f_13 = 401;
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 1);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 21);
			iVar0 = 1;
			break;
		
		case 61:
			*uParam0 = { -806.31f, -2679.65f, 13.9f };
			uParam0->f_3 = 150.54f;
			if (func_404())
			{
				uParam0->f_4 = joaat("blimp2");
			}
			else
			{
				uParam0->f_4 = joaat("blimp");
			}
			uParam0->f_13 = 401;
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 1);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 21);
			iVar0 = 1;
			break;
		
		case 62:
			*uParam0 = { 1985.85f, 3828.96f, 31.98f };
			uParam0->f_3 = -16.58f;
			uParam0->f_4 = joaat("blazer3");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 63:
			*uParam0 = { 3870.75f, 4464.67f, 0f };
			uParam0->f_3 = 0f;
			uParam0->f_4 = joaat("submersible2");
			uParam0->f_13 = 308;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 6);
			gameplay::set_bit(&(uParam0->f_9), 30);
			iVar0 = 1;
			break;
		
		case 64:
			*uParam0 = { 1257.729f, -2564.474f, 41.717f };
			uParam0->f_3 = 284.5561f;
			uParam0->f_4 = joaat("dukes2");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 65:
			*uParam0 = { 643.2823f, 3014.152f, 42.2733f };
			uParam0->f_3 = 128.0554f;
			uParam0->f_4 = joaat("dukes2");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 66:
			*uParam0 = { 38.9368f, 850.8677f, 196.3f };
			uParam0->f_3 = 311.6813f;
			uParam0->f_4 = joaat("dodo");
			gameplay::set_bit(&(uParam0->f_9), 30);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 67:
			*uParam0 = { 1333.875f, 4262.226f, 30.78f };
			uParam0->f_3 = 262.5293f;
			uParam0->f_4 = joaat("dodo");
			gameplay::set_bit(&(uParam0->f_9), 30);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
	}
	if (gameplay::is_bit_set(uParam0->f_9, 10))
	{
		uParam0->f_4 = Global_101553.f_18972.f_69[uParam0->f_14 /*78*/].f_66;
		if (iParam1 == 14)
		{
			if (((((uParam0->f_4 == joaat("miljet") || uParam0->f_4 == joaat("besra")) || uParam0->f_4 == joaat("luxor")) || uParam0->f_4 == joaat("shamal")) || uParam0->f_4 == joaat("titan")) || uParam0->f_4 == joaat("luxor2"))
			{
				*uParam0 = { 1678.8f, 3229.6f, 41.8f };
				uParam0->f_3 = 106.0906f;
			}
		}
		if (!func_137(Global_101553.f_18972.f_1864[uParam0->f_14 /*3*/], 0f, 0f, 0f, 0))
		{
			*uParam0 = { Global_101553.f_18972.f_1864[uParam0->f_14 /*3*/] };
		}
		if (Global_101553.f_18972.f_1934[uParam0->f_14] != -1f)
		{
			uParam0->f_3 = Global_101553.f_18972.f_1934[uParam0->f_14];
		}
	}
	if (gameplay::is_bit_set(uParam0->f_9, 19))
	{
		if (!func_137(Global_101553.f_1991.f_539.f_2816[1 /*10*/][uParam0->f_12 /*3*/], 0f, 0f, 0f, 0))
		{
			*uParam0 = { Global_101553.f_1991.f_539.f_2816[1 /*10*/][uParam0->f_12 /*3*/] };
			uParam0->f_3 = Global_101553.f_1991.f_539.f_2837[1 /*4*/][uParam0->f_12];
		}
	}
	else if (gameplay::is_bit_set(uParam0->f_9, 20))
	{
		if (!func_137(Global_101553.f_1991.f_539.f_2816[0 /*10*/][uParam0->f_12 /*3*/], 0f, 0f, 0f, 0))
		{
			*uParam0 = { Global_101553.f_1991.f_539.f_2816[0 /*10*/][uParam0->f_12 /*3*/] };
			uParam0->f_3 = Global_101553.f_1991.f_539.f_2837[0 /*4*/][uParam0->f_12];
		}
	}
	return iVar0;
}

int func_417(int iParam0)//Position - 0x19E5F
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if ((entity::does_entity_exist(Global_68446.f_484[iVar0]) && !entity::is_entity_dead(Global_68446.f_484[iVar0], 0)) && vehicle::is_vehicle_driveable(Global_68446.f_484[iVar0], 0))
		{
			vehicle::get_vehicle_colours(iParam0, &iVar1, &iVar2);
			vehicle::get_vehicle_colours(Global_68446.f_484[iVar0], &iVar3, &iVar4);
			if (((entity::get_entity_model(iParam0) == entity::get_entity_model(Global_68446.f_484[iVar0]) && vehicle::get_vehicle_livery(iParam0) == vehicle::get_vehicle_livery(Global_68446.f_484[iVar0])) && iVar1 == iVar2) && iVar3 == iVar4)
			{
				return iVar0;
			}
		}
		iVar0++;
	}
	return -1;
}

bool func_418(int iParam0, vector3 vParam1, int iParam4)//Position - 0x19F22
{
	int iVar0;
	var uVar1[3];
	int iVar5;
	int iVar6;
	
	iVar0 = entity::get_entity_model(iParam0);
	switch (iVar0)
	{
		case joaat("cargobob"):
			if (func_420(iParam0, Global_68446.f_139[38], 0))
			{
				func_412(38);
				return true;
			}
			break;
		
		case 1938952078:
			if (func_420(iParam0, Global_68446.f_139[43], 1))
			{
				func_412(43);
				return true;
			}
			break;
		
		case joaat("cuban800"):
			iVar5 = ped::get_ped_nearby_vehicles(player::player_ped_id(), &uVar1);
			iVar6 = 0;
			while (iVar6 <= (iVar5 - 1))
			{
				if (func_420(iParam0, uVar1[iVar6], 1) && func_419(entity::get_entity_coords(uVar1[iVar6], 1), 2136.133f, 4780.563f, 39.9702f, 5f, 0))
				{
					if ((!iParam4 || func_137(vParam1, 0f, 0f, 0f, 0)) || gameplay::get_distance_between_coords(entity::get_entity_coords(iParam0, 1), entity::get_entity_coords(uVar1[iVar6], 1), 1) < 10f)
					{
						vehicle::delete_vehicle(&iParam0);
						return true;
					}
					else
					{
						return false;
					}
				}
				iVar6++;
			}
			break;
		
		case joaat("luxor2"):
			if ((entity::does_entity_exist(Global_68446.f_484[14]) && vehicle::is_vehicle_driveable(iParam0, 0)) && vehicle::is_vehicle_driveable(Global_68446.f_484[14], 0))
			{
				if (entity::get_entity_model(Global_68446.f_484[14]) == joaat("luxor2") && vehicle::get_vehicle_livery(iParam0) == vehicle::get_vehicle_livery(Global_68446.f_484[14]))
				{
					func_412(14);
					return true;
				}
			}
			break;
		
		case joaat("swift2"):
			if ((entity::does_entity_exist(Global_68446.f_484[20]) && vehicle::is_vehicle_driveable(iParam0, 0)) && vehicle::is_vehicle_driveable(Global_68446.f_484[20], 0))
			{
				if (entity::get_entity_model(Global_68446.f_484[20]) == joaat("swift2") && vehicle::get_vehicle_livery(iParam0) == vehicle::get_vehicle_livery(Global_68446.f_484[20]))
				{
					func_412(20);
					return true;
				}
			}
			break;
	}
	return false;
}

bool func_419(vector3 vParam0, vector3 vParam3, float fParam6, int iParam7)//Position - 0x1A12A
{
	if (fParam6 < 0f)
	{
		fParam6 = 0f;
	}
	if (!iParam7)
	{
		if (gameplay::absf((vParam0.x - vParam3.x)) <= fParam6)
		{
			if (gameplay::absf((vParam0.y - vParam3.y)) <= fParam6)
			{
				if (gameplay::absf((vParam0.y - vParam3.y)) <= fParam6)
				{
					return true;
				}
			}
		}
	}
	else if (gameplay::absf((vParam0.x - vParam3.x)) <= fParam6)
	{
		if (gameplay::absf((vParam0.y - vParam3.y)) <= fParam6)
		{
			return true;
		}
	}
	return false;
}

bool func_420(int iParam0, int iParam1, int iParam2)//Position - 0x1A1A5
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	
	if ((entity::does_entity_exist(iParam1) && !entity::is_entity_dead(iParam1, 0)) && vehicle::is_vehicle_driveable(iParam1, 0))
	{
		if (iParam2)
		{
			vehicle::get_vehicle_colours(iParam0, &iVar0, &iVar1);
			vehicle::get_vehicle_colours(iParam1, &iVar2, &iVar3);
			if (iVar0 == iVar2 && iVar1 == iVar3)
			{
				return true;
			}
		}
		else
		{
			return true;
		}
	}
	return false;
}

void func_421(int iParam0, var uParam1)//Position - 0x1A206
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (!entity::does_entity_exist(Global_89070[iVar0]))
		{
			Global_89070[iVar0] = iParam0;
			Global_89080[iVar0] = uParam1;
			Global_89090[iVar0] = entity::get_entity_model(iParam0);
			if (vehicle::is_this_model_a_car(Global_89090[iVar0]))
			{
				Global_89118[uParam1 /*3*/][0] = -1;
			}
			else
			{
				Global_89118[uParam1 /*3*/][1] = -1;
			}
			iVar0 = 9;
		}
		if (iVar0 == 8)
		{
		}
		iVar0++;
	}
}

void func_422(int iParam0, int iParam1)//Position - 0x1A288
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (entity::does_entity_exist(Global_89070[iVar0]))
		{
			if (iParam0 == 145 || Global_89080[iVar0] == iParam0)
			{
				if (iParam1 == 0 || entity::get_entity_model(Global_89070[iVar0]) == func_256(iParam0, iParam1))
				{
					if (!ped::is_ped_in_vehicle(player::player_ped_id(), Global_89070[iVar0], 0))
					{
						entity::set_entity_as_mission_entity(Global_89070[iVar0], false, 1);
						vehicle::delete_vehicle(&(Global_89070[iVar0]));
						Global_89080[iVar0] = 145;
					}
				}
			}
		}
		iVar0++;
	}
}

void func_423(int iParam0, var uParam1, int iParam2, int iParam3)//Position - 0x1A326
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (vehicle::is_vehicle_driveable(iParam0, 0))
	{
		if (gameplay::get_hash_key(&(uParam1->f_1)) != 0)
		{
			vehicle::set_vehicle_number_plate_text(iParam0, &(uParam1->f_1));
		}
		if (*uParam1 >= 0 && *uParam1 < vehicle::get_number_of_vehicle_number_plates())
		{
			vehicle::set_vehicle_number_plate_text_index(iParam0, *uParam1);
		}
		if (uParam1->f_66 == joaat("sovereign"))
		{
			uParam1->f_5 = 111;
			uParam1->f_6 = 111;
			uParam1->f_7 = 111;
		}
		else if (uParam1->f_66 == joaat("casco"))
		{
			iVar0 = 1;
			if (gameplay::is_bit_set(uParam1->f_77, func_259(iVar0 + 1)))
			{
			}
			else
			{
				gameplay::set_bit(&(uParam1->f_77), func_259(iVar0 + 1));
			}
		}
		else if (uParam1->f_66 == joaat("sandking") || uParam1->f_66 == joaat("sandking2"))
		{
			iVar1 = 1;
			if (gameplay::is_bit_set(uParam1->f_77, func_259(iVar1 + 1)))
			{
			}
			else
			{
				gameplay::set_bit(&(uParam1->f_77), func_259(iVar1 + 1));
			}
		}
		if (gameplay::is_bit_set(uParam1->f_77, 13))
		{
			vehicle::set_vehicle_custom_primary_colour(iParam0, uParam1->f_71, uParam1->f_72, uParam1->f_73);
		}
		else
		{
			vehicle::clear_vehicle_custom_primary_colour(iParam0);
		}
		if (gameplay::is_bit_set(uParam1->f_77, 12))
		{
			vehicle::set_vehicle_custom_secondary_colour(iParam0, uParam1->f_71, uParam1->f_72, uParam1->f_73);
		}
		else
		{
			vehicle::clear_vehicle_custom_secondary_colour(iParam0);
		}
		vehicle::set_vehicle_colours(iParam0, uParam1->f_5, uParam1->f_6);
		if (uParam1->f_7 < 0)
		{
			uParam1->f_7 = 0;
		}
		if (uParam1->f_8 < 0)
		{
			uParam1->f_8 = 0;
		}
		vehicle::set_vehicle_extra_colours(iParam0, uParam1->f_7, uParam1->f_8);
		if (((gameplay::is_bit_set(uParam1->f_77, 15) || func_430(iParam0)) || (((uParam1->f_62 == 0 && uParam1->f_63 == 0) && uParam1->f_64 == 0) && uParam1->f_9[20] > 0)) && func_429())
		{
			uParam1->f_62 = 0;
			uParam1->f_63 = 0;
			uParam1->f_64 = 0;
		}
		else if ((uParam1->f_62 == 0 && uParam1->f_63 == 0) && uParam1->f_64 == 0)
		{
			uParam1->f_62 = 255;
			uParam1->f_63 = 255;
			uParam1->f_64 = 255;
		}
		vehicle::set_vehicle_tyre_smoke_color(iParam0, uParam1->f_62, uParam1->f_63, uParam1->f_64);
		if (uParam1->f_65 == -1 && uParam1->f_66 != joaat("granger"))
		{
			vehicle::set_vehicle_window_tint(iParam0, 0);
		}
		else
		{
			vehicle::set_vehicle_window_tint(iParam0, 0);
			vehicle::set_vehicle_window_tint(iParam0, uParam1->f_65);
		}
		vehicle::set_vehicle_tyres_can_burst(iParam0, !gameplay::is_bit_set(uParam1->f_77, 9));
		if (iParam2)
		{
			vehicle::set_vehicle_doors_locked(iParam0, uParam1->f_70);
		}
		vehicle::_set_vehicle_neon_lights_colour(iParam0, uParam1->f_74, uParam1->f_75, uParam1->f_76);
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 2, gameplay::is_bit_set(uParam1->f_77, 28));
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 3, gameplay::is_bit_set(uParam1->f_77, 29));
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 0, gameplay::is_bit_set(uParam1->f_77, 30));
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 1, gameplay::is_bit_set(uParam1->f_77, 31));
		vehicle::set_vehicle_is_stolen(iParam0, gameplay::is_bit_set(uParam1->f_77, 10));
		if (vehicle::get_vehicle_livery_count(iParam0) > 1 && uParam1->f_67 >= 0)
		{
			vehicle::set_vehicle_livery(iParam0, uParam1->f_67);
		}
		if (uParam1->f_69 > -1 && uParam1->f_69 < 255)
		{
			if (!vehicle::is_this_model_a_bicycle(entity::get_entity_model(iParam0)))
			{
				if (vehicle::is_this_model_a_bike(entity::get_entity_model(iParam0)))
				{
					if (uParam1->f_69 == 6)
					{
						func_428(iParam0, uParam1->f_69);
					}
				}
				else
				{
					func_428(iParam0, uParam1->f_69);
				}
			}
		}
		if (vehicle::is_vehicle_a_convertible(iParam0, 0))
		{
			if ((uParam1->f_68 == 0 || uParam1->f_68 == 3) || uParam1->f_68 == 5)
			{
				vehicle::raise_convertible_roof(iParam0, 1);
			}
			else
			{
				vehicle::lower_convertible_roof(iParam0, 1);
			}
		}
		if (iParam3)
		{
			func_424(&iParam0, &(uParam1->f_9), &(uParam1->f_59));
		}
		if (!vehicle::is_this_model_a_heli(uParam1->f_66) && !vehicle::is_this_model_a_boat(uParam1->f_66))
		{
			iVar2 = 0;
			while (iVar2 <= 11)
			{
				if (gameplay::is_bit_set(uParam1->f_77, func_259(iVar2 + 1)))
				{
					if (!vehicle::is_vehicle_extra_turned_on(iParam0, iVar2 + 1))
					{
						vehicle::set_vehicle_extra(iParam0, iVar2 + 1, false);
					}
				}
				else if (vehicle::is_vehicle_extra_turned_on(iParam0, iVar2 + 1))
				{
					vehicle::set_vehicle_extra(iParam0, iVar2 + 1, true);
				}
				iVar2++;
			}
		}
		if ((entity::get_entity_model(iParam0) == joaat("sheava") || entity::get_entity_model(iParam0) == joaat("omnis")) || entity::get_entity_model(iParam0) == joaat("le7b"))
		{
			if (vehicle::get_vehicle_mod(iParam0, 0) == -1)
			{
				vehicle::set_vehicle_extra(iParam0, 1, false);
			}
		}
		if (vehicle::is_this_model_a_plane(uParam1->f_66))
		{
			if (!gameplay::is_bit_set(uParam1->f_77, 23))
			{
				if (gameplay::is_bit_set(uParam1->f_77, 22))
				{
					vehicle::_set_vehicle_landing_gear(iParam0, 2);
				}
				else
				{
					vehicle::_set_vehicle_landing_gear(iParam0, 3);
				}
			}
			else
			{
				vehicle::_set_vehicle_landing_gear(iParam0, 4);
			}
		}
		if (gameplay::is_bit_set(uParam1->f_77, 27))
		{
			decorator::decor_set_bool(iParam0, "IgnoredByQuickSave", 1);
		}
		else
		{
			decorator::decor_set_bool(iParam0, "IgnoredByQuickSave", 0);
		}
	}
}

bool func_424(int iParam0, var uParam1, var uParam2)//Position - 0x1A7D4
{
	int iVar0;
	int iVar1;
	
	if (!vehicle::is_vehicle_driveable(*iParam0, 0))
	{
		return false;
	}
	if (vehicle::get_num_mod_kits(*iParam0) == 0)
	{
		return false;
	}
	vehicle::set_vehicle_mod_kit(*iParam0, 0);
	iVar0 = 0;
	while (iVar0 < *uParam1)
	{
		iVar1 = iVar0;
		if (((((iVar1 == 17 || iVar1 == 18) || iVar1 == 19) || iVar1 == 20) || iVar1 == 21) || iVar1 == 22)
		{
			vehicle::toggle_vehicle_mod(*iParam0, iVar1, (*uParam1)[iVar0] > 0);
		}
		else if (vehicle::get_vehicle_mod(*iParam0, iVar1) != ((*uParam1)[iVar0] - 1))
		{
			vehicle::remove_vehicle_mod(*iParam0, iVar1);
			if ((*uParam1)[iVar0] > 0)
			{
				if (iVar0 == 23)
				{
					vehicle::set_vehicle_mod(*iParam0, iVar1, ((*uParam1)[iVar0] - 1), (*uParam2)[0] > 0);
				}
				else if (iVar0 == 24)
				{
					vehicle::set_vehicle_mod(*iParam0, iVar1, ((*uParam1)[iVar0] - 1), (*uParam2)[1] > 0);
				}
				else
				{
					vehicle::set_vehicle_mod(*iParam0, iVar1, ((*uParam1)[iVar0] - 1), false);
				}
			}
		}
		iVar0++;
	}
	if (func_427(entity::get_entity_model(*iParam0), 1) && vehicle::get_vehicle_mod(*iParam0, 24) != func_426(*iParam0, ((*uParam1)[38] - 1)))
	{
		vehicle::set_vehicle_mod(*iParam0, 24, func_426(*iParam0, ((*uParam1)[38] - 1)), false);
	}
	if (func_425(*iParam0))
	{
		vehicle::set_vehicle_strong(*iParam0, true);
		vehicle::set_vehicle_has_strong_axles(*iParam0, true);
	}
	return true;
}

bool func_425(int iParam0)//Position - 0x1A94C
{
	int iVar0;
	int iVar1;
	int iVar2;
	char cVar3[16];
	
	if ((entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0)) && vehicle::get_num_mod_kits(iParam0) > 0)
	{
		vehicle::set_vehicle_mod_kit(iParam0, 0);
		iVar0 = 0;
		while (iVar0 < 49)
		{
			iVar1 = iVar0;
			if (((((iVar1 == 17 || iVar1 == 18) || iVar1 == 19) || iVar1 == 20) || iVar1 == 21) || iVar1 == 22)
			{
			}
			else if (vehicle::get_vehicle_mod(iParam0, iVar1) != -1)
			{
				StringCopy(&cVar3, vehicle::get_mod_text_label(iParam0, iVar1, vehicle::get_vehicle_mod(iParam0, iVar1)), 16);
				iVar2 = gameplay::get_hash_key(&cVar3);
				if (iVar2 != 0)
				{
					if (iVar2 == gameplay::get_hash_key("MNU_CAGE") || iVar2 == gameplay::get_hash_key("SABRE_CAG"))
					{
						return true;
					}
				}
			}
			iVar0++;
		}
	}
	return false;
}

int func_426(int iParam0, int iParam1)//Position - 0x1AA28
{
	int iVar0;
	int iVar1;
	float fVar2;
	int iVar3;
	
	if (entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0))
	{
		switch (entity::get_entity_model(iParam0))
		{
			case joaat("tornado5"):
				switch (iParam1)
				{
					case 0:
						return 0;
						break;
					
					case 1:
						return 1;
						break;
					
					case 2:
						return 2;
						break;
					
					case 3:
						return 3;
						break;
					
					case 4:
						return 4;
						break;
					
					case 5:
						return 4;
						break;
				}
				break;
			
			case joaat("faction3"):
				return 3;
				break;
		}
		iVar0 = vehicle::get_num_vehicle_mods(iParam0, 38);
		iVar1 = vehicle::get_num_vehicle_mods(iParam0, 24);
		fVar2 = (system::to_float(iParam1 + 1) / system::to_float(iVar0));
		iVar3 = (system::floor((system::to_float(iVar1) * fVar2)) - 1);
		if (iVar3 < 0)
		{
			iVar3 = 0;
		}
		if (iVar3 >= iVar0)
		{
			iVar3 = (iVar0 - 1);
		}
		return iVar3;
	}
	return 0;
}

bool func_427(int iParam0, int iParam1)//Position - 0x1AB0D
{
	switch (iParam0)
	{
		case joaat("faction2"):
		case joaat("buccaneer2"):
		case joaat("chino2"):
		case joaat("moonbeam2"):
		case joaat("primo2"):
		case joaat("voodoo"):
			return true;
			break;
		
		case joaat("sabregt2"):
			if (!Global_262145.f_12151)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("tornado5"):
			if (!Global_262145.f_12152)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("virgo2"):
			if (!Global_262145.f_12150)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("minivan2"):
			if (!Global_262145.f_12153)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("slamvan3"):
			if (!Global_262145.f_12155)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("faction3"):
			if (!Global_262145.f_12154)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("sultanrs"):
		case joaat("banshee2"):
			if (iParam1 & 1 != 0)
			{
				return false;
			}
			return true;
			break;
	}
	return false;
}

void func_428(int iParam0, int iParam1)//Position - 0x1AC21
{
	int iVar0;
	int iVar1;
	
	if (vehicle::get_num_mod_kits(iParam0) > 0)
	{
		vehicle::set_vehicle_mod_kit(iParam0, 0);
		iVar0 = vehicle::get_vehicle_mod(iParam0, 24);
		iVar1 = vehicle::get_vehicle_mod_variation(iParam0, 24);
		vehicle::set_vehicle_wheel_type(iParam0, iParam1);
		if (entity::get_entity_model(iParam0) == joaat("tornado6"))
		{
			return;
		}
		if (iVar0 == -1)
		{
			vehicle::remove_vehicle_mod(iParam0, 24);
		}
		else
		{
			vehicle::set_vehicle_mod(iParam0, 24, iVar0, iVar1 == 1);
		}
	}
}

int func_429()//Position - 0x1AC86
{
	return dlc2::is_dlc_present(-1691188696);
}

int func_430(int iParam0)//Position - 0x1AC97
{
	int iVar0;
	
	if (entity::does_entity_exist(iParam0))
	{
		if (vehicle::is_vehicle_driveable(iParam0, 0))
		{
			if (decorator::decor_is_registered_as_type("MPBitset", 3))
			{
				if (decorator::decor_exist_on(iParam0, "MPBitset"))
				{
					iVar0 = decorator::decor_get_int(iParam0, "MPBitset");
				}
				return gameplay::is_bit_set(iVar0, 4);
			}
		}
	}
	return false;
}

void func_431(vector3 vParam0, float fParam3, int iParam4)//Position - 0x1ACE2
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if (func_416(&(Global_68446.f_555[0 /*21*/]), iVar0))
		{
			if (gameplay::get_distance_between_coords(vParam0, Global_68446.f_555[0 /*21*/], iParam4) <= fParam3)
			{
				func_412(iVar0);
			}
		}
		iVar0++;
	}
}

bool func_432(var uParam0)//Position - 0x1AD32
{
	if (func_433(uParam0))
	{
		if (streaming::has_model_loaded(uParam0->f_12.f_66))
		{
			return true;
		}
		else
		{
			return false;
		}
		return true;
	}
	else
	{
		return false;
	}
	return true;
}

bool func_433(var uParam0)//Position - 0x1AD67
{
	if (uParam0->f_12.f_66 == 0)
	{
		return false;
	}
	if (!func_398(uParam0->f_12.f_66, 0))
	{
		return false;
	}
	if (uParam0->f_12.f_66 == joaat("stunt") && func_419(*uParam0, 1694.62f, 3276.27f, 41.31f, 1056964608, 0))
	{
		return false;
	}
	return true;
}

int func_434()//Position - 0x1ADC6
{
	return func_432(&(Global_95894.f_2311));
}

void func_435()//Position - 0x1ADD9
{
	func_436(&(Global_95894.f_2311));
}

void func_436(var uParam0)//Position - 0x1ADEC
{
	if (func_433(uParam0))
	{
		streaming::request_model(uParam0->f_12.f_66);
	}
}

int func_437()//Position - 0x1AE0A
{
	return func_433(&(Global_95894.f_2311));
}

int func_438()//Position - 0x1AE1D
{
	if (!Global_91406 == 10 && !Global_91406 == 9)
	{
		return 0;
	}
	return Global_91406.f_2;
}

bool func_439()//Position - 0x1AE47
{
	if (Global_91406 == 10 || Global_91406 == 9)
	{
		return true;
	}
	return false;
}

void func_440(var uParam0)//Position - 0x1AE6B
{
	vector3 vVar0;
	
	rope::rope_unload_textures();
	func_446(0);
	audio::stop_scripted_conversation(false);
	func_85(0);
	if (!entity::is_entity_dead(player::player_ped_id(), 0) && !ped::is_ped_injured(player::player_ped_id()))
	{
		ped::set_ped_using_action_mode(player::player_ped_id(), false, -1, 0);
	}
	iLocal_1027 = iLocal_1027;
	vehicle::_0x1033371FC8E842A7(iLocal_1027);
	vehicle::set_vehicle_density_multiplier_this_frame(1f);
	vehicle::set_random_vehicle_density_multiplier_this_frame(1f);
	vehicle::set_all_vehicle_generators_active_in_area(-690.763f, -1607.467f, -100.9649f, -404.4197f, -1856.529f, 100.5908f, true, 1);
	pathfind::set_roads_back_to_original_in_angled_area(-706.106f, -1708.865f, -100f, -512.576f, -1842.173f, 100f, 100f, 1);
	pathfind::set_roads_back_to_original_in_angled_area(-480.9742f, -1801.922f, 19.28045f, -712.8968f, -1671.164f, 29.93867f, 170f, 1);
	pathfind::set_roads_back_to_original_in_angled_area(-674.8915f, -1683.639f, 9.116446f, -446.189f, -1807.7f, 31.72464f, 200f, 1);
	pathfind::set_roads_back_to_original_in_angled_area(-662.6993f, -1645.326f, 24.07147f, -672.2144f, -1777.59f, 38.81248f, 45f, 1);
	pathfind::set_roads_back_to_original_in_angled_area(-382.9608f, -1688.732f, 17.8985f, -431.2512f, -1811.23f, 37.6825f, 80f, 1);
	vVar0 = { 414.1398f, -640.002f, 27.5001f };
	vehicle::set_all_vehicle_generators_active_in_area((vVar0.x - 40f), (vVar0.y - 40f), (vVar0.y - 40f), (vVar0.x + 40f), (vVar0.y + 40f), (vVar0.y + 40f), true, 1);
	pathfind::set_roads_back_to_original_in_angled_area(426.035f, -644.93f, -100f, 421.035f, -644.93f, 100f, 55f, 1);
	vehicle::set_parked_vehicle_density_multiplier_this_frame(1f);
	ped::clear_ped_non_creation_area();
	ped::stop_any_ped_model_being_suppressed();
	audio::stop_stream();
	func_441(uParam0, 0);
	player::set_wanted_level_multiplier(1f);
	script::terminate_this_thread();
}

void func_441(var uParam0, int iParam1)//Position - 0x1B04B
{
	int iVar0;
	
	if (!iParam1)
	{
		func_443(uParam0);
	}
	iVar0 = 0;
	while (iVar0 < 15)
	{
		func_442(uParam0[iVar0 /*18*/]);
		iVar0++;
	}
	uParam0->f_271 = 0;
	uParam0->f_272 = -1;
	uParam0->f_273 = 1;
}

void func_442(var uParam0)//Position - 0x1B08E
{
	*uParam0 = 0;
	uParam0->f_1 = -1;
	StringCopy(&(uParam0->f_2), "NULL", 64);
}

void func_443(var uParam0)//Position - 0x1B0A7
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 15)
	{
		if (gameplay::is_bit_set((*uParam0)[iVar0 /*18*/], 30))
		{
			func_444(uParam0[iVar0 /*18*/]);
		}
		iVar0++;
	}
	uParam0->f_271 = 1;
}

void func_444(var uParam0)//Position - 0x1B0E1
{
	func_445(*uParam0, &(uParam0->f_2), uParam0->f_1);
}

void func_445(int iParam0, char* sParam1, int iParam2)//Position - 0x1B0F8
{
	if (gameplay::is_bit_set(iParam0, 30))
	{
		switch (func_345(iParam0))
		{
			case 0:
				streaming::set_model_as_no_longer_needed(iParam2);
				break;
			
			case 1:
				streaming::remove_anim_dict(sParam1);
				break;
			
			case 2:
				streaming::remove_clip_set(sParam1);
				break;
			
			case 3:
				graphics::set_streamed_texture_dict_as_no_longer_needed(sParam1);
				break;
			
			case 4:
				vehicle::remove_vehicle_recording(iParam2, sParam1);
				break;
			
			case 5:
				ai::remove_waypoint_recording(sParam1);
				break;
			
			case 6:
				audio::release_script_audio_bank();
				break;
			
			case 7:
				script::_set_streamed_script_as_no_longer_needed(iParam2);
				break;
			
			case 8:
				ui::clear_additional_text(iParam2, gameplay::is_bit_set(iParam0, 26));
				break;
			
			case 9:
				streaming::remove_ptfx_asset();
				break;
			
			default:
				break;
		}
	}
}

void func_446(int iParam0)//Position - 0x1B1B8
{
	if (iParam0)
	{
		StringCopy(&Global_100609, script::get_this_script_name(), 24);
		Global_100603 = 1;
	}
	else
	{
		StringCopy(&Global_100609, "NULL", 24);
		Global_100603 = 0;
	}
}

void func_447()//Position - 0x1B1E4
{
	int iVar0;
	
	if (script::has_script_loaded("buddyDeathResponse"))
	{
		system::start_new_script("buddyDeathResponse", 1424);
	}
	if (Global_101553.f_7940 || func_4(0))
	{
		if (!func_448())
		{
			iVar0 = func_42();
			if (iVar0 != -1)
			{
				if (!func_228(iVar0))
				{
					return;
				}
				gameplay::set_bit(&(Global_82491[iVar0 /*5*/].f_1), 5);
				return;
			}
		}
		else
		{
			func_233();
		}
	}
}

bool func_448()//Position - 0x1B255
{
	if (((Global_91406 == 13 || Global_91406 == 10) || Global_91406 == 11) || Global_91406 == 12)
	{
		return false;
	}
	return true;
}

void func_449(var uParam0, int iParam1)//Position - 0x1B293
{
	func_450(uParam0, iParam1);
}

void func_450(var uParam0, var uParam1)//Position - 0x1B2A3
{
	*uParam0 = (*uParam0 || uParam1);
}

void func_451()//Position - 0x1B2B4
{
	if (func_104(&iLocal_1037))
	{
		Global_101553.f_18818.f_7 = func_101(&iLocal_1037);
	}
}

