text: #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;
  	struct<110> Local_28[4];
  	struct<94> Local_469 = { 0, 0, 0, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1 } ;
  	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 = -1;
  	var uLocal_573 = 0;
  	var uLocal_574 = 0;
  	var uLocal_575 = -1;
  	var uLocal_576 = 0;
  	var uLocal_577 = 0;
  	var uLocal_578 = 0;
  	struct<8> Local_579[5];
  	int iLocal_620[1] = { 0 };
  	struct<4> Local_622 = { 0, 0, 0, 0 } ;
  	char cLocal_626[64] = "";
  	var uLocal_634 = 0;
  	var uLocal_635 = 0;
  	var uLocal_636 = 0;
  	var uLocal_637 = 0;
  	var uLocal_638 = 0;
  	var uLocal_639 = 0;
  	var uLocal_640 = 0;
  	var uLocal_641 = 0;
  	struct<3> Local_642 = { 0, 0, 0 } ;
  	char cLocal_645[24] = "";
  	var uLocal_648 = 0;
  	var uLocal_649 = 0;
  	var uLocal_650 = 0;
  	int iLocal_651 = 0;
  	int iLocal_652 = 0;
  	bool bLocal_653 = 0;
  	bool bLocal_654 = 0;
  	int iLocal_655 = 0;
  	bool bLocal_656 = 0;
  	int iLocal_657 = 0;
  	var uLocal_658 = 30;
  	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 = 0;
  	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 = 0;
  	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;
  	var uLocal_726 = 0;
  	var uLocal_727 = 0;
  	var uLocal_728 = 0;
  	var uLocal_729 = 0;
  	var uLocal_730 = 0;
  	var uLocal_731 = 0;
  	var uLocal_732 = 0;
  	var uLocal_733 = 0;
  	var uLocal_734 = 0;
  	var uLocal_735 = 0;
  	var uLocal_736 = 0;
  	var uLocal_737 = 0;
  	var uLocal_738 = 0;
  	var uLocal_739 = 0;
  	var uLocal_740 = 0;
  	var uLocal_741 = 0;
  	var uLocal_742 = 0;
  	var uLocal_743 = 0;
  	var uLocal_744 = 0;
  	var uLocal_745 = 0;
  	var uLocal_746 = 0;
  	var uLocal_747 = 0;
  	var uLocal_748 = 0;
  	var uLocal_749 = 0;
  	var uLocal_750 = 0;
  	var uLocal_751 = 0;
  	var uLocal_752 = 0;
  	var uLocal_753 = 0;
  	var uLocal_754 = 0;
  	var uLocal_755 = 0;
  	var uLocal_756 = 0;
  	var uLocal_757 = 0;
  	var uLocal_758 = 0;
  	var uLocal_759 = 0;
  	var uLocal_760 = 0;
  	var uLocal_761 = 0;
  	var uLocal_762 = 0;
  	var uLocal_763 = 0;
  	var uLocal_764 = 0;
  	var uLocal_765 = 0;
  	var uLocal_766 = 0;
  	var uLocal_767 = 0;
  	var uLocal_768 = 0;
  	var uLocal_769 = 0;
  	var uLocal_770 = 0;
  	var uLocal_771 = 0;
  	var uLocal_772 = 0;
  	var uLocal_773 = 0;
  	var uLocal_774 = 0;
  	var uLocal_775 = 0;
  	var uLocal_776 = 0;
  	var uLocal_777 = 0;
  	var uLocal_778 = 0;
  	var uLocal_779 = 0;
  	var uLocal_780 = 0;
  	var uLocal_781 = 0;
  	var uLocal_782 = 0;
  	var uLocal_783 = 0;
  	var uLocal_784 = 0;
  	var uLocal_785 = 0;
  	var uLocal_786 = 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;
  	var uLocal_795 = 0;
  	var uLocal_796 = 0;
  	var uLocal_797 = 0;
  	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 = 10;
  	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 = 10;
  	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 = 20;
  	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 = 0;
  	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;
  	var uLocal_1018 = 0;
  	var uLocal_1019 = 0;
  	var uLocal_1020 = 0;
  	var uLocal_1021 = 0;
  	var uLocal_1022 = 0;
  	var uLocal_1023 = 0;
  	var uLocal_1024 = 0;
  	var uLocal_1025 = 0;
  	var uLocal_1026 = 0;
  	var uLocal_1027 = 0;
  	var uLocal_1028 = 0;
  	var uLocal_1029 = 0;
  	var uLocal_1030 = 0;
  	var uLocal_1031 = 0;
  	var uLocal_1032 = 20;
  	var uLocal_1033 = 0;
  	var uLocal_1034 = 0;
  	var uLocal_1035 = 0;
  	var uLocal_1036 = 0;
  	var uLocal_1037 = 0;
  	var uLocal_1038 = 0;
  	var uLocal_1039 = 0;
  	var uLocal_1040 = 0;
  	var uLocal_1041 = 0;
  	var uLocal_1042 = 0;
  	var uLocal_1043 = 0;
  	var uLocal_1044 = 0;
  	var uLocal_1045 = 0;
  	var uLocal_1046 = 0;
  	var uLocal_1047 = 0;
  	var uLocal_1048 = 0;
  	var uLocal_1049 = 0;
  	var uLocal_1050 = 0;
  	var uLocal_1051 = 0;
  	var uLocal_1052 = 0;
  	var uLocal_1053 = 0;
  	var uLocal_1054 = 0;
  	var uLocal_1055 = 0;
  	var uLocal_1056 = 0;
  	var uLocal_1057 = 0;
  	var uLocal_1058 = 0;
  	var uLocal_1059 = 0;
  	var uLocal_1060 = 0;
  	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 = 30;
  	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;
  	var uLocal_1231 = 0;
  	var uLocal_1232 = 0;
  	var uLocal_1233 = 0;
  	var uLocal_1234 = 0;
  	var uLocal_1235 = 0;
  	var uLocal_1236 = 0;
  	var uLocal_1237 = 0;
  	var uLocal_1238 = 0;
  	var uLocal_1239 = 0;
  	var uLocal_1240 = 0;
  	var uLocal_1241 = 0;
  	var uLocal_1242 = 0;
  	var uLocal_1243 = 0;
  	var uLocal_1244 = 0;
  	var uLocal_1245 = 0;
  	var uLocal_1246 = 0;
  	var uLocal_1247 = 0;
  	var uLocal_1248 = 0;
  	var uLocal_1249 = 0;
  	var uLocal_1250 = 0;
  	var uLocal_1251 = 0;
  	var uLocal_1252 = 0;
  	var uLocal_1253 = 0;
  	var uLocal_1254 = 0;
  	var uLocal_1255 = 0;
  	var uLocal_1256 = 0;
  	var uLocal_1257 = 0;
  	var uLocal_1258 = 0;
  	var uLocal_1259 = 0;
  	var uLocal_1260 = 0;
  	var uLocal_1261 = 0;
  	var uLocal_1262 = 0;
  	var uLocal_1263 = 0;
  	var uLocal_1264 = 0;
  	var uLocal_1265 = 0;
  	var uLocal_1266 = 0;
  	var uLocal_1267 = 0;
  	var uLocal_1268 = 0;
  	var uLocal_1269 = 0;
  	var uLocal_1270 = 0;
  	var uLocal_1271 = 0;
  	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 = 5;
  	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 = 7;
  	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 = 5;
  	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 = 3;
  	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 = 21;
  	var uLocal_1438 = 0;
  	var uLocal_1439 = 0;
  	var uLocal_1440 = 0;
  	var uLocal_1441 = 0;
  	var uLocal_1442 = 0;
  	var uLocal_1443 = 0;
  	var uLocal_1444 = 0;
  	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 = 0;
  	var uLocal_1456 = 0;
  	var uLocal_1457 = 0;
  	var uLocal_1458 = 0;
  	var uLocal_1459 = 0;
  	var uLocal_1460 = 0;
  	var uLocal_1461 = 0;
  	var uLocal_1462 = 0;
  	var uLocal_1463 = 0;
  	var uLocal_1464 = 0;
  	var uLocal_1465 = 0;
  	var uLocal_1466 = 0;
  	var uLocal_1467 = 0;
  	var uLocal_1468 = 0;
  	var uLocal_1469 = 0;
  	var uLocal_1470 = 0;
  	var uLocal_1471 = 0;
  	var uLocal_1472 = 0;
  	var uLocal_1473 = 0;
  	var uLocal_1474 = 0;
  	var uLocal_1475 = 0;
  	var uLocal_1476 = 0;
  	var uLocal_1477 = 0;
  	var uLocal_1478 = 0;
  	var uLocal_1479 = 0;
  	var uLocal_1480 = 0;
  	var uLocal_1481 = 0;
  	var uLocal_1482 = 0;
  	var uLocal_1483 = 0;
  	var uLocal_1484 = 0;
  	var uLocal_1485 = 0;
  	var uLocal_1486 = 0;
  	var uLocal_1487 = 0;
  	var uLocal_1488 = 0;
  	var uLocal_1489 = 0;
  	var uLocal_1490 = 0;
  	var uLocal_1491 = 0;
  	var uLocal_1492 = 0;
  	var uLocal_1493 = 0;
  	var uLocal_1494 = 0;
  	var uLocal_1495 = 0;
  	var uLocal_1496 = 0;
  	var uLocal_1497 = 0;
  	var uLocal_1498 = 0;
  	var uLocal_1499 = 0;
  	var uLocal_1500 = 0;
  	var uLocal_1501 = 0;
  	var uLocal_1502 = 0;
  	var uLocal_1503 = 0;
  	var uLocal_1504 = 0;
  	var uLocal_1505 = 0;
  	var uLocal_1506 = 0;
  	var uLocal_1507 = 0;
  	var uLocal_1508 = 0;
  	var uLocal_1509 = 0;
  	var uLocal_1510 = 0;
  	var uLocal_1511 = 0;
  	var uLocal_1512 = 0;
  	var uLocal_1513 = 0;
  	var uLocal_1514 = 0;
  	var uLocal_1515 = 0;
  	var uLocal_1516 = 0;
  	var uLocal_1517 = 0;
  	var uLocal_1518 = 0;
  	var uLocal_1519 = 0;
  	var uLocal_1520 = 0;
  	var uLocal_1521 = 0;
  	var uLocal_1522 = 0;
  	var uLocal_1523 = 0;
  	var uLocal_1524 = 0;
  	var uLocal_1525 = 0;
  	var uLocal_1526 = 0;
  	var uLocal_1527 = 0;
  	var uLocal_1528 = 0;
  	var uLocal_1529 = 0;
  	var uLocal_1530 = 0;
  	var uLocal_1531 = 0;
  	var uLocal_1532 = 0;
  	var uLocal_1533 = 0;
  	var uLocal_1534 = 0;
  	var uLocal_1535 = 0;
  	var uLocal_1536 = 0;
  	var uLocal_1537 = 0;
  	var uLocal_1538 = 0;
  	var uLocal_1539 = 0;
  	var uLocal_1540 = 0;
  	var uLocal_1541 = 0;
  	var uLocal_1542 = 0;
  	var uLocal_1543 = 0;
  	var uLocal_1544 = 0;
  	var uLocal_1545 = 0;
  	var uLocal_1546 = 0;
  	var uLocal_1547 = 0;
  	var uLocal_1548 = 0;
  	var uLocal_1549 = 0;
  	var uLocal_1550 = 0;
  	var uLocal_1551 = 0;
  	var uLocal_1552 = 0;
  	var uLocal_1553 = 0;
  	var uLocal_1554 = 0;
  	var uLocal_1555 = 0;
  	var uLocal_1556 = 0;
  	var uLocal_1557 = 0;
  	var uLocal_1558 = 0;
  	var uLocal_1559 = 0;
  	var uLocal_1560 = 0;
  	var uLocal_1561 = 0;
  	var uLocal_1562 = 10;
  	var uLocal_1563 = 0;
  	var uLocal_1564 = 0;
  	var uLocal_1565 = 0;
  	var uLocal_1566 = 0;
  	var uLocal_1567 = 0;
  	var uLocal_1568 = 0;
  	var uLocal_1569 = 0;
  	var uLocal_1570 = 0;
  	var uLocal_1571 = 0;
  	var uLocal_1572 = 0;
  	var uLocal_1573 = 0;
  	var uLocal_1574 = 0;
  	var uLocal_1575 = 0;
  	var uLocal_1576 = 0;
  	var uLocal_1577 = 0;
  	var uLocal_1578 = 0;
  	var uLocal_1579 = 0;
  	var uLocal_1580 = 0;
  	var uLocal_1581 = 0;
  	var uLocal_1582 = 0;
  	var uLocal_1583 = 0;
  	var uLocal_1584 = 0;
  	var uLocal_1585 = 0;
  	var uLocal_1586 = 0;
  	var uLocal_1587 = 0;
  	var uLocal_1588 = 0;
  	var uLocal_1589 = 0;
  	var uLocal_1590 = 0;
  	var uLocal_1591 = 0;
  	var uLocal_1592 = 0;
  	var uLocal_1593 = 0;
  	var uLocal_1594 = 0;
  	var uLocal_1595 = 0;
  	var uLocal_1596 = 0;
  	var uLocal_1597 = 0;
  	var uLocal_1598 = 0;
  	var uLocal_1599 = 0;
  	var uLocal_1600 = 0;
  	var uLocal_1601 = 0;
  	var uLocal_1602 = 0;
  	var uLocal_1603 = 0;
  	var uLocal_1604 = 0;
  	var uLocal_1605 = 0;
  	var uLocal_1606 = 0;
  	var uLocal_1607 = 0;
  	var uLocal_1608 = 0;
  	var uLocal_1609 = 0;
  	var uLocal_1610 = 0;
  	var uLocal_1611 = 0;
  	var uLocal_1612 = 0;
  	var uLocal_1613 = 5;
  	var uLocal_1614 = 0;
  	var uLocal_1615 = 0;
  	var uLocal_1616 = 0;
  	var uLocal_1617 = 0;
  	var uLocal_1618 = 0;
  	var uLocal_1619 = 0;
  	var uLocal_1620 = 0;
  	var uLocal_1621 = 0;
  	var uLocal_1622 = 0;
  	var uLocal_1623 = 0;
  	var uLocal_1624 = 0;
  	var uLocal_1625 = 0;
  	var uLocal_1626 = 0;
  	var uLocal_1627 = 0;
  	var uLocal_1628 = 0;
  	var uLocal_1629 = 0;
  	var uLocal_1630 = 0;
  	var uLocal_1631 = 0;
  	var uLocal_1632 = 0;
  	var uLocal_1633 = 0;
  	var uLocal_1634 = 0;
  	var uLocal_1635 = 0;
  	var uLocal_1636 = 0;
  	var uLocal_1637 = 0;
  	var uLocal_1638 = 0;
  	var uLocal_1639 = 5;
  	var uLocal_1640 = 0;
  	var uLocal_1641 = 0;
  	var uLocal_1642 = 0;
  	var uLocal_1643 = 0;
  	var uLocal_1644 = 0;
  	var uLocal_1645 = 0;
  	var uLocal_1646 = 0;
  	var uLocal_1647 = 0;
  	var uLocal_1648 = 0;
  	var uLocal_1649 = 0;
  	var uLocal_1650 = 0;
  	var uLocal_1651 = 0;
  	var uLocal_1652 = 0;
  	var uLocal_1653 = 0;
  	var uLocal_1654 = 0;
  	var uLocal_1655 = 0;
  	var uLocal_1656 = 0;
  	var uLocal_1657 = 0;
  	var uLocal_1658 = 0;
  	var uLocal_1659 = 0;
  	var uLocal_1660 = 0;
  	var uLocal_1661 = 0;
  	var uLocal_1662 = 0;
  	var uLocal_1663 = 0;
  	var uLocal_1664 = 0;
  	var uLocal_1665 = 0;
  	var uLocal_1666 = 0;
  	var uLocal_1667 = 0;
  	int* iLocal_1668 = NULL;
  	var uLocal_1669 = 3;
  	var uLocal_1670 = 0;
  	var uLocal_1671 = 0;
  	var uLocal_1672 = 0;
  	var uLocal_1673 = 0;
  	var uLocal_1674 = 0;
  	var uLocal_1675 = 1092616192;
  	var uLocal_1676 = 1101004800;
  	var uLocal_1677 = 0;
  	var uLocal_1678 = 0;
  	var uLocal_1679 = 0;
  	var uLocal_1680 = 0;
  	var uLocal_1681 = 0;
  	var uLocal_1682 = 0;
  	var uLocal_1683 = 0;
  	var uLocal_1684 = 0;
  	var uLocal_1685 = 3;
  	var uLocal_1686 = 0;
  	var uLocal_1687 = 0;
  	var uLocal_1688 = 0;
  	var uLocal_1689 = 0;
  	var uLocal_1690 = 0;
  	var uLocal_1691 = 0;
  	var uLocal_1692 = 0;
  	struct<8> Local_1693[5];
  	struct<32> Local_1734[20];
  	char cLocal_2375[32] = "";
  	var uLocal_2379 = 0;
  	var uLocal_2380 = 0;
  	var uLocal_2381 = 0;
  	var uLocal_2382 = 0;
  	var uLocal_2383 = 16;
  	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 = 0;
  	var uLocal_2514 = 0;
  	var uLocal_2515 = 0;
  	var uLocal_2516 = 0;
  	var uLocal_2517 = 0;
  	var uLocal_2518 = 0;
  	var uLocal_2519 = 0;
  	var uLocal_2520 = 0;
  	var uLocal_2521 = 0;
  	var uLocal_2522 = 0;
  	var uLocal_2523 = 0;
  	var uLocal_2524 = 0;
  	var uLocal_2525 = 0;
  	var uLocal_2526 = 0;
  	var uLocal_2527 = 0;
  	var uLocal_2528 = 0;
  	var uLocal_2529 = 0;
  	var uLocal_2530 = 0;
  	var uLocal_2531 = 0;
  	var uLocal_2532 = 0;
  	var uLocal_2533 = 0;
  	var uLocal_2534 = 0;
  	var uLocal_2535 = 0;
  	var uLocal_2536 = 0;
  	var uLocal_2537 = 0;
  	var uLocal_2538 = 0;
  	var uLocal_2539 = 0;
  	var uLocal_2540 = 0;
  	var uLocal_2541 = 0;
  	var uLocal_2542 = 0;
  	var uLocal_2543 = 0;
  	var uLocal_2544 = 0;
  	var uLocal_2545 = 0;
  	var uLocal_2546 = 0;
  	var uLocal_2547 = 0;
  	bool bLocal_2548 = 0;
  	int iLocal_2549 = 0;
  	int iLocal_2550 = 0;
  	int iLocal_2551 = 0;
  	int iLocal_2552 = 0;
  	int iLocal_2553 = 0;
  	int iLocal_2554 = 0;
  	char cLocal_2555[16] = "";
  	var uLocal_2557 = 0;
  	var uLocal_2558 = 0;
  	char cLocal_2559[16] = "";
  	var uLocal_2561 = 0;
  	var uLocal_2562 = 0;
  	int iLocal_2563 = 0;
  	float fLocal_2564 = 0f;
  	int iLocal_2565 = 0;
  	int iLocal_2566 = 0;
  	int iLocal_2567 = 0;
  	int iLocal_2568 = 0;
  	int iLocal_2569 = 0;
  	int iLocal_2570 = 0;
  	char cLocal_2571[16] = "";
  	var uLocal_2573 = 0;
  	var uLocal_2574 = 0;
  	int iLocal_2575 = 0;
  	int iLocal_2576 = 0;
  	bool bLocal_2577 = 0;
  	int iLocal_2578 = 0;
  	int iLocal_2579 = 0;
  	int iLocal_2580 = 0;
  	int iLocal_2581 = 0;
  	struct<2> Local_2582 = { 0, 0 } ;
  	var uLocal_2584 = 0;
  	var uLocal_2585 = 0;
  	struct<2> Local_2586 = { 0, 0 } ;
  	var uLocal_2588 = 0;
  	var uLocal_2589 = 0;
  	int iLocal_2590 = 0;
  	bool bLocal_2591 = 0;
  	int iLocal_2592 = 0;
  	int iLocal_2593 = 0;
  	int iLocal_2594 = 0;
  	bool bLocal_2595 = 0;
  	int iLocal_2596 = 0;
  	int iLocal_2597 = 0;
  	int iLocal_2598 = 0;
  	int iLocal_2599 = 0;
  	int iLocal_2600 = 0;
  	int iLocal_2601 = 0;
  	int iLocal_2602 = 0;
  	int iLocal_2603 = 0;
  #endregion
  
  void __EntryFunction__()
  {
  	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;
  	StringCopy(&Local_622, "JHP1ADS", 16);
  	StringCopy(&cLocal_626, "JEWEL_STORE_HEIST_SETUP_BUGSTAR_ALARMS", 64);
  	Local_642 = { 154.9478f, -3092.523f, 4.911984f };
  	StringCopy(&cLocal_645, "jhp1a_sec_arrive", 24);
  	iLocal_651 = 0;
  	iLocal_657 = 6;
  	iLocal_2549 = -1;
  	iLocal_2553 = -1;
  	iLocal_2554 = -1;
  	StringCopy(&cLocal_2555, "", 16);
  	StringCopy(&cLocal_2559, "", 16);
  	fLocal_2564 = 1E+08f;
  	iLocal_2567 = 1;
  	iLocal_2570 = -1;
  	StringCopy(&cLocal_2571, "", 16);
  	iLocal_2575 = -1;
  	iLocal_2576 = 1;
  	iLocal_2580 = -1;
  	iLocal_2581 = -1;
  	StringCopy(&Local_2582, "", 16);
  	StringCopy(&Local_2586, "", 16);
  	iLocal_2590 = 1;
  	iLocal_2592 = 1;
  	iLocal_2596 = -1;
  	iLocal_2598 = -1;
  	iLocal_2599 = -1;
  	if (PLAYER::HAS_FORCE_CLEANUP_OCCURRED(3))
  	{
  		func_289(6);
  	}
  	MISC::SET_MISSION_FLAG(true);
  	func_282();
  	func_241();
  	while (true)
  	{
  		RECORDING::_0x208784099002BC30("M_JewelStoreJobPrep1A", 0);
  		if (bLocal_656)
  		{
  			func_239();
  		}
  		func_236(&uLocal_658);
  		func_187();
  		if (!bLocal_654)
  		{
  			func_185();
  			func_174();
  			func_173(&Local_1693);
  		}
  		func_1();
  		SYSTEM::WAIT(0);
  	}
  }
  
  void func_1()
  {
  	switch (iLocal_651)
  	{
  		case 0:
  			if (func_25())
  			{
  				func_24(1);
  			}
  			break;
  		
  		case 1:
  			func_2();
  			break;
  	}
  }
  
  void func_2()
  {
  	int iVar0;
  	
  	if ((iLocal_2599 != -1 && ENTITY::DOES_ENTITY_EXIST(Local_579[iLocal_2599 /*8*/])) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iLocal_2599 /*8*/], false))
  	{
  		iVar0 = ENTITY::GET_ENTITY_HEALTH(Local_579[iLocal_2599 /*8*/]);
  		func_23(Local_579[iLocal_2599 /*8*/], -1);
  	}
  	if (iVar0 >= 750 || iVar0 <= 0)
  	{
  		Global_95795 = 1000;
  	}
  	else
  	{
  		Global_95795 = iVar0;
  	}
  	if (!func_22(&(Local_1693[3 /*8*/])))
  	{
  		func_21(699);
  	}
  	func_8(0);
  	if (func_7(88))
  	{
  		func_3(0, 1);
  	}
  	else
  	{
  		func_3(0, 0);
  	}
  	SCRIPT::TERMINATE_THIS_THREAD();
  }
  
  void func_3(bool bParam0, int iParam1)
  {
  	int iVar0;
  	int iVar1;
  	var uVar2;
  	
  	if (!Global_62100)
  	{
  		Global_62100 = iParam1;
  	}
  	if (bParam0)
  	{
  		if ((func_6(0) && Global_77494.f_1 == 1) && func_5(Global_77494))
  		{
  		}
  		else
  		{
  			Global_62098 = 1;
  		}
  	}
  	if (Global_112293.f_9083 || func_6(0))
  	{
  		iVar0 = func_4();
  		iVar1 = Global_90122[iVar0 /*5*/];
  		uVar2 = Global_77517.f_109[iVar1 /*4*/];
  		if (iVar0 == -1)
  		{
  			if (Global_112293.f_9083)
  			{
  			}
  			return;
  		}
  		if (MISC::IS_BIT_SET(Global_90122[iVar0 /*5*/].f_1, 4))
  		{
  			return;
  		}
  		if (MISC::IS_BIT_SET(Global_90122[iVar0 /*5*/].f_1, 5))
  		{
  			return;
  		}
  		MISC::SET_BIT(&(Global_90122[iVar0 /*5*/].f_1), 4);
  		MISC::SET_BIT(&Global_77496, 1);
  		Global_77512 = uVar2;
  		Global_77513 = MISC::GET_GAME_TIMER();
  	}
  }
  
  int func_4()
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	iVar0 = 0;
  	while (iVar0 < 7)
  	{
  		if (MISC::IS_BIT_SET(Global_90122[iVar0 /*5*/].f_1, 2))
  		{
  			return iVar0;
  		}
  		iVar0++;
  	}
  	return -1;
  }
  
  int func_5(int iParam0)
  {
  	switch (iParam0)
  	{
  		case 71:
  			return 1;
  			break;
  		
  		case 86:
  			return 1;
  			break;
  		
  		case 91:
  			return 1;
  			break;
  		
  		default:
  			return 0;
  			break;
  	}
  	return 0;
  }
  
  bool func_6(bool bParam0)
  {
  	if (!bParam0 && SCRIPT::_GET_NUMBER_OF_REFERENCES_OF_SCRIPT_WITH_NAME_HASH(joaat("benchmark")) > 0)
  	{
  		return 1;
  	}
  	return MISC::IS_BIT_SET(Global_77496, 0);
  }
  
  int func_7(int iParam0)
  {
  	if (iParam0 == 94 || iParam0 == -1)
  	{
  		return 0;
  	}
  	return Global_112293.f_9083.f_330[iParam0 /*6*/];
  }
  
  void func_8(bool bParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	HUD::CLEAR_PRINTS();
  	HUD::CLEAR_HELP(true);
  	if (bParam0)
  	{
  		PLAYER::CLEAR_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID());
  		AUDIO::TRIGGER_MUSIC_EVENT("JHP1A_FAIL");
  	}
  	else
  	{
  		PLAYER::SET_WANTED_LEVEL_MULTIPLIER(1f);
  		PLAYER::SET_PLAYER_NOISE_MULTIPLIER(PLAYER::PLAYER_ID(), 1f);
  	}
  	PLAYER::SET_MAX_WANTED_LEVEL(5);
  	PLAYER::SET_DISPATCH_COPS_FOR_PLAYER(PLAYER::PLAYER_ID(), true);
  	PED::SET_CREATE_RANDOM_COPS(true);
  	func_18(&Local_1693);
  	func_13(&iLocal_1668, 1, 0);
  	bLocal_2548 = false;
  	iLocal_2549 = -1;
  	iLocal_2593 = 0;
  	iLocal_2594 = 0;
  	bLocal_2595 = false;
  	iLocal_2596 = -1;
  	iLocal_2598 = -1;
  	iLocal_2599 = -1;
  	iLocal_2600 = 0;
  	iLocal_2601 = 0;
  	iLocal_2597 = 0;
  	if (bParam0)
  	{
  		func_11();
  		TASK::CLEAR_PED_TASKS_IMMEDIATELY(PLAYER::PLAYER_PED_ID());
  		PLAYER::CLEAR_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID());
  		MISC::CLEAR_AREA_OF_PEDS(158.78f, -3100.44f, 6.0019f, 100f, 0);
  		MISC::CLEAR_AREA_OF_COPS(158.78f, -3100.44f, 6.0019f, 100f, 0);
  		MISC::CLEAR_AREA_OF_OBJECTS(158.78f, -3100.44f, 6.0019f, 100f, 0);
  		MISC::CLEAR_AREA_OF_VEHICLES(158.78f, -3100.44f, 6.0019f, 100f, false, false, false, false, false, false);
  		MISC::CLEAR_AREA_OF_PROJECTILES(158.78f, -3100.44f, 6.0019f, 100f, 0);
  		GRAPHICS::REMOVE_DECALS_IN_RANGE(158.78f, -3100.44f, 6.0019f, 100f);
  	}
  	iVar0 = 0;
  	while (iVar0 < iLocal_620)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(iLocal_620[iVar0]))
  		{
  			if (bParam0)
  			{
  				OBJECT::DELETE_OBJECT(&(iLocal_620[iVar0]));
  			}
  			else
  			{
  				ENTITY::SET_OBJECT_AS_NO_LONGER_NEEDED(&(iLocal_620[iVar0]));
  			}
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < Local_28)
  	{
  		func_10(&(Local_28[iVar0 /*110*/]), bParam0);
  		iVar0++;
  	}
  	func_10(&Local_469, bParam0);
  	iVar0 = 0;
  	while (iVar0 < Local_579)
  	{
  		iVar1 = 0;
  		while (iVar1 < 4)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/].f_2[iVar1]))
  			{
  				if (bParam0)
  				{
  					PED::DELETE_PED(&(Local_579[iVar0 /*8*/].f_2[iVar1]));
  				}
  				else
  				{
  					ENTITY::SET_PED_AS_NO_LONGER_NEEDED(&(Local_579[iVar0 /*8*/].f_2[iVar1]));
  				}
  			}
  			iVar1++;
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]))
  		{
  			if (bParam0)
  			{
  				VEHICLE::DELETE_VEHICLE(&(Local_579[iVar0 /*8*/]));
  			}
  			else
  			{
  				ENTITY::SET_VEHICLE_AS_NO_LONGER_NEEDED(&(Local_579[iVar0 /*8*/]));
  			}
  		}
  		iVar0++;
  	}
  	if (AUDIO::IS_ALARM_PLAYING(&cLocal_626))
  	{
  		AUDIO::STOP_ALARM(&cLocal_626, bParam0);
  	}
  	if (iLocal_2603 != 0)
  	{
  		PED::REMOVE_SCENARIO_BLOCKING_AREA(iLocal_2603, false);
  	}
  	func_9();
  }
  
  void func_9()
  {
  	Global_95225 = 0;
  }
  
  void func_10(int* iParam0, bool bParam1)
  {
  	if (ENTITY::DOES_ENTITY_EXIST(*iParam0))
  	{
  		if (bParam1)
  		{
  			PED::DELETE_PED(iParam0);
  		}
  		else
  		{
  			ENTITY::SET_PED_AS_NO_LONGER_NEEDED(iParam0);
  		}
  	}
  	iParam0->f_5 = 0;
  	iParam0->f_6 = -1;
  	iParam0->f_7 = -1;
  	iParam0->f_39 = 0;
  	iParam0->f_41 = 0;
  	iParam0->f_93 = 1;
  	iParam0->f_102 = 0;
  	iParam0->f_47 = 0;
  	iParam0->f_46 = 0;
  	iParam0->f_48 = 0;
  	iParam0->f_37 = -1;
  	iParam0->f_103 = -1;
  	iParam0->f_40 = 0;
  	iParam0->f_92 = -1;
  	iParam0->f_43 = { 0f, 0f, 0f };
  	iParam0->f_88 = { 0f, 0f, 0f };
  	iParam0->f_91 = 0;
  	if (ENTITY::DOES_ENTITY_EXIST(iParam0->f_105))
  	{
  		if (ENTITY::IS_ENTITY_ATTACHED(iParam0->f_105))
  		{
  			ENTITY::DETACH_ENTITY(iParam0->f_105, true, true);
  		}
  		if (bParam1)
  		{
  			OBJECT::DELETE_OBJECT(&(iParam0->f_105));
  		}
  		else
  		{
  			ENTITY::SET_OBJECT_AS_NO_LONGER_NEEDED(&(iParam0->f_105));
  		}
  	}
  	iParam0->f_106 = -1;
  	iParam0->f_107 = 0;
  	iParam0->f_109 = 0;
  	iParam0->f_104 = 0;
  }
  
  void func_11()
  {
  	Global_19991 = 0;
  	func_12();
  }
  
  void func_12()
  {
  	AUDIO::RESTART_SCRIPTED_CONVERSATION();
  	Global_22136 = 0;
  	if (AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING())
  	{
  		AUDIO::STOP_SCRIPTED_CONVERSATION(false);
  		Global_21125 = 6;
  	}
  }
  
  void func_13(int* iParam0, bool bParam1, bool bParam2)
  {
  	int iVar0;
  	
  	if (MISC::IS_BIT_SET(iParam0->f_13, 30))
  	{
  		bParam1 = true;
  	}
  	func_17(iParam0);
  	iVar0 = 0;
  	while (iVar0 < 3)
  	{
  		if (HUD::DOES_BLIP_EXIST(iParam0->f_1[iVar0]))
  		{
  			HUD::REMOVE_BLIP(&(iParam0->f_1[iVar0]));
  		}
  		func_16(iVar0, iParam0);
  		func_15(iVar0, iParam0);
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 31)
  	{
  		if (iVar0 != 8)
  		{
  			MISC::CLEAR_BIT(&(iParam0->f_13), iVar0);
  			MISC::CLEAR_BIT(&(iParam0->f_14), iVar0);
  		}
  		iVar0++;
  	}
  	if (HUD::DOES_BLIP_EXIST(*iParam0))
  	{
  		HUD::REMOVE_BLIP(iParam0);
  	}
  	iParam0->f_6 = 0;
  	iParam0->f_12 = 0;
  	iParam0->f_15 = 0;
  	iVar0 = 0;
  	while (iVar0 < 3)
  	{
  		if (!PED::IS_PED_INJURED(iParam0->f_17[iVar0]))
  		{
  			PED::SET_PED_CAN_PLAY_AMBIENT_ANIMS(iParam0->f_17[iVar0], true);
  			PED::SET_PED_CAN_PLAY_AMBIENT_BASE_ANIMS(iParam0->f_17[iVar0], true);
  			if (bParam2)
  			{
  				PED::SET_PED_CONFIG_FLAG(iParam0->f_17[iVar0], 32, true);
  				PED::SET_PED_CONFIG_FLAG(iParam0->f_17[iVar0], 305, false);
  			}
  			PED::SET_PED_CONFIG_FLAG(iParam0->f_17[iVar0], 268, false);
  			if (bParam1)
  			{
  				if (PED::IS_PED_GROUP_MEMBER(iParam0->f_17[iVar0], func_14()) && iParam0->f_17[iVar0] != PLAYER::PLAYER_PED_ID())
  				{
  					PED::REMOVE_PED_FROM_GROUP(iParam0->f_17[iVar0]);
  				}
  			}
  			if (!MISC::IS_BIT_SET(iParam0->f_13, 29))
  			{
  				PED::SET_PED_USING_ACTION_MODE(iParam0->f_17[iVar0], false, -1, 0);
  			}
  			iParam0->f_17[iVar0] = 0;
  		}
  		iVar0++;
  	}
  	if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  	{
  		PED::SET_PED_CAN_PLAY_AMBIENT_ANIMS(PLAYER::PLAYER_PED_ID(), true);
  		PED::SET_PED_CAN_PLAY_AMBIENT_BASE_ANIMS(PLAYER::PLAYER_PED_ID(), true);
  	}
  	if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  	{
  		if (bParam2)
  		{
  			PED::SET_PED_CONFIG_FLAG(PLAYER::PLAYER_PED_ID(), 32, true);
  		}
  	}
  	iParam0->f_21 = 0;
  }
  
  int func_14()
  {
  	return PLAYER::GET_PLAYER_GROUP(PLAYER::GET_PLAYER_INDEX());
  }
  
  void func_15(int iParam0, var uParam1)
  {
  	switch (iParam0)
  	{
  		case 0:
  			MISC::CLEAR_BIT(&(uParam1->f_13), 17);
  			break;
  		
  		case 1:
  			MISC::CLEAR_BIT(&(uParam1->f_13), 18);
  			break;
  		
  		case 2:
  			MISC::CLEAR_BIT(&(uParam1->f_13), 19);
  			break;
  	}
  }
  
  void func_16(int iParam0, var uParam1)
  {
  	switch (iParam0)
  	{
  		case 0:
  			MISC::CLEAR_BIT(&(uParam1->f_13), 14);
  			break;
  		
  		case 1:
  			MISC::CLEAR_BIT(&(uParam1->f_13), 15);
  			break;
  		
  		case 2:
  			MISC::CLEAR_BIT(&(uParam1->f_13), 16);
  			break;
  	}
  }
  
  void func_17(int* iParam0)
  {
  	if (HUD::DOES_BLIP_EXIST(iParam0->f_5))
  	{
  		HUD::REMOVE_BLIP(&(iParam0->f_5));
  	}
  }
  
  void func_18(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < *uParam0)
  	{
  		func_19(uParam0[iVar0 /*8*/]);
  		iVar0++;
  	}
  }
  
  void func_19(var uParam0)
  {
  	if (!func_20(uParam0))
  	{
  		*uParam0 = 0;
  	}
  }
  
  int func_20(var uParam0)
  {
  	if (*uParam0 == 0)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_21(int iParam0)
  {
  	bool bVar0;
  	int iVar1;
  	
  	Global_62099 = 0;
  	if (!Global_62323[iParam0 /*13*/] == 3)
  	{
  		return;
  	}
  	bVar0 = false;
  	iVar1 = 0;
  	iVar1 = 0;
  	while (iVar1 < Global_74193)
  	{
  		if (Global_74194[iVar1 /*9*/] == iParam0)
  		{
  			bVar0 = true;
  			Global_74194[iVar1 /*9*/].f_1 = 1;
  			Global_74194[iVar1 /*9*/].f_2 = 0f;
  			if (Global_74194[iVar1 /*9*/].f_3 == 2)
  			{
  			}
  		}
  		iVar1++;
  	}
  	if (!bVar0)
  	{
  	}
  }
  
  int func_22(var uParam0)
  {
  	if (*uParam0 != 0 && (*uParam0 != 2 || uParam0->f_1 > 0))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_23(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	Global_62111 = iParam0;
  	iVar0 = 0;
  	while (iVar0 < Global_74193)
  	{
  		if (iParam1 == -1 || Global_74194[iVar0 /*9*/] == iParam1)
  		{
  			if (Global_74194[iVar0 /*9*/].f_6 != iParam0)
  			{
  				Global_74194[iVar0 /*9*/].f_6 = iParam0;
  				Global_74194[iVar0 /*9*/].f_7 = 1;
  				Global_74194[iVar0 /*9*/].f_8 = 0;
  			}
  		}
  		iVar0++;
  	}
  }
  
  void func_24(int iParam0)
  {
  	if (iParam0 == 2)
  	{
  	}
  	else
  	{
  		iLocal_652 = 0;
  		bLocal_653 = false;
  		iLocal_651 = iParam0;
  	}
  }
  
  int func_25()
  {
  	bool bVar0;
  	
  	if (!bLocal_653)
  	{
  		func_172(&uLocal_658, "SCRIPT\JWL_HA_RAID_STORE");
  		func_171(&uLocal_658, joaat("s_m_m_security_01"));
  		func_170(&(Local_1693[1 /*8*/]), 0, 0, 1);
  		func_170(&(Local_1693[0 /*8*/]), 0, 0, 1);
  		func_170(&(Local_1693[4 /*8*/]), 0, 0, 1);
  		func_111(0f, 0f, 0f, 0f, 1, func_165());
  		Global_95795 = 1000;
  		PLAYER::SET_WANTED_LEVEL_MULTIPLIER(0.1f);
  		func_110("JHP1A_STEAL_BSV", 7500, 1);
  		bLocal_653 = true;
  	}
  	if (bLocal_653)
  	{
  		switch (iLocal_652)
  		{
  			case 0:
  				if (func_105(1) == 0)
  				{
  					func_13(&iLocal_1668, 1, 0);
  					func_23(0, -1);
  					func_104(0, -1);
  				}
  				else if ((func_103() && ENTITY::DOES_ENTITY_EXIST(Local_579[func_102() /*8*/])) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[func_102() /*8*/], false))
  				{
  					VEHICLE::SET_RANDOM_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(0.5f);
  					if (iLocal_2599 != func_102())
  					{
  						RECORDING::_0x293220DA1B46CEBC(5f, 10f, 4);
  						func_23(Local_579[func_102() /*8*/], -1);
  						func_104(Local_579[func_102() /*8*/], -1);
  						iLocal_2599 = func_102();
  					}
  					if (func_100(&iLocal_1668, 692.8256f, -1012.544f, 21.722f, 692.9143f, -1003.556f, 21.50839f, 692.6511f, -1021.604f, 26.20675f, 9.75f, 1, Local_579[func_102() /*8*/], "", "", "", 1, 0, 1, -1))
  					{
  						iLocal_652++;
  					}
  				}
  				else if (func_99())
  				{
  					VEHICLE::SET_RANDOM_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(0.5f);
  					func_55(&iLocal_1668, 692.8256f, -1012.544f, 21.722f, 0.1f, 0.1f, 0.1f, 1, iLocal_2600, "", "", "", 1, 0, 1, -1);
  					if (ENTITY::IS_ENTITY_IN_ANGLED_AREA(Local_579[func_54() /*8*/], 692.9143f, -1003.556f, 21.50839f, 692.6511f, -1021.604f, 26.20675f, 9.75f, false, true, 0))
  					{
  						iLocal_652++;
  					}
  				}
  				else
  				{
  					func_17(&iLocal_1668);
  					func_23(0, -1);
  					func_104(0, -1);
  				}
  				break;
  			
  			case 1:
  				if (func_103())
  				{
  					if (func_52(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false), 5f, 1, 1056964608, 0, 1, 0))
  					{
  						bVar0 = true;
  					}
  				}
  				else if (func_99())
  				{
  					if (func_52(iLocal_2600, 5f, 1, 1056964608, 0, 1, 0))
  					{
  						bVar0 = true;
  					}
  				}
  				if (bVar0)
  				{
  					if (func_7(88))
  					{
  						RECORDING::_0x293220DA1B46CEBC(5f, 10f, 4);
  						ENTITY::SET_ENTITY_INVINCIBLE(PLAYER::PLAYER_PED_ID(), true);
  						func_51(1);
  						func_50(1, 0);
  						iLocal_652 = 1000;
  					}
  					else
  					{
  						RECORDING::_0x293220DA1B46CEBC(5f, 10f, 4);
  						iLocal_652++;
  					}
  					if (func_103())
  					{
  						VEHICLE::SET_VEHICLE_IS_CONSIDERED_BY_PLAYER(Local_579[iLocal_2599 /*8*/], false);
  					}
  					else if (func_99())
  					{
  						VEHICLE::SET_VEHICLE_IS_CONSIDERED_BY_PLAYER(Local_579[func_54() /*8*/], false);
  						VEHICLE::SET_VEHICLE_DISABLE_TOWING(Local_579[func_54() /*8*/], true);
  						VEHICLE::DETACH_VEHICLE_FROM_ANY_TOW_TRUCK(Local_579[func_54() /*8*/]);
  					}
  					TASK::TASK_LEAVE_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), 0, 0);
  				}
  				break;
  			
  			case 2:
  				if (!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true))
  				{
  					return 1;
  				}
  				break;
  			
  			case 1000:
  				func_50(1, 0);
  				if (!func_48())
  				{
  					func_46();
  				}
  				else
  				{
  					func_45(&uLocal_2383, 3, 0, "LESTER", 0, 1);
  					if (func_28(&uLocal_2383, 12, "JHFAUD", "JHF_P10c", 8, 1, 0, 0, 0))
  					{
  						iLocal_652++;
  					}
  				}
  				break;
  			
  			case 1001:
  				func_50(1, 0);
  				if (func_27())
  				{
  					RECORDING::_0x293220DA1B46CEBC(5f, 10f, 4);
  					iLocal_652++;
  				}
  				break;
  			
  			case 1002:
  				func_50(1, 0);
  				if (!func_27())
  				{
  					func_26();
  					return 1;
  				}
  				break;
  			}
  	}
  	return 0;
  }
  
  void func_26()
  {
  	int iVar0;
  	
  	if (!ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false))
  	{
  		ENTITY::SET_ENTITY_PROOFS(PLAYER::PLAYER_PED_ID(), false, false, false, false, false, false, false, false);
  		PED::SET_PED_CONFIG_FLAG(PLAYER::PLAYER_PED_ID(), 157, true);
  		ENTITY::SET_ENTITY_INVINCIBLE(PLAYER::PLAYER_PED_ID(), false);
  	}
  	iVar0 = 0;
  	while (iVar0 < 9)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Global_96739[iVar0]))
  		{
  			if (!ENTITY::IS_ENTITY_DEAD(Global_96739[iVar0], false))
  			{
  				ENTITY::SET_ENTITY_PROOFS(Global_96739[iVar0], false, false, false, false, false, false, false, false);
  				ENTITY::SET_ENTITY_INVINCIBLE(Global_96739[iVar0], false);
  			}
  		}
  		iVar0++;
  	}
  	if ((Global_42009 != 0 && Global_42009 != 3) && Global_42009 != 2)
  	{
  		PLAYER::SET_MAX_WANTED_LEVEL(5);
  		PLAYER::SET_WANTED_LEVEL_MULTIPLIER(1f);
  	}
  }
  
  int func_27()
  {
  	if (Global_19798.f_1 == 10 || Global_19798.f_1 == 9)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  bool func_28(var uParam0, int iParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6, int iParam7, bool bParam8)
  {
  	func_44(uParam0, iParam1, sParam2, iParam6, iParam7, 0);
  	Global_21173 = 0;
  	Global_21132 = 1;
  	Global_21139 = 0;
  	Global_21134 = 0;
  	Global_22116 = 0;
  	Global_22118 = 0;
  	Global_22122 = 0;
  	Global_21130 = 0;
  	Global_21177 = 0;
  	Global_21179 = 0;
  	if (iParam5 == 1)
  	{
  		Global_21137 = 1;
  	}
  	else
  	{
  		Global_21137 = 0;
  	}
  	Global_2621441 = 0;
  	return func_29(sParam3, iParam4, bParam8);
  }
  
  int func_29(char* sParam0, int iParam1, bool bParam2)
  {
  	Global_21126 = 0;
  	if (Global_21125 == 0 || Global_21127 == 2)
  	{
  		if (Global_21125 != 0)
  		{
  			if (iParam1 > Global_21127)
  			{
  				if (Global_21132 == 0)
  				{
  					AUDIO::STOP_SCRIPTED_CONVERSATION(false);
  					Global_19798.f_1 = 3;
  					Global_21125 = 0;
  					Global_21126 = 1;
  					Global_21178 = 0;
  					Global_21121 = 0;
  					Global_21122 = 0;
  					Global_21136 = 0;
  					Global_21135 = 0;
  					Global_19797 = 0;
  				}
  				else
  				{
  					func_43();
  					return 0;
  				}
  			}
  			else
  			{
  				return 0;
  			}
  		}
  		if (AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING())
  		{
  			return 0;
  		}
  		if (func_42(8, -1))
  		{
  			return 0;
  		}
  		Global_21201 = { Global_21195 };
  		func_41();
  		Global_20414 = { Global_20579 };
  		Global_21131 = Global_21132;
  		Global_21138 = Global_21139;
  		Global_2621442 = Global_2621441;
  		Global_21140 = { Global_21156 };
  		Global_21133 = Global_21134;
  		Global_22115 = Global_22116;
  		Global_22123 = { Global_22129 };
  		Global_22117 = Global_22118;
  		Global_22119 = Global_22120;
  		Global_22121 = Global_22122;
  		Global_20744.f_370 = Global_22114;
  		Global_20744.f_368 = Global_22112;
  		Global_20744.f_369 = Global_22113;
  		Global_21121 = Global_21122;
  		if (Global_21131)
  		{
  			MISC::CLEAR_BIT(&Global_7668, 20);
  			MISC::CLEAR_BIT(&Global_7669, 17);
  			MISC::CLEAR_BIT(&Global_7670, 0);
  			if (bParam2)
  			{
  				func_39();
  				if (Global_8473[Global_19798 /*2811*/][0 /*281*/].f_259 == 2)
  				{
  					if (iParam1 == 13)
  					{
  					}
  					else
  					{
  						return 0;
  					}
  				}
  				if (Global_19798.f_1 > 3)
  				{
  					return 0;
  				}
  			}
  			if (Global_19764 == 1)
  			{
  				return 0;
  			}
  			if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  			{
  				if (PED::IS_PED_IN_MELEE_COMBAT(PLAYER::PLAYER_PED_ID()))
  				{
  					return 0;
  				}
  				if (func_38())
  				{
  					return 0;
  				}
  				if (TASK::IS_PED_SPRINTING(PLAYER::PLAYER_PED_ID()))
  				{
  					return 0;
  				}
  				if (PED::IS_PED_RAGDOLL(PLAYER::PLAYER_PED_ID()))
  				{
  					return 0;
  				}
  				if (PED::IS_PED_IN_PARACHUTE_FREE_FALL(PLAYER::PLAYER_PED_ID()))
  				{
  					return 0;
  				}
  				if (WEAPON::GET_IS_PED_GADGET_EQUIPPED(PLAYER::PLAYER_PED_ID(), joaat("gadget_parachute")))
  				{
  					return 0;
  				}
  				if (!Global_77248)
  				{
  					if (ENTITY::IS_ENTITY_IN_WATER(PLAYER::PLAYER_PED_ID()))
  					{
  						return 0;
  					}
  					if (PLAYER::IS_PLAYER_CLIMBING(PLAYER::PLAYER_ID()))
  					{
  						return 0;
  					}
  					if (PED::IS_PED_PLANTING_BOMB(PLAYER::PLAYER_PED_ID()))
  					{
  						return 0;
  					}
  					if (PLAYER::IS_SPECIAL_ABILITY_ACTIVE(PLAYER::PLAYER_ID(), 0))
  					{
  						return 0;
  					}
  				}
  			}
  			if (func_37())
  			{
  				return 0;
  			}
  			else
  			{
  				switch (Global_19798.f_1)
  				{
  					case 7:
  						return 0;
  						break;
  					
  					case 8:
  						return 0;
  						break;
  					
  					case 9:
  						break;
  					
  					case 10:
  						break;
  					
  					default:
  						break;
  				}
  				if (MISC::IS_BIT_SET(Global_7668, 9))
  				{
  					return 0;
  				}
  			}
  			func_36();
  			Global_21135 = bParam2;
  		}
  		Global_21127 = iParam1;
  		StringCopy(&Global_20744, sParam0, 24);
  		Global_19991 = 0;
  		func_35();
  		func_30();
  		return 1;
  	}
  	if (Global_21125 == 5)
  	{
  		return 0;
  	}
  	if (iParam1 < Global_21127 || iParam1 == Global_21127)
  	{
  		return 0;
  	}
  	if (iParam1 == 2)
  	{
  	}
  	else
  	{
  		func_43();
  	}
  	return 0;
  }
  
  void func_30()
  {
  	if (!func_31())
  	{
  		return;
  	}
  	if (Global_21131)
  	{
  		MemCopy(&(Global_1710127.f_1), {Global_20744}, 4);
  		Global_1710127 = Global_6983;
  		Global_1710127.f_6 = Global_21135;
  	}
  }
  
  int func_31()
  {
  	if (!Global_262145.f_28376)
  	{
  		return 0;
  	}
  	if (!Global_77248)
  	{
  		return 0;
  	}
  	if (PLAYER::PLAYER_ID() == func_34())
  	{
  		return 0;
  	}
  	if (func_32(PLAYER::PLAYER_ID()))
  	{
  		return 0;
  	}
  	if (MISC::IS_BIT_SET(Global_1630816[PLAYER::PLAYER_ID() /*597*/].f_1, 7))
  	{
  		return 0;
  	}
  	if (NETWORK::NETWORK_IS_ACTIVITY_SESSION())
  	{
  		return 0;
  	}
  	return 1;
  }
  
  bool func_32(int iParam0)
  {
  	return func_33(iParam0, 20);
  }
  
  bool func_33(int iParam0, int iParam1)
  {
  	return MISC::IS_BIT_SET(Global_1630816[iParam0 /*597*/].f_11.f_4, iParam1);
  }
  
  int func_34()
  {
  	return -1;
  }
  
  void func_35()
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 <= 69)
  	{
  		StringCopy(&(Global_19993[iVar0 /*6*/]), "", 24);
  		iVar0++;
  	}
  	AUDIO::STOP_SCRIPTED_CONVERSATION(false);
  	Global_21125 = 1;
  }
  
  void func_36()
  {
  	Global_21178 = Global_21177;
  	Global_21172 = Global_21173;
  	Global_21219 = { Global_21207 };
  	Global_21225 = { Global_21213 };
  	Global_21180 = Global_21179;
  	Global_21249 = { Global_21231 };
  	Global_21255 = { Global_21237 };
  	Global_21261 = { Global_21243 };
  	Global_21267 = { Global_21273 };
  	Global_6983 = Global_6984;
  	Global_6985 = Global_6986;
  	Global_21136 = Global_21137;
  	Global_21138 = Global_21139;
  	Global_21140 = { Global_21156 };
  	Global_21129 = Global_21130;
  	Global_22141 = 0;
  	Global_21174 = 0;
  	Global_21175 = 0;
  	MISC::CLEAR_BIT(&Global_7669, 16);
  }
  
  int func_37()
  {
  	if (Global_19798.f_1 == 1 || Global_19798.f_1 == 0)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_38()
  {
  	int iVar0;
  	int iVar1;
  	
  	if (Global_77248)
  	{
  		iVar0 = 0;
  		WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), &iVar1, true);
  		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 1;
  		}
  		else
  		{
  			return 0;
  		}
  	}
  	if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  	{
  		if (PED::GET_PED_CONFIG_FLAG(PLAYER::PLAYER_PED_ID(), 78, true))
  		{
  			return 1;
  		}
  		else
  		{
  			return 0;
  		}
  	}
  	return 1;
  }
  
  void func_39()
  {
  	if (func_40(14))
  	{
  		if (!ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false))
  		{
  			if (ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()) == Global_112293.f_28048[0 /*29*/])
  			{
  				Global_19798 = 0;
  			}
  			else if (ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()) == Global_112293.f_28048[1 /*29*/])
  			{
  				Global_19798 = 1;
  			}
  			else if (ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()) == Global_112293.f_28048[2 /*29*/])
  			{
  				Global_19798 = 2;
  			}
  			else
  			{
  				Global_19798 = 0;
  			}
  		}
  	}
  	else
  	{
  		Global_19798 = func_165();
  		if (Global_19798 == 145)
  		{
  			Global_19798 = 3;
  		}
  		if (Global_77248)
  		{
  			Global_19798 = 3;
  		}
  		if (Global_19798 > 3)
  		{
  			Global_19798 = 3;
  		}
  	}
  }
  
  bool func_40(int iParam0)
  {
  	return Global_42009 == iParam0;
  }
  
  void func_41()
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 <= 15)
  	{
  		Global_20414[iVar0 /*10*/] = 0;
  		StringCopy(&(Global_20414[iVar0 /*10*/].f_1), "", 24);
  		Global_20414[iVar0 /*10*/].f_7 = 0;
  		Global_20414[iVar0 /*10*/].f_8 = 0;
  		iVar0++;
  	}
  	Global_20414.f_161 = -99;
  	Global_20414.f_162 = { 0f, 0f, 0f };
  }
  
  bool func_42(int iParam0, int iParam1)
  {
  	switch (iParam0)
  	{
  		case 5:
  			if (iParam1 > -1)
  			{
  				return Global_1379108.f_203[iParam1];
  			}
  			break;
  	}
  	return MISC::IS_BIT_SET(Global_1379108.f_1048, iParam0);
  }
  
  void func_43()
  {
  	AUDIO::RESTART_SCRIPTED_CONVERSATION();
  	Global_22136 = 0;
  	if ((AUDIO::IS_MOBILE_PHONE_CALL_ONGOING() || Global_19798.f_1 == 9) || Global_19797 == 1)
  	{
  		AUDIO::STOP_SCRIPTED_CONVERSATION(false);
  		Global_21125 = 6;
  		Global_19798.f_1 = 3;
  		return;
  	}
  	if (AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING())
  	{
  		AUDIO::STOP_SCRIPTED_CONVERSATION(true);
  		Global_21125 = 6;
  		return;
  	}
  }
  
  void func_44(var uParam0, int iParam1, char* sParam2, int iParam3, int iParam4, int iParam5)
  {
  	Global_20579 = { *uParam0 };
  	Global_6984 = iParam1;
  	StringCopy(&Global_21195, sParam2, 24);
  	Global_22114 = iParam5;
  	if (iParam3 == 0)
  	{
  		Global_22112 = 1;
  		Global_22110 = 0;
  	}
  	else
  	{
  		Global_22112 = 0;
  		Global_22110 = 1;
  	}
  	if (iParam4 == 0)
  	{
  		Global_22113 = 1;
  		Global_22111 = 0;
  	}
  	else
  	{
  		Global_22113 = 0;
  		Global_22111 = 1;
  	}
  }
  
  void func_45(var uParam0, int iParam1, int iParam2, char* sParam3, int iParam4, int iParam5)
  {
  	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_77248)
  	{
  		if (!PED::IS_PED_INJURED(iParam2))
  		{
  			if ((uParam0[iParam1 /*10*/])->f_8 == 0)
  			{
  				PED::SET_PED_CAN_PLAY_AMBIENT_ANIMS(iParam2, false);
  			}
  			else
  			{
  				PED::SET_PED_CAN_PLAY_AMBIENT_ANIMS(iParam2, true);
  			}
  		}
  		if (!PED::IS_PED_INJURED(iParam2))
  		{
  			if ((uParam0[iParam1 /*10*/])->f_9 == 0)
  			{
  				PED::SET_PED_CAN_USE_AUTO_CONVERSATION_LOOKAT(iParam2, false);
  			}
  			else
  			{
  				PED::SET_PED_CAN_USE_AUTO_CONVERSATION_LOOKAT(iParam2, true);
  			}
  		}
  	}
  }
  
  void func_46()
  {
  	Global_19991 = 0;
  	func_47();
  }
  
  void func_47()
  {
  	if (AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING())
  	{
  		AUDIO::RESTART_SCRIPTED_CONVERSATION();
  		Global_22136 = 0;
  		AUDIO::STOP_SCRIPTED_CONVERSATION(true);
  		Global_21125 = 6;
  		return;
  	}
  }
  
  int func_48()
  {
  	if (func_49())
  	{
  		return 0;
  	}
  	if (HUD::IS_SUBTITLE_PREFERENCE_SWITCHED_ON())
  	{
  		if (HUD::IS_MESSAGE_BEING_DISPLAYED())
  		{
  			return 0;
  		}
  	}
  	return 1;
  }
  
  int func_49()
  {
  	if (Global_21125 != 0 || AUDIO::IS_SCRIPTED_CONVERSATION_ONGOING())
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_50(bool bParam0, bool bParam1)
  {
  	if (!bParam1)
  	{
  		PAD::DISABLE_CONTROL_ACTION(0, 21, true);
  	}
  	PAD::DISABLE_CONTROL_ACTION(0, 25, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 24, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 257, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 141, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 140, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 22, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 44, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 23, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 47, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 36, true);
  	if (bParam0)
  	{
  		PAD::DISABLE_CONTROL_ACTION(0, 37, true);
  	}
  	if (!ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false))
  	{
  		if (bParam1)
  		{
  			PED::SET_PED_MAX_MOVE_BLEND_RATIO(PLAYER::PLAYER_PED_ID(), 2f);
  		}
  		else
  		{
  			PED::SET_PED_MAX_MOVE_BLEND_RATIO(PLAYER::PLAYER_PED_ID(), 1f);
  		}
  		PED::SET_PED_RESET_FLAG(PLAYER::PLAYER_PED_ID(), 102, true);
  	}
  	if (PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0))
  	{
  		PLAYER::CLEAR_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID());
  	}
  }
  
  void func_51(bool bParam0)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false))
  	{
  		ENTITY::SET_ENTITY_PROOFS(PLAYER::PLAYER_PED_ID(), true, true, true, true, true, false, false, false);
  		PED::SET_PED_CONFIG_FLAG(PLAYER::PLAYER_PED_ID(), 157, false);
  		ENTITY::SET_ENTITY_INVINCIBLE(PLAYER::PLAYER_PED_ID(), true);
  		PED::SET_PED_STEALTH_MOVEMENT(PLAYER::PLAYER_PED_ID(), false, 0);
  		if (bParam0)
  		{
  			WEAPON::SET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), joaat("weapon_unarmed"), false);
  		}
  		PED::REMOVE_PED_HELMET(PLAYER::PLAYER_PED_ID(), false);
  	}
  	if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  	{
  		PLAYER::CLEAR_PLAYER_WANTED_LEVEL(PLAYER::PLAYER_ID());
  	}
  	PLAYER::SET_MAX_WANTED_LEVEL(0);
  	PLAYER::SET_WANTED_LEVEL_MULTIPLIER(0f);
  }
  
  int func_52(int iParam0, float fParam1, int iParam2, float fParam3, bool bParam4, bool bParam5, bool bParam6)
  {
  	PAD::DISABLE_CONTROL_ACTION(0, 71, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 72, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 76, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 73, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 59, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 60, true);
  	if (bParam5)
  	{
  		PAD::DISABLE_CONTROL_ACTION(0, 75, true);
  	}
  	PAD::DISABLE_CONTROL_ACTION(0, 80, true);
  	if (!bParam6)
  	{
  		PAD::DISABLE_CONTROL_ACTION(0, 69, true);
  		PAD::DISABLE_CONTROL_ACTION(0, 70, true);
  		PAD::DISABLE_CONTROL_ACTION(0, 68, true);
  	}
  	PAD::DISABLE_CONTROL_ACTION(0, 74, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 86, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 81, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 82, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 138, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 136, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 114, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 107, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 110, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 89, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 89, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 87, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 88, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 113, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 115, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 116, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 117, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 118, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 119, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 352, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 131, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 132, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 123, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 126, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 129, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 130, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 133, true);
  	PAD::DISABLE_CONTROL_ACTION(0, 134, true);
  	CAM::_0x17FCA7199A530203();
  	func_53(iParam0);
  	if ((MISC::GET_GAME_TIMER() - Global_29) > 500)
  	{
  		VEHICLE::BRING_VEHICLE_TO_HALT(iParam0, fParam1, iParam2, bParam4);
  	}
  	Global_29 = MISC::GET_GAME_TIMER();
  	if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		if (MISC::ABSF(ENTITY::GET_ENTITY_SPEED(iParam0)) <= fParam3)
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_53(int iParam0)
  {
  	if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		if (VEHICLE::_GET_HAS_ROCKET_BOOST(iParam0))
  		{
  			if (VEHICLE::_IS_VEHICLE_ROCKET_BOOST_ACTIVE(iParam0))
  			{
  				VEHICLE::_SET_VEHICLE_ROCKET_BOOST_ACTIVE(iParam0, false);
  			}
  		}
  	}
  }
  
  int func_54()
  {
  	int iVar0;
  	
  	if (func_99())
  	{
  		iVar0 = 0;
  		while (iVar0 <= 2)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar0 /*8*/], false))
  			{
  				if (VEHICLE::IS_VEHICLE_ATTACHED_TO_TOW_TRUCK(iLocal_2600, Local_579[iVar0 /*8*/]))
  				{
  					return iVar0;
  				}
  			}
  			iVar0++;
  		}
  	}
  	return -1;
  }
  
  int func_55(int* iParam0, struct<3> Param1, struct<3> Param4, bool bParam7, int iParam8, char* sParam9, char* sParam10, char* sParam11, bool bParam12, int iParam13, bool bParam14, int iParam15)
  {
  	return func_56(iParam0, Param1, Param4, func_98(), func_98(), bParam7, 5, 0, 0, 0, iParam8, sParam9, func_97(), func_97(), func_97(), func_97(), sParam10, 0, bParam12, sParam11, 0, iParam13, bParam14, iParam15, 0, 0, 0, 1, 1065353216);
  }
  
  int func_56(int* iParam0, struct<3> Param1, struct<3> Param4, struct<3> Param7, struct<3> Param10, bool bParam13, int iParam14, int iParam15, int iParam16, int iParam17, int iParam18, char* sParam19, char* sParam20, char* sParam21, char* sParam22, char* sParam23, char* sParam24, bool bParam25, bool bParam26, char* sParam27, bool bParam28, int iParam29, bool bParam30, int iParam31, int iParam32, int iParam33, int iParam34, bool bParam35, float fParam36)
  {
  	int iVar0;
  	bool bVar1;
  	int iVar2;
  	struct<3> Var3;
  	bool bVar6;
  	int iVar7;
  	int iVar8;
  	int iVar9;
  	
  	Var3 = { Param1 + Vector(1f, 0f, 0f) };
  	iParam0->f_17[0] = iParam15;
  	iParam0->f_17[1] = iParam16;
  	iParam0->f_17[2] = iParam17;
  	iParam0->f_16 = iParam15;
  	func_96(iParam0);
  	func_95(iParam0);
  	func_94();
  	if (func_78(iParam0, iParam0->f_17[0], iParam0->f_17[1], iParam0->f_17[2], sParam20, sParam21, sParam22, sParam23, iParam0->f_8, bParam25, iParam18, 0, 0, iParam32, iParam33, iParam34, iParam14, bParam26))
  	{
  		func_77(sParam20);
  		func_77(sParam21);
  		func_77(sParam22);
  		func_77(sParam23);
  		if (CAM::IS_SCREEN_FADED_IN())
  		{
  			bVar1 = false;
  			if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam18, false))
  			{
  				if (PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iParam18, false))
  				{
  					MISC::SET_BIT(&(iParam0->f_13), 3);
  					if (!MISC::IS_BIT_SET(iParam0->f_13, 9))
  					{
  						MISC::CLEAR_BIT(&(iParam0->f_13), 4);
  					}
  					if (MISC::IS_BIT_SET(iParam0->f_13, 23))
  					{
  						MISC::CLEAR_BIT(&(iParam0->f_13), 23);
  					}
  					MISC::SET_BIT(&(iParam0->f_13), 9);
  					bVar1 = true;
  				}
  			}
  			else if (iParam14 == 4 || iParam14 == 5)
  			{
  				if (func_75(iParam0, iParam29))
  				{
  					MISC::SET_BIT(&(iParam0->f_13), 3);
  					if (!MISC::IS_BIT_SET(iParam0->f_13, 9))
  					{
  						MISC::CLEAR_BIT(&(iParam0->f_13), 4);
  					}
  					MISC::SET_BIT(&(iParam0->f_13), 9);
  					bVar1 = true;
  				}
  			}
  			else
  			{
  				bVar1 = true;
  			}
  			if (bVar1)
  			{
  				func_77(sParam24);
  				func_77(sParam27);
  				func_77("MORE_SEATS");
  				if (bParam26 && PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0))
  				{
  					if (HUD::DOES_BLIP_EXIST(iParam0->f_5))
  					{
  						HUD::REMOVE_BLIP(&(iParam0->f_5));
  						func_77(sParam19);
  					}
  					if (HUD::DOES_BLIP_EXIST(*iParam0))
  					{
  						HUD::REMOVE_BLIP(iParam0);
  					}
  					if ((!func_72(iParam0, 1) && !func_71(iParam0)) && !MISC::IS_BIT_SET(iParam0->f_13, 0))
  					{
  						if (bParam30)
  						{
  							func_70(iParam0, "LOSE_WANTED", 0);
  							if (!PED::IS_PED_INJURED(iParam0->f_17[0]))
  							{
  								func_68(iParam0->f_17[0], "VEHICLE_POLICE_PURSUIT", 3);
  							}
  						}
  						MISC::SET_BIT(&(iParam0->f_13), 0);
  						MISC::CLEAR_BIT(&(iParam0->f_13), 1);
  					}
  				}
  				else
  				{
  					if (MISC::IS_BIT_SET(iParam0->f_13, 0))
  					{
  						func_77("LOSE_WANTED");
  						MISC::CLEAR_BIT(&(iParam0->f_13), 0);
  						MISC::SET_BIT(&(iParam0->f_13), 1);
  					}
  					if (MISC::IS_BIT_SET(iParam0->f_13, 1))
  					{
  						if (!func_72(iParam0, 1))
  						{
  							if (!PED::IS_PED_INJURED(iParam0->f_17[0]))
  							{
  								func_68(iParam0->f_17[0], "LOSE_WANTED_LEVEL", 3);
  							}
  							MISC::CLEAR_BIT(&(iParam0->f_13), 1);
  						}
  					}
  					if (!HUD::DOES_BLIP_EXIST(iParam0->f_5))
  					{
  						if (HUD::DOES_BLIP_EXIST(*iParam0))
  						{
  							HUD::REMOVE_BLIP(iParam0);
  						}
  						iParam0->f_5 = func_67(Var3, 0);
  						if (!iParam31 == -1)
  						{
  							HUD::SET_BLIP_SPRITE(iParam0->f_5, iParam31);
  						}
  						if (bParam35)
  						{
  							func_66(iParam0->f_5, iParam0);
  						}
  					}
  					else if (!func_65(Var3, HUD::GET_BLIP_COORDS(iParam0->f_5), 0.1f, 0))
  					{
  						HUD::SET_BLIP_COORDS(iParam0->f_5, Var3);
  						if (bParam35)
  						{
  							func_66(iParam0->f_5, iParam0);
  						}
  					}
  					if (!func_72(iParam0, 2))
  					{
  						if (!MISC::IS_BIT_SET(iParam0->f_13, 2))
  						{
  							func_70(iParam0, sParam19, 0);
  							MISC::SET_BIT(&(iParam0->f_13), 2);
  						}
  					}
  					if (iParam14 == 4 || iParam14 == 5)
  					{
  						if (MISC::IS_BIT_SET(iParam0->f_13, 13))
  						{
  							bParam13 = false;
  						}
  					}
  					bVar1 = false;
  					bVar6 = false;
  					iVar7 = 0;
  					if ((iParam14 == 1 || iParam14 == 3) || iParam14 == 5)
  					{
  						bVar6 = true;
  					}
  					if (iParam14 == 2 || iParam14 == 3)
  					{
  						iVar7 = 1;
  					}
  					else if (iParam14 == 4 || iParam14 == 5)
  					{
  						iVar7 = 2;
  					}
  					if (bParam28)
  					{
  						ENTITY::IS_ENTITY_AT_COORD(PLAYER::PLAYER_PED_ID(), Param1, Param4, bParam13, bVar6, iVar7);
  						if (ENTITY::IS_ENTITY_IN_ANGLED_AREA(PLAYER::PLAYER_PED_ID(), Param7, Param10, fParam36, false, bVar6, iVar7))
  						{
  							bVar1 = true;
  						}
  					}
  					else if (ENTITY::IS_ENTITY_AT_COORD(PLAYER::PLAYER_PED_ID(), Param1, Param4, bParam13, bVar6, iVar7))
  					{
  						bVar1 = true;
  					}
  					if (bVar1)
  					{
  						bVar1 = true;
  						iVar2 = 0;
  						while (iVar2 < 3)
  						{
  							if (!PED::IS_PED_INJURED(iParam0->f_17[iVar2]))
  							{
  								if (iParam14 == 4 || iParam14 == 5)
  								{
  									iVar0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  									if (!PED::IS_PED_IN_VEHICLE(iParam0->f_17[iVar2], iVar0, false))
  									{
  										bVar1 = false;
  									}
  								}
  								else if (iParam18 != 0)
  								{
  									if (!PED::IS_PED_IN_VEHICLE(iParam0->f_17[iVar2], iParam18, false))
  									{
  										bVar1 = false;
  									}
  								}
  								else if (!PED::IS_PED_GROUP_MEMBER(iParam0->f_17[iVar2], func_14()) || !func_63(iParam0->f_17[iVar2], 1))
  								{
  									bVar1 = false;
  								}
  							}
  							iVar2++;
  						}
  						if (bVar1)
  						{
  							if (func_60(iParam0))
  							{
  								func_77(sParam19);
  								func_77(sParam24);
  								func_77(sParam20);
  								func_77(sParam21);
  								func_77(sParam22);
  								func_77(sParam23);
  								func_77("LOSE_WANTED");
  								func_77("MORE_SEATS");
  								func_77(sParam27);
  								func_13(iParam0, 1, 0);
  								return 1;
  							}
  						}
  					}
  				}
  			}
  			else if (ENTITY::DOES_ENTITY_EXIST(iParam18))
  			{
  				if ((bParam26 && PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0)) && (!MISC::IS_BIT_SET(iParam0->f_13, 9) && !MISC::IS_BIT_SET(iParam0->f_13, 22)))
  				{
  					func_77(sParam24);
  					func_77(sParam27);
  					if (HUD::DOES_BLIP_EXIST(iParam0->f_5) || HUD::DOES_BLIP_EXIST(*iParam0))
  					{
  						HUD::REMOVE_BLIP(&(iParam0->f_5));
  						HUD::REMOVE_BLIP(iParam0);
  						func_77(sParam19);
  					}
  					if ((!func_72(iParam0, 1) && !func_71(iParam0)) && !MISC::IS_BIT_SET(iParam0->f_13, 0))
  					{
  						if (bParam30)
  						{
  							func_70(iParam0, "LOSE_WANTED", 0);
  							if (!PED::IS_PED_INJURED(iParam0->f_17[0]))
  							{
  								func_68(iParam0->f_17[0], "VEHICLE_POLICE_PURSUIT", 3);
  							}
  						}
  						MISC::SET_BIT(&(iParam0->f_13), 0);
  						MISC::CLEAR_BIT(&(iParam0->f_13), 1);
  					}
  				}
  				else
  				{
  					if (MISC::IS_BIT_SET(iParam0->f_13, 0))
  					{
  						func_77("LOSE_WANTED");
  						MISC::CLEAR_BIT(&(iParam0->f_13), 0);
  						MISC::SET_BIT(&(iParam0->f_13), 1);
  					}
  					if (MISC::IS_BIT_SET(iParam0->f_13, 1))
  					{
  						if (!func_72(iParam0, 1))
  						{
  							if (!PED::IS_PED_INJURED(iParam0->f_17[0]))
  							{
  								func_68(iParam0->f_17[0], "LOSE_WANTED_LEVEL", 3);
  							}
  							MISC::CLEAR_BIT(&(iParam0->f_13), 1);
  						}
  					}
  					if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam18, false))
  					{
  						if (!HUD::DOES_BLIP_EXIST(*iParam0))
  						{
  							if (HUD::DOES_BLIP_EXIST(iParam0->f_5))
  							{
  								HUD::REMOVE_BLIP(&(iParam0->f_5));
  								func_77(sParam19);
  							}
  							*iParam0 = func_57(iParam18, 0, 0);
  							HUD::SET_BLIP_DISPLAY(*iParam0, 2);
  							if (!MISC::IS_BIT_SET(iParam0->f_13, 4))
  							{
  								func_66(*iParam0, iParam0);
  							}
  						}
  						if (!func_72(iParam0, 2))
  						{
  							if (!MISC::IS_BIT_SET(iParam0->f_13, 3))
  							{
  								func_70(iParam0, sParam24, 0);
  								MISC::SET_BIT(&(iParam0->f_13), 3);
  								MISC::CLEAR_BIT(&(iParam0->f_13), 4);
  							}
  							else if (MISC::IS_BIT_SET(iParam0->f_13, 9))
  							{
  								if (!MISC::IS_STRING_NULL(sParam27))
  								{
  									if (!MISC::IS_BIT_SET(iParam0->f_13, 4))
  									{
  										func_70(iParam0, sParam27, 0);
  										MISC::SET_BIT(&(iParam0->f_13), 4);
  									}
  								}
  								else if (!MISC::IS_BIT_SET(iParam0->f_13, 4))
  								{
  									func_70(iParam0, sParam24, 0);
  									MISC::SET_BIT(&(iParam0->f_13), 4);
  								}
  								if (!MISC::IS_BIT_SET(iParam0->f_13, 23))
  								{
  									if (!PED::IS_PED_INJURED(iParam0->f_17[0]))
  									{
  										func_68(iParam0->f_17[0], "GET_IN_CAR", 3);
  									}
  									MISC::SET_BIT(&(iParam0->f_13), 23);
  								}
  							}
  						}
  					}
  				}
  			}
  			else
  			{
  				if (HUD::DOES_BLIP_EXIST(iParam0->f_5))
  				{
  					HUD::REMOVE_BLIP(&(iParam0->f_5));
  					func_77(sParam19);
  				}
  				if (iParam14 == 4 || iParam14 == 5)
  				{
  					if (iParam29 > 0)
  					{
  						if (!func_72(iParam0, 2))
  						{
  							if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()))
  							{
  								if (!MISC::IS_BIT_SET(iParam0->f_13, 13))
  								{
  									iVar8 = 0;
  									iVar9 = 0;
  									iVar2 = 0;
  									while (iVar2 < 3)
  									{
  										if (!PED::IS_PED_INJURED(iParam0->f_17[iVar2]))
  										{
  											iVar8++;
  										}
  										iVar2++;
  									}
  									iVar9 = MISC::GET_RANDOM_INT_IN_RANGE(0, iVar8);
  									if (!PED::IS_PED_INJURED(iParam0->f_17[iVar9]))
  									{
  										func_68(iParam0->f_17[iVar9], "NEED_A_BIGGER_VEHICLE", 3);
  									}
  									func_70(iParam0, "MORE_SEATS", 0);
  									MISC::SET_BIT(&(iParam0->f_13), 13);
  								}
  							}
  							else if (!MISC::IS_BIT_SET(iParam0->f_13, 3))
  							{
  								func_70(iParam0, sParam24, 0);
  								MISC::SET_BIT(&(iParam0->f_13), 3);
  								MISC::CLEAR_BIT(&(iParam0->f_13), 4);
  							}
  							else if (!MISC::IS_BIT_SET(iParam0->f_13, 4))
  							{
  								if (MISC::IS_BIT_SET(iParam0->f_13, 9))
  								{
  									func_70(iParam0, sParam27, 0);
  									MISC::SET_BIT(&(iParam0->f_13), 4);
  								}
  							}
  						}
  					}
  					else if (!func_72(iParam0, 2))
  					{
  						if (!MISC::IS_BIT_SET(iParam0->f_13, 3))
  						{
  							func_70(iParam0, sParam24, 0);
  							MISC::SET_BIT(&(iParam0->f_13), 3);
  							MISC::CLEAR_BIT(&(iParam0->f_13), 4);
  						}
  						else if (MISC::IS_BIT_SET(iParam0->f_13, 9))
  						{
  							if (!MISC::IS_STRING_NULL(sParam27))
  							{
  								if (!MISC::IS_BIT_SET(iParam0->f_13, 4))
  								{
  									func_70(iParam0, sParam27, 0);
  									MISC::SET_BIT(&(iParam0->f_13), 4);
  								}
  							}
  							else if (!MISC::IS_BIT_SET(iParam0->f_13, 4))
  							{
  								func_70(iParam0, sParam24, 0);
  								MISC::SET_BIT(&(iParam0->f_13), 4);
  							}
  						}
  					}
  				}
  			}
  		}
  	}
  	else
  	{
  		if (MISC::IS_BIT_SET(iParam0->f_13, 0))
  		{
  			MISC::CLEAR_BIT(&(iParam0->f_13), 0);
  		}
  		func_77(sParam19);
  		func_77(sParam24);
  		func_77(sParam27);
  		func_77(sParam24);
  		func_77("LOSE_WANTED");
  		if (HUD::DOES_BLIP_EXIST(iParam0->f_5))
  		{
  			HUD::REMOVE_BLIP(&(iParam0->f_5));
  		}
  		if (HUD::DOES_BLIP_EXIST(*iParam0))
  		{
  			HUD::REMOVE_BLIP(iParam0);
  		}
  	}
  	MISC::CLEAR_BIT(&(iParam0->f_13), 11);
  	MISC::CLEAR_BIT(&(iParam0->f_13), 12);
  	return 0;
  }
  
  int func_57(int iParam0, bool bParam1, bool bParam2)
  {
  	return func_58(iParam0, !bParam1, bParam2);
  }
  
  int func_58(int iParam0, bool bParam1, bool bParam2)
  {
  	int iVar0;
  	
  	if (!ENTITY::DOES_ENTITY_EXIST(iParam0))
  	{
  		return 0;
  	}
  	iVar0 = HUD::ADD_BLIP_FOR_ENTITY(iParam0);
  	if (ENTITY::IS_ENTITY_A_VEHICLE(iParam0))
  	{
  		HUD::SET_BLIP_SCALE(iVar0, func_59(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 1f, 1f));
  		if (!bParam2)
  		{
  			HUD::SET_BLIP_AS_FRIENDLY(iVar0, bParam1);
  		}
  		else
  		{
  			HUD::SET_BLIP_COLOUR(iVar0, 2);
  		}
  	}
  	else if (ENTITY::IS_ENTITY_A_PED(iParam0))
  	{
  		HUD::SET_BLIP_SCALE(iVar0, func_59(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 0.7f, 0.7f));
  		HUD::SET_BLIP_AS_FRIENDLY(iVar0, bParam1);
  	}
  	else if (ENTITY::IS_ENTITY_AN_OBJECT(iParam0))
  	{
  		HUD::SET_BLIP_SCALE(iVar0, func_59(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 0.7f, 0.7f));
  	}
  	return iVar0;
  }
  
  float func_59(bool bParam0, float fParam1, float fParam2)
  {
  	if (bParam0)
  	{
  		return fParam1;
  	}
  	return fParam2;
  }
  
  int func_60(int* iParam0)
  {
  	if (MISC::IS_BIT_SET(iParam0->f_13, 12))
  	{
  		if (func_62(PLAYER::PLAYER_PED_ID()))
  		{
  			if (func_61(1, 0, 1) || MISC::IS_BIT_SET(iParam0->f_13, 7))
  			{
  				return 1;
  			}
  		}
  	}
  	else if (func_61(1, 0, 1) || MISC::IS_BIT_SET(iParam0->f_13, 7))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_61(bool bParam0, bool bParam1, bool bParam2)
  {
  	int iVar0;
  	
  	if (MISC::IS_MINIGAME_IN_PROGRESS())
  	{
  		return 0;
  	}
  	if (bParam0)
  	{
  		if (ENTITY::IS_ENTITY_DEAD(PLAYER::PLAYER_PED_ID(), false))
  		{
  			return 0;
  		}
  	}
  	iVar0 = 0;
  	if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  	{
  		if (!PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()))
  		{
  			return 0;
  		}
  		iVar0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  		if (bParam0)
  		{
  			if (ENTITY::IS_ENTITY_DEAD(iVar0, false))
  			{
  				return 0;
  			}
  		}
  		if (bParam2)
  		{
  			if (!ENTITY::IS_ENTITY_DEAD(iVar0, false))
  			{
  				if (VEHICLE::GET_PED_IN_VEHICLE_SEAT(iVar0, -1, false) != PLAYER::PLAYER_PED_ID())
  				{
  					return 0;
  				}
  			}
  		}
  		if (!ENTITY::IS_ENTITY_DEAD(iVar0, false))
  		{
  			if (ENTITY::GET_ENTITY_UPRIGHT_VALUE(iVar0) < 0.95f || ENTITY::GET_ENTITY_UPRIGHT_VALUE(iVar0) > 1.011f)
  			{
  				return 0;
  			}
  		}
  	}
  	else if (bParam1)
  	{
  		return 0;
  	}
  	if (!PLAYER::IS_PLAYER_READY_FOR_CUTSCENE(PLAYER::PLAYER_ID()))
  	{
  		return 0;
  	}
  	if (!PLAYER::CAN_PLAYER_START_MISSION(PLAYER::PLAYER_ID()))
  	{
  		return 0;
  	}
  	return 1;
  }
  
  int func_62(int iParam0)
  {
  	float fVar0;
  	
  	if (!PED::IS_PED_INJURED(iParam0))
  	{
  		fVar0 = ENTITY::GET_ENTITY_SPEED(iParam0);
  		if (fVar0 > -0.5f && fVar0 < 0.5f)
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_63(int iParam0, int iParam1)
  {
  	if (!PED::IS_PED_INJURED(iParam0))
  	{
  		if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()) && iParam1)
  		{
  			if (func_64(PLAYER::PLAYER_PED_ID(), iParam0))
  			{
  				PED::SET_GROUP_SEPARATION_RANGE(func_14(), 50f);
  				return 1;
  			}
  		}
  		else if (PED::IS_PED_GROUP_MEMBER(iParam0, func_14()))
  		{
  			PED::SET_GROUP_SEPARATION_RANGE(func_14(), 50f);
  			return 1;
  		}
  	}
  	else
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_64(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	if (!PED::IS_PED_INJURED(iParam0))
  	{
  		if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(iParam0))
  		{
  			iVar0 = PED::GET_VEHICLE_PED_IS_IN(iParam0, false);
  			if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false))
  			{
  				if (!PED::IS_PED_INJURED(iParam1))
  				{
  					if (PED::IS_PED_SITTING_IN_VEHICLE(iParam1, iVar0))
  					{
  						return 1;
  					}
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  int func_65(struct<3> Param0, struct<3> Param3, float fParam6, bool bParam7)
  {
  	if (fParam6 < 0f)
  	{
  		fParam6 = 0f;
  	}
  	if (!bParam7)
  	{
  		if (MISC::ABSF((Param0.x - Param3.x)) <= fParam6)
  		{
  			if (MISC::ABSF((Param0.f_1 - Param3.f_1)) <= fParam6)
  			{
  				if (MISC::ABSF((Param0.f_2 - Param3.f_2)) <= fParam6)
  				{
  					return 1;
  				}
  			}
  		}
  	}
  	else if (MISC::ABSF((Param0.x - Param3.x)) <= fParam6)
  	{
  		if (MISC::ABSF((Param0.f_1 - Param3.f_1)) <= fParam6)
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_66(int iParam0, int* iParam1)
  {
  	if (HUD::DOES_BLIP_EXIST(iParam0))
  	{
  		if (HUD::DOES_BLIP_EXIST(iParam1->f_6))
  		{
  			HUD::SET_BLIP_ROUTE(iParam1->f_6, false);
  		}
  		HUD::SET_GPS_MULTI_ROUTE_RENDER(false);
  		HUD::CLEAR_GPS_MULTI_ROUTE();
  		iParam1->f_6 = iParam0;
  		HUD::SET_BLIP_ROUTE(iParam0, true);
  	}
  }
  
  int func_67(struct<3> Param0, bool bParam3)
  {
  	int iVar0;
  	
  	iVar0 = HUD::ADD_BLIP_FOR_COORD(Param0);
  	HUD::SET_BLIP_SCALE(iVar0, func_59(NETWORK::NETWORK_IS_GAME_IN_PROGRESS(), 1f, 1f));
  	HUD::SET_BLIP_ROUTE(iVar0, bParam3);
  	return iVar0;
  }
  
  void func_68(int iParam0, char* sParam1, int iParam2)
  {
  	AUDIO::PLAY_PED_AMBIENT_SPEECH_NATIVE(iParam0, sParam1, func_69(iParam2), 1);
  }
  
  int func_69(int iParam0)
  {
  	int iVar0;
  	
  	switch (iParam0)
  	{
  		case 0:
  			return "SPEECH_PARAMS_STANDARD";
  		
  		case 1:
  			return "SPEECH_PARAMS_ALLOW_REPEAT";
  		
  		case 2:
  			return "SPEECH_PARAMS_BEAT";
  		
  		case 3:
  			return "SPEECH_PARAMS_FORCE";
  		
  		case 4:
  			return "SPEECH_PARAMS_FORCE_FRONTEND";
  		
  		case 5:
  			return "SPEECH_PARAMS_FORCE_NO_REPEAT_FRONTEND";
  		
  		case 6:
  			return "SPEECH_PARAMS_FORCE_NORMAL";
  		
  		case 7:
  			return "SPEECH_PARAMS_FORCE_NORMAL_CLEAR";
  		
  		case 8:
  			return "SPEECH_PARAMS_FORCE_NORMAL_CRITICAL";
  		
  		case 9:
  			return "SPEECH_PARAMS_FORCE_SHOUTED";
  		
  		case 10:
  			return "SPEECH_PARAMS_FORCE_SHOUTED_CLEAR";
  		
  		case 11:
  			return "SPEECH_PARAMS_FORCE_SHOUTED_CRITICAL";
  		
  		case 12:
  			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY";
  		
  		case 13:
  			return "SPEECH_PARAMS_MEGAPHONE";
  		
  		case 14:
  			return "SPEECH_PARAMS_HELI";
  		
  		case 15:
  			return "SPEECH_PARAMS_FORCE_MEGAPHONE";
  		
  		case 16:
  			return "SPEECH_PARAMS_FORCE_HELI";
  		
  		case 17:
  			return "SPEECH_PARAMS_INTERRUPT";
  		
  		case 18:
  			return "SPEECH_PARAMS_INTERRUPT_SHOUTED";
  		
  		case 19:
  			return "SPEECH_PARAMS_INTERRUPT_SHOUTED_CLEAR";
  		
  		case 20:
  			return "SPEECH_PARAMS_INTERRUPT_SHOUTED_CRITICAL";
  		
  		case 21:
  			return "SPEECH_PARAMS_INTERRUPT_NO_FORCE";
  		
  		case 22:
  			return "SPEECH_PARAMS_INTERRUPT_FRONTEND";
  		
  		case 23:
  			return "SPEECH_PARAMS_INTERRUPT_NO_FORCE_FRONTEND";
  		
  		case 24:
  			return "SPEECH_PARAMS_ADD_BLIP";
  		
  		case 25:
  			return "SPEECH_PARAMS_ADD_BLIP_ALLOW_REPEAT";
  		
  		case 26:
  			return "SPEECH_PARAMS_ADD_BLIP_FORCE";
  		
  		case 27:
  			return "SPEECH_PARAMS_ADD_BLIP_SHOUTED";
  		
  		case 28:
  			return "SPEECH_PARAMS_ADD_BLIP_SHOUTED_FORCE";
  		
  		case 29:
  			return "SPEECH_PARAMS_ADD_BLIP_INTERRUPT";
  		
  		case 30:
  			return "SPEECH_PARAMS_ADD_BLIP_INTERRUPT_FORCE";
  		
  		case 31:
  			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED";
  		
  		case 32:
  			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CLEAR";
  		
  		case 33:
  			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CRITICAL";
  		
  		case 34:
  			return "SPEECH_PARAMS_SHOUTED";
  		
  		case 35:
  			return "SPEECH_PARAMS_SHOUTED_CLEAR";
  		
  		case 36:
  			return "SPEECH_PARAMS_SHOUTED_CRITICAL";
  		
  		default:
  	}
  	iVar0 = 0;
  	return iVar0;
  }
  
  void func_70(int* iParam0, char* sParam1, bool bParam2)
  {
  	if (!bParam2)
  	{
  		if (!MISC::IS_STRING_NULL(sParam1))
  		{
  			if (!MISC::ARE_STRINGS_EQUAL(sParam1, ""))
  			{
  				func_110(sParam1, 7500, 1);
  			}
  		}
  	}
  	iParam0->f_10 = MISC::GET_GAME_TIMER();
  }
  
  int func_71(int* iParam0)
  {
  	if (!PED::IS_PED_INJURED(iParam0->f_16))
  	{
  		if (AUDIO::IS_AMBIENT_SPEECH_PLAYING(iParam0->f_16))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_72(int* iParam0, int iParam1)
  {
  	if (iParam1 != 1 || HUD::IS_SUBTITLE_PREFERENCE_SWITCHED_ON())
  	{
  		if (HUD::IS_MESSAGE_BEING_DISPLAYED())
  		{
  			return 1;
  		}
  		if (func_74(iParam0))
  		{
  			return 1;
  		}
  	}
  	if (iParam1 != 2 || HUD::IS_SUBTITLE_PREFERENCE_SWITCHED_ON())
  	{
  		if (func_49() && !func_73())
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_73()
  {
  	if (Global_22136 == 1)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_74(var uParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	iVar1 = MISC::GET_GAME_TIMER();
  	iVar0 = (iVar1 - uParam0->f_10);
  	if (iVar0 < 35)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_75(var uParam0, int iParam1)
  {
  	int iVar0;
  	
  	if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  	{
  		iVar0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  		if (func_76(iVar0, uParam0, iParam1))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_76(int iParam0, var uParam1, int iParam2)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		iVar0 = 0;
  		iVar2 = 0;
  		while (iVar2 < 3)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(uParam1->f_17[iVar2]))
  			{
  				iVar0++;
  			}
  			iVar2++;
  		}
  		iVar1 = VEHICLE::GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(iParam0);
  		if (iParam2 > 0)
  		{
  			if (iVar1 >= iParam2)
  			{
  				if (iParam2 > 1)
  				{
  					if (!VEHICLE::IS_SEAT_WARP_ONLY(iParam0, 1))
  					{
  						return 1;
  					}
  				}
  				else
  				{
  					return 1;
  				}
  			}
  		}
  		else if (iVar1 >= iVar0)
  		{
  			if (iVar0 > 1)
  			{
  				if (!VEHICLE::IS_SEAT_WARP_ONLY(iParam0, 1))
  				{
  					return 1;
  				}
  			}
  			else
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  void func_77(char* sParam0)
  {
  	if (!MISC::IS_STRING_NULL(sParam0))
  	{
  		HUD::CLEAR_THIS_PRINT(sParam0);
  	}
  }
  
  int func_78(var uParam0, var uParam1, var uParam2, var uParam3, var uParam4, var uParam5, var uParam6, char* sParam7, float fParam8, bool bParam9, int iParam10, bool bParam11, int iParam12, var uParam13, var uParam14, var uParam15, int iParam16, bool bParam17)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	int iVar4;
  	int iVar5;
  	int iVar6;
  	int iVar7[3];
  	bool bVar11;
  	bool bVar12;
  	int iVar13;
  	int iVar14;
  	var uVar15[3];
  	var uVar19[3];
  	bool bVar23;
  	int iVar24;
  	int iVar25;
  	int iVar26;
  	int iVar27;
  	struct<3> Var28;
  	int iVar31;
  	int iVar32;
  	
  	iVar4 = 0;
  	uParam0->f_17[0] = uParam1;
  	uParam0->f_17[1] = uParam2;
  	uParam0->f_17[2] = uParam3;
  	uParam0->f_16 = uParam1;
  	uVar15[0] = uParam4;
  	uVar15[1] = uParam5;
  	uVar15[2] = uParam6;
  	uVar19[0] = uParam13;
  	uVar19[1] = uParam14;
  	uVar19[2] = uParam15;
  	iVar6 = 1;
  	iVar1 = 0;
  	iVar2 = 0;
  	iVar3 = 0;
  	iVar7[0] = 0;
  	iVar7[1] = 0;
  	iVar7[2] = 0;
  	iVar0 = 0;
  	while (iVar0 < 3)
  	{
  		if (!PED::IS_PED_INJURED(uParam0->f_17[iVar0]))
  		{
  			iVar3++;
  		}
  		if (PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0))
  		{
  			if (!MISC::IS_BIT_SET(uParam0->f_13, 29) && !MISC::IS_BIT_SET(uParam0->f_13, 28))
  			{
  				if (!PED::IS_PED_INJURED(uParam0->f_17[iVar0]))
  				{
  					PED::SET_PED_USING_ACTION_MODE(uParam0->f_17[iVar0], true, -1, 0);
  				}
  				if (iVar0 == 2)
  				{
  					MISC::SET_BIT(&(uParam0->f_13), 28);
  				}
  			}
  		}
  		else if (!MISC::IS_BIT_SET(uParam0->f_13, 29) && MISC::IS_BIT_SET(uParam0->f_13, 28))
  		{
  			if (!PED::IS_PED_INJURED(uParam0->f_17[iVar0]))
  			{
  				PED::SET_PED_USING_ACTION_MODE(uParam0->f_17[iVar0], false, -1, 0);
  			}
  			if (iVar0 == 2)
  			{
  				MISC::CLEAR_BIT(&(uParam0->f_13), 28);
  			}
  		}
  		iVar0++;
  	}
  	if (iVar3 == 0)
  	{
  		return 1;
  	}
  	if (MISC::IS_BIT_SET(uParam0->f_13, 26))
  	{
  		bVar23 = false;
  		if (!ENTITY::DOES_ENTITY_EXIST(uParam0->f_21))
  		{
  			iVar25 = 64;
  			iVar25 |= 65536;
  			iVar25 |= 2048;
  			iVar25 |= 1;
  			iVar25 |= 2;
  			iVar25 |= 4;
  			iVar25 |= 32;
  			iVar25 |= 16;
  			iVar25 |= 8;
  			iVar24 = VEHICLE::GET_CLOSEST_VEHICLE(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), 50f, 0, iVar25);
  			if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar24, false))
  			{
  				uParam0->f_21 = iVar24;
  			}
  		}
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(uParam0->f_21, false))
  		{
  			if (SYSTEM::VDIST2(ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), ENTITY::GET_ENTITY_COORDS(uParam0->f_21, true)) < 400f)
  			{
  				if (!PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()))
  				{
  					if (!PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0) || !bParam17)
  					{
  						if (func_76(uParam0->f_21, uParam0, iVar3))
  						{
  							iVar0 = 0;
  							while (iVar0 < 3)
  							{
  								if (!PED::IS_PED_INJURED(uParam0->f_17[iVar0]))
  								{
  									PED::SET_PED_MAX_MOVE_BLEND_RATIO(uParam0->f_17[iVar0], 1f);
  									if (PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()))
  									{
  										PED::REMOVE_PED_FROM_GROUP(uParam0->f_17[iVar0]);
  									}
  									if (TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_17[iVar0], -1794415470) == 7 && !func_93(uParam0->f_17[iVar0], uParam0->f_21))
  									{
  										if (!PED::IS_PED_RAGDOLL(uParam0->f_17[iVar0]) && !TASK::IS_PED_GETTING_UP(uParam0->f_17[iVar0]))
  										{
  											PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(uParam0->f_17[iVar0], true);
  											TASK::TASK_ENTER_VEHICLE(uParam0->f_17[iVar0], uParam0->f_21, 60000, iVar0, 1f, 1, 0);
  											PED::SET_PED_GROUP_MEMBER_PASSENGER_INDEX(uParam0->f_17[iVar0], iVar0);
  										}
  									}
  								}
  								iVar0++;
  							}
  							return 1;
  						}
  						else
  						{
  							bVar23 = true;
  						}
  					}
  					else
  					{
  						bVar23 = true;
  					}
  				}
  				else
  				{
  					bVar23 = true;
  				}
  			}
  			else
  			{
  				bVar23 = true;
  			}
  		}
  		else
  		{
  			bVar23 = true;
  		}
  		if (bVar23)
  		{
  			MISC::CLEAR_BIT(&(uParam0->f_13), 26);
  			iVar0 = 0;
  			while (iVar0 < 3)
  			{
  				if (!PED::IS_PED_INJURED(uParam0->f_17[iVar0]))
  				{
  					if (!PED::IS_PED_GETTING_INTO_A_VEHICLE(uParam0->f_17[iVar0]) && !uParam0->f_15)
  					{
  						TASK::CLEAR_PED_TASKS(uParam0->f_17[iVar0]);
  					}
  					if (!PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()))
  					{
  						if (func_91(uParam0, uParam0->f_17[iVar0], fParam8, 1))
  						{
  							PED::SET_PED_AS_GROUP_MEMBER(uParam0->f_17[iVar0], func_14());
  						}
  					}
  				}
  				iVar0++;
  			}
  		}
  	}
  	if (!MISC::IS_BIT_SET(uParam0->f_13, 26))
  	{
  		if ((!func_90(uParam0) && PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID())) && !ENTITY::DOES_ENTITY_EXIST(iParam10))
  		{
  			iVar13 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  			if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar13, false))
  			{
  				if (!MISC::IS_BIT_SET(uParam0->f_13, 13))
  				{
  					if (iParam16 == 4 || iParam16 == 5)
  					{
  					}
  					if (!func_72(uParam0, 2))
  					{
  						iVar26 = 0;
  						iVar27 = 0;
  						iVar0 = 0;
  						while (iVar0 < 3)
  						{
  							if (!PED::IS_PED_INJURED(uParam0->f_17[iVar0]))
  							{
  								iVar26++;
  							}
  							iVar0++;
  						}
  						iVar27 = MISC::GET_RANDOM_INT_IN_RANGE(0, iVar26);
  						if (!PED::IS_PED_INJURED(uParam0->f_17[iVar27]))
  						{
  							func_68(uParam0->f_17[iVar27], "NEED_A_BIGGER_VEHICLE", 3);
  						}
  						func_70(uParam0, "MORE_SEATS", 0);
  						MISC::SET_BIT(&(uParam0->f_13), 13);
  					}
  				}
  				bVar12 = true;
  			}
  		}
  		else
  		{
  			bVar12 = false;
  			MISC::CLEAR_BIT(&(uParam0->f_13), 13);
  			func_77("MORE_SEATS");
  		}
  		if (!ENTITY::DOES_ENTITY_EXIST(iParam10))
  		{
  			if ((!PED::IS_PED_INJURED(uParam0->f_17[0]) || !PED::IS_PED_INJURED(uParam0->f_17[1])) || !PED::IS_PED_INJURED(uParam0->f_17[2]))
  			{
  				if (!MISC::IS_BIT_SET(uParam0->f_13, 31))
  				{
  					if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()) && !func_72(uParam0, 2))
  					{
  						iVar13 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  						if (func_89(iVar13, uParam0))
  						{
  							func_70(uParam0, "CMN_VEHSUIT", 0);
  							MISC::SET_BIT(&(uParam0->f_13), 31);
  						}
  					}
  				}
  				else if (!PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()))
  				{
  					MISC::CLEAR_BIT(&(uParam0->f_13), 31);
  					func_77("CMN_VEHSUIT");
  				}
  			}
  		}
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam10, false))
  		{
  			if (PED::IS_PED_SITTING_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iParam10))
  			{
  				if (PAD::IS_CONTROL_JUST_PRESSED(0, 75))
  				{
  					MISC::SET_BIT(&(uParam0->f_13), 21);
  				}
  			}
  			else if (MISC::IS_BIT_SET(uParam0->f_13, 21))
  			{
  				MISC::CLEAR_BIT(&(uParam0->f_13), 21);
  			}
  		}
  		iVar0 = 0;
  		while (iVar0 < 3)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_17[iVar0]))
  			{
  				if (!PED::IS_PED_INJURED(uParam0->f_17[iVar0]))
  				{
  					if (!PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()))
  					{
  						PED::SET_PED_DIES_IN_WATER(uParam0->f_17[iVar0], true);
  					}
  					else
  					{
  						PED::SET_PED_DIES_IN_WATER(uParam0->f_17[iVar0], false);
  					}
  					if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()))
  					{
  						iVar13 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  						if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar13, false))
  						{
  							if (PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()))
  							{
  								if (!func_90(uParam0) && PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()))
  								{
  									if (!func_88(uParam0->f_17[iVar0]))
  									{
  										PED::REMOVE_PED_FROM_GROUP(uParam0->f_17[iVar0]);
  									}
  								}
  							}
  						}
  						if (iVar13 != iParam10 && !ENTITY::IS_ENTITY_DEAD(iVar13, false))
  						{
  							if (PED::IS_PED_SITTING_IN_VEHICLE(uParam0->f_17[iVar0], iVar13))
  							{
  								if (ENTITY::IS_ENTITY_IN_WATER(iVar13) && !VEHICLE::IS_VEHICLE_ON_ALL_WHEELS(iVar13))
  								{
  									Var28 = { ENTITY::GET_ENTITY_COORDS(iVar13, true) };
  									if (Var28.f_2 < -1f)
  									{
  										TASK::TASK_LEAVE_VEHICLE(uParam0->f_17[iVar0], iVar13, 64);
  									}
  								}
  							}
  						}
  					}
  					bVar11 = true;
  					if (!PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()))
  					{
  						if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(uParam0->f_17[iVar0]))
  						{
  							iVar13 = PED::GET_VEHICLE_PED_IS_IN(uParam0->f_17[iVar0], false);
  							if (!ENTITY::IS_ENTITY_DEAD(iVar13, false))
  							{
  								if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam10, false))
  								{
  									if (iVar13 != iParam10)
  									{
  										if (!PED::IS_PED_SITTING_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iVar13))
  										{
  											if (ENTITY::GET_ENTITY_SPEED(iVar13) > 5f)
  											{
  												TASK::TASK_LEAVE_VEHICLE(uParam0->f_17[iVar0], iVar13, 4160);
  											}
  											else
  											{
  												TASK::TASK_LEAVE_VEHICLE(uParam0->f_17[iVar0], iVar13, 64);
  											}
  											bVar11 = false;
  										}
  									}
  								}
  								else
  								{
  									if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()))
  									{
  										iVar31 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  									}
  									if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar31, false))
  									{
  										if (iVar13 != iVar31)
  										{
  											if (ENTITY::GET_ENTITY_SPEED(iVar13) > 5f)
  											{
  												TASK::TASK_LEAVE_VEHICLE(uParam0->f_17[iVar0], iVar13, 4160);
  											}
  											else
  											{
  												TASK::TASK_LEAVE_VEHICLE(uParam0->f_17[iVar0], iVar13, 64);
  											}
  											bVar11 = false;
  										}
  									}
  								}
  							}
  						}
  					}
  					if (PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()))
  					{
  						iVar32 = PED::GET_VEHICLE_PED_IS_USING(PLAYER::PLAYER_PED_ID());
  						if (ENTITY::DOES_ENTITY_EXIST(iVar32))
  						{
  							if (func_76(iVar32, uParam0, 0))
  							{
  								if (func_87(iVar0, uParam0) || !MISC::IS_BIT_SET(uParam0->f_13, 27))
  								{
  									PED::SET_PED_GROUP_MEMBER_PASSENGER_INDEX(uParam0->f_17[iVar0], iVar0);
  									func_15(iVar0, uParam0);
  									iVar4++;
  									if (iVar4 >= iVar3)
  									{
  										MISC::SET_BIT(&(uParam0->f_13), 27);
  									}
  								}
  							}
  							else if (!func_87(iVar0, uParam0))
  							{
  								if (ENTITY::GET_ENTITY_MODEL(iVar32) == joaat("sentinel2"))
  								{
  									PED::SET_PED_GROUP_MEMBER_PASSENGER_INDEX(uParam0->f_17[iVar0], 4);
  								}
  								else
  								{
  									PED::SET_PED_GROUP_MEMBER_PASSENGER_INDEX(uParam0->f_17[iVar0], 2);
  								}
  								func_86(iVar0, uParam0);
  							}
  						}
  					}
  					if ((!PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()) && !func_85(uParam0->f_17[iVar0], iParam10)) && !func_84(uParam0->f_17[iVar0], iParam10))
  					{
  						if (func_91(uParam0, uParam0->f_17[iVar0], fParam8, bParam11))
  						{
  							if (!PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()))
  							{
  								if (((!PED::IS_PED_RAGDOLL(uParam0->f_17[iVar0]) && !TASK::IS_PED_GETTING_UP(uParam0->f_17[iVar0])) && !PED::IS_PED_JUMPING_OUT_OF_VEHICLE(uParam0->f_17[iVar0])) && !PED::IS_PED_GETTING_INTO_A_VEHICLE(uParam0->f_17[iVar0]))
  								{
  									iVar14 = TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_17[iVar0], -1794415470);
  									if (iVar14 == 7)
  									{
  										TASK::CLEAR_PED_TASKS(uParam0->f_17[iVar0]);
  									}
  									PED::SET_PED_AS_GROUP_MEMBER(uParam0->f_17[iVar0], func_14());
  									bVar11 = false;
  								}
  							}
  						}
  						if (bVar11)
  						{
  							if (!HUD::DOES_BLIP_EXIST(uParam0->f_1[iVar0]))
  							{
  								uParam0->f_11 = MISC::GET_GAME_TIMER();
  								uParam0->f_1[iVar0] = func_57(uParam0->f_17[iVar0], 0, 0);
  								HUD::SET_BLIP_DISPLAY(uParam0->f_1[iVar0], 2);
  								if (bParam9)
  								{
  									func_66(uParam0->f_1[iVar0], uParam0);
  								}
  							}
  						}
  						iVar6 = 0;
  					}
  					else if (HUD::DOES_BLIP_EXIST(uParam0->f_1[iVar0]))
  					{
  						if (((func_63(uParam0->f_17[iVar0], 1) || func_85(uParam0->f_17[iVar0], iParam10)) || iParam12) || (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam10, false) && !PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iParam10, false)))
  						{
  							if (HUD::DOES_BLIP_EXIST(uParam0->f_1[iVar0]))
  							{
  								HUD::REMOVE_BLIP(&(uParam0->f_1[iVar0]));
  								func_77(uVar15[iVar0]);
  							}
  						}
  						else
  						{
  							if (bParam9)
  							{
  								func_66(uParam0->f_1[iVar0], uParam0);
  							}
  							iVar6 = 0;
  						}
  					}
  					else if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam10, false))
  					{
  						if (!PED::IS_PED_SITTING_IN_VEHICLE(uParam0->f_17[iVar0], iParam10))
  						{
  							if ((ENTITY::IS_ENTITY_AT_ENTITY(uParam0->f_17[iVar0], iParam10, 20f, 20f, 5f, false, true, 0) && !MISC::IS_BIT_SET(uParam0->f_13, 11)) && !((bParam17 && PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0)) && !PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iParam10, false)))
  							{
  								if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(uParam0->f_17[iVar0]))
  								{
  									if (!PED::IS_PED_IN_VEHICLE(uParam0->f_17[iVar0], iParam10, false))
  									{
  										if (!func_63(uParam0->f_17[iVar0], 1))
  										{
  											if (func_62(uParam0->f_17[iVar0]))
  											{
  												iVar14 = TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_17[iVar0], 451360105);
  												if (iVar14 == 7)
  												{
  													TASK::TASK_LEAVE_ANY_VEHICLE(uParam0->f_17[iVar0], 0, 0);
  												}
  											}
  										}
  									}
  								}
  								else
  								{
  									if (PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()))
  									{
  										if ((((!PED::IS_PED_JUMPING_OUT_OF_VEHICLE(uParam0->f_17[iVar0]) && !PED::IS_PED_RAGDOLL(uParam0->f_17[iVar0])) && !TASK::IS_PED_GETTING_UP(uParam0->f_17[iVar0])) && !PED::IS_PED_GETTING_INTO_A_VEHICLE(uParam0->f_17[iVar0])) && !FIRE::IS_ENTITY_ON_FIRE(iParam10))
  										{
  											PED::REMOVE_PED_FROM_GROUP(uParam0->f_17[iVar0]);
  										}
  									}
  									iVar14 = TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_17[iVar0], -1794415470);
  									if (iVar14 == 7 && !func_93(uParam0->f_17[iVar0], iParam10))
  									{
  										if (((((!PED::IS_PED_JUMPING_OUT_OF_VEHICLE(uParam0->f_17[iVar0]) && !PED::IS_PED_JUMPING_OUT_OF_VEHICLE(PLAYER::PLAYER_PED_ID())) && !func_83(uParam0->f_17[iVar0], 2f)) && !PED::IS_PED_RAGDOLL(uParam0->f_17[iVar0])) && !TASK::IS_PED_GETTING_UP(uParam0->f_17[iVar0])) && !FIRE::IS_ENTITY_ON_FIRE(iParam10))
  										{
  											PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(uParam0->f_17[iVar0], true);
  											if (MISC::IS_BIT_SET(uParam0->f_13, 10))
  											{
  												PED::SET_PED_MAX_MOVE_BLEND_RATIO(uParam0->f_17[iVar0], 1f);
  											}
  											TASK::TASK_ENTER_VEHICLE(uParam0->f_17[iVar0], iParam10, 60000, iVar0, 2f, 1, 0);
  											PED::SET_PED_GET_OUT_UPSIDE_DOWN_VEHICLE(uParam0->f_17[iVar0], false);
  										}
  									}
  									else if (PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iParam10, false))
  									{
  										uParam0->f_1[iVar0] = func_57(uParam0->f_17[iVar0], 0, 0);
  										HUD::SET_BLIP_DISPLAY(uParam0->f_1[iVar0], 2);
  										iVar6 = 0;
  									}
  								}
  							}
  							else if (!PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()))
  							{
  								if (func_91(uParam0, uParam0->f_17[iVar0], fParam8, bParam11))
  								{
  									if (!PED::IS_PED_RAGDOLL(uParam0->f_17[iVar0]) && !TASK::IS_PED_GETTING_UP(uParam0->f_17[iVar0]))
  									{
  										iVar14 = TASK::GET_SCRIPT_TASK_STATUS(uParam0->f_17[iVar0], -1794415470);
  										if (iVar14 == 7)
  										{
  											TASK::CLEAR_PED_TASKS(uParam0->f_17[iVar0]);
  										}
  										PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(uParam0->f_17[iVar0], false);
  										PED::SET_PED_AS_GROUP_MEMBER(uParam0->f_17[iVar0], func_14());
  									}
  								}
  							}
  						}
  						else if (PED::IS_PED_SITTING_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iParam10))
  						{
  							if (!PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()))
  							{
  								if (!MISC::IS_BIT_SET(uParam0->f_13, 21))
  								{
  									PED::SET_PED_AS_GROUP_MEMBER(uParam0->f_17[iVar0], func_14());
  								}
  							}
  							else if (MISC::IS_BIT_SET(uParam0->f_13, 21))
  							{
  								PED::REMOVE_PED_FROM_GROUP(uParam0->f_17[iVar0]);
  								MISC::SET_BIT(&(uParam0->f_13), 21);
  							}
  						}
  						else if (PED::IS_PED_GROUP_MEMBER(uParam0->f_17[iVar0], func_14()) && !FIRE::IS_ENTITY_ON_FIRE(iParam10))
  						{
  							PED::REMOVE_PED_FROM_GROUP(uParam0->f_17[iVar0]);
  						}
  					}
  				}
  				else if (HUD::DOES_BLIP_EXIST(uParam0->f_1[iVar0]))
  				{
  					HUD::REMOVE_BLIP(&(uParam0->f_1[iVar0]));
  					func_77(uVar15[iVar0]);
  				}
  			}
  			iVar0++;
  		}
  		iVar0 = 0;
  		while (iVar0 < 3)
  		{
  			if (HUD::DOES_BLIP_EXIST(uParam0->f_1[iVar0]))
  			{
  				iVar7[iVar0] = 1;
  				iVar1++;
  			}
  			iVar0++;
  		}
  		if (!func_72(uParam0, 2))
  		{
  			if (iVar1 > 0)
  			{
  				iVar0 = 0;
  				while (iVar0 < 3)
  				{
  					if (iVar7[iVar0])
  					{
  						if (!PED::IS_PED_INJURED(uParam0->f_17[iVar0]))
  						{
  							if (func_88(uParam0->f_17[iVar0]) || ENTITY::IS_ENTITY_AT_ENTITY(uParam0->f_17[iVar0], PLAYER::PLAYER_PED_ID(), uParam0->f_8, uParam0->f_8, uParam0->f_8, false, true, 0))
  							{
  								iVar1 = (iVar1 - 1);
  								iVar7[iVar0] = 0;
  							}
  						}
  					}
  					else if (!PED::IS_PED_INJURED(uParam0->f_17[iVar0]))
  					{
  						if (!ENTITY::IS_ENTITY_AT_ENTITY(uParam0->f_17[iVar0], PLAYER::PLAYER_PED_ID(), (uParam0->f_8 * 0.85f), (uParam0->f_8 * 0.85f), uParam0->f_8, false, true, 0) && !func_88(uParam0->f_17[iVar0]))
  						{
  						}
  					}
  					iVar0++;
  				}
  			}
  			iVar5 = MISC::GET_GAME_TIMER();
  			if ((iVar5 - uParam0->f_11) > 1500 || iVar3 == 1)
  			{
  				if (iVar1 > 0)
  				{
  					if (uParam0->f_12 < iVar1)
  					{
  						if ((iVar1 == iVar3 || (iVar2 + iVar1) == iVar3) && iVar3 > 1)
  						{
  							if (!MISC::IS_BIT_SET(uParam0->f_13, 5))
  							{
  								func_70(uParam0, sParam7, 0);
  								MISC::SET_BIT(&(uParam0->f_13), 5);
  								uParam0->f_12 = iVar1;
  							}
  							else
  							{
  								uParam0->f_12 = iVar1;
  							}
  						}
  						else
  						{
  							iVar0 = 0;
  							while (iVar0 < 3)
  							{
  								if (iVar7[iVar0])
  								{
  									if (!func_82(iVar0, uParam0))
  									{
  										if (!MISC::IS_STRING_NULL(uVar19[iVar0]))
  										{
  											if (!MISC::ARE_STRINGS_EQUAL(uVar19[iVar0], ""))
  											{
  												func_80(uParam0, uVar15[iVar0], uVar19[iVar0], 0);
  												func_79(iVar0, uParam0);
  												uParam0->f_12 = iVar1;
  											}
  										}
  										if (!func_82(iVar0, uParam0))
  										{
  											func_70(uParam0, uVar15[iVar0], 0);
  											func_79(iVar0, uParam0);
  											uParam0->f_12 = iVar1;
  										}
  									}
  									else
  									{
  										uParam0->f_12 = iVar1;
  									}
  								}
  								iVar0++;
  							}
  						}
  					}
  				}
  				else
  				{
  					uParam0->f_12 = 0;
  				}
  			}
  		}
  		MISC::CLEAR_BIT(&(uParam0->f_13), 10);
  		if (iVar6 && !bVar12)
  		{
  			iVar0 = 0;
  			while (iVar0 < 3)
  			{
  				if (HUD::DOES_BLIP_EXIST(uParam0->f_1[iVar0]))
  				{
  					HUD::REMOVE_BLIP(&(uParam0->f_1[iVar0]));
  					func_77(uVar15[iVar0]);
  				}
  				iVar0++;
  			}
  			func_77("MORE_SEATS");
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_79(int iParam0, var uParam1)
  {
  	switch (iParam0)
  	{
  		case 0:
  			MISC::SET_BIT(&(uParam1->f_13), 14);
  			break;
  		
  		case 1:
  			MISC::SET_BIT(&(uParam1->f_13), 15);
  			break;
  		
  		case 2:
  			MISC::SET_BIT(&(uParam1->f_13), 16);
  			break;
  	}
  }
  
  void func_80(var uParam0, char* sParam1, char* sParam2, bool bParam3)
  {
  	if (!bParam3)
  	{
  		if (!MISC::IS_STRING_NULL(sParam1))
  		{
  			if (!MISC::ARE_STRINGS_EQUAL(sParam1, ""))
  			{
  				func_81(sParam1, sParam2, 7500, 1);
  			}
  		}
  	}
  	uParam0->f_10 = MISC::GET_GAME_TIMER();
  }
  
  void func_81(char* sParam0, char* sParam1, int iParam2, int iParam3)
  {
  	iParam3 = iParam3;
  	HUD::BEGIN_TEXT_COMMAND_PRINT(sParam0);
  	HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL(sParam1);
  	HUD::END_TEXT_COMMAND_PRINT(iParam2, true);
  }
  
  int func_82(int iParam0, var uParam1)
  {
  	switch (iParam0)
  	{
  		case 0:
  			return MISC::IS_BIT_SET(uParam1->f_13, 14);
  		
  		case 1:
  			return MISC::IS_BIT_SET(uParam1->f_13, 15);
  		
  		case 2:
  			return MISC::IS_BIT_SET(uParam1->f_13, 16);
  		
  		default:
  	}
  	return 0;
  }
  
  int func_83(int iParam0, float fParam1)
  {
  	int iVar0;
  	
  	if (PED::IS_PED_IN_ANY_VEHICLE(iParam0, false))
  	{
  		iVar0 = PED::GET_VEHICLE_PED_IS_IN(iParam0, false);
  		if (!ENTITY::IS_ENTITY_DEAD(iVar0, false))
  		{
  			if (ENTITY::GET_ENTITY_SPEED(iVar0) > fParam1)
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_84(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	if (!PED::IS_PED_INJURED(iParam0))
  	{
  		if (!PED::IS_PED_GROUP_MEMBER(iParam0, func_14()))
  		{
  			iVar0 = PED::GET_VEHICLE_PED_IS_ENTERING(iParam0);
  			if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam1, false))
  			{
  				if (ENTITY::IS_ENTITY_AT_ENTITY(iParam0, iParam1, (20f + 10f), (20f + 10f), 10f, false, true, 0))
  				{
  					if (iVar0 == iParam1)
  					{
  						return 1;
  					}
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  int func_85(int iParam0, int iParam1)
  {
  	if (!PED::IS_PED_INJURED(iParam0))
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(iParam1))
  		{
  			if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam1, false))
  			{
  				if (PED::IS_PED_SITTING_IN_VEHICLE(iParam0, iParam1))
  				{
  					return 1;
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  void func_86(int iParam0, var uParam1)
  {
  	switch (iParam0)
  	{
  		case 0:
  			MISC::SET_BIT(&(uParam1->f_13), 17);
  			break;
  		
  		case 1:
  			MISC::SET_BIT(&(uParam1->f_13), 18);
  			break;
  		
  		case 2:
  			MISC::SET_BIT(&(uParam1->f_13), 19);
  			break;
  	}
  }
  
  int func_87(int iParam0, var uParam1)
  {
  	switch (iParam0)
  	{
  		case 0:
  			return MISC::IS_BIT_SET(uParam1->f_13, 17);
  		
  		case 1:
  			return MISC::IS_BIT_SET(uParam1->f_13, 18);
  		
  		case 2:
  			return MISC::IS_BIT_SET(uParam1->f_13, 19);
  		
  		default:
  	}
  	return 0;
  }
  
  int func_88(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  	{
  		iVar0 = PED::GET_VEHICLE_PED_IS_USING(PLAYER::PLAYER_PED_ID());
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false))
  		{
  			if (!PED::IS_PED_INJURED(iParam0))
  			{
  				iVar1 = PED::GET_VEHICLE_PED_IS_USING(iParam0);
  				if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar1, false))
  				{
  					if (iVar0 == iVar1)
  					{
  						if (ENTITY::IS_ENTITY_AT_ENTITY(PLAYER::PLAYER_PED_ID(), iParam0, 20f, 20f, 20f, false, true, 0) && ENTITY::IS_ENTITY_AT_ENTITY(iParam0, iVar1, 20f, 20f, 20f, false, true, 0))
  						{
  							return 1;
  						}
  					}
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  int func_89(int iParam0, var uParam1)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	int iVar4;
  	int iVar5;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		if (ENTITY::GET_ENTITY_MODEL(iParam0) == joaat("bus") || ENTITY::GET_ENTITY_MODEL(iParam0) == joaat("coach"))
  		{
  			iVar0 = 0;
  			iVar1 = 0;
  			iVar2 = 0;
  			iVar2 = 0;
  			while (iVar2 < 3)
  			{
  				if (!PED::IS_PED_INJURED(uParam1->f_17[iVar2]))
  				{
  					iVar0++;
  				}
  				iVar2++;
  			}
  			iVar3 = VEHICLE::GET_PED_IN_VEHICLE_SEAT(iParam0, 0, false);
  			if (!PED::IS_PED_INJURED(iVar3))
  			{
  				if ((iVar3 == uParam1->f_17[0] || iVar3 == uParam1->f_17[1]) || iVar3 == uParam1->f_17[2])
  				{
  					iVar1++;
  				}
  			}
  			else
  			{
  				iVar1++;
  			}
  			iVar4 = VEHICLE::GET_PED_IN_VEHICLE_SEAT(iParam0, 1, false);
  			if (!PED::IS_PED_INJURED(iVar4))
  			{
  				if ((iVar4 == uParam1->f_17[0] || iVar4 == uParam1->f_17[1]) || iVar4 == uParam1->f_17[2])
  				{
  					iVar1++;
  				}
  			}
  			else
  			{
  				iVar1++;
  			}
  			iVar5 = VEHICLE::GET_PED_IN_VEHICLE_SEAT(iParam0, 2, false);
  			if (!PED::IS_PED_INJURED(iVar5))
  			{
  				if ((iVar5 == uParam1->f_17[0] || iVar5 == uParam1->f_17[1]) || iVar5 == uParam1->f_17[2])
  				{
  					iVar1++;
  				}
  			}
  			else
  			{
  				iVar1++;
  			}
  			if (iVar1 < iVar0)
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_90(var uParam0)
  {
  	int iVar0;
  	
  	if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()))
  	{
  		iVar0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  		if (func_76(iVar0, uParam0, 0))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_91(var uParam0, int iParam1, float fParam2, bool bParam3)
  {
  	int iVar0;
  	
  	if (!PED::IS_PED_INJURED(iParam1))
  	{
  		if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(iParam1))
  		{
  			iVar0 = PED::GET_VEHICLE_PED_IS_IN(iParam1, false);
  			if (!ENTITY::IS_ENTITY_DEAD(iVar0, false))
  			{
  				if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false))
  				{
  					if (PED::IS_PED_SITTING_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iVar0))
  					{
  						if (func_90(uParam0))
  						{
  							return 1;
  						}
  					}
  					else if (bParam3)
  					{
  						return 1;
  					}
  				}
  				else if (ENTITY::IS_ENTITY_AT_ENTITY(PLAYER::PLAYER_PED_ID(), iParam1, fParam2, fParam2, 3f, false, true, 0))
  				{
  					return 1;
  				}
  			}
  		}
  		else if (ENTITY::IS_ENTITY_AT_ENTITY(PLAYER::PLAYER_PED_ID(), iParam1, fParam2, fParam2, 3f, false, true, 0))
  		{
  			if (!bParam3)
  			{
  				iVar0 = PED::GET_VEHICLE_PED_IS_USING(PLAYER::PLAYER_PED_ID());
  				if (ENTITY::DOES_ENTITY_EXIST(iVar0))
  				{
  					if (func_76(iVar0, uParam0, 0))
  					{
  						if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false))
  						{
  							if (func_92(iVar0))
  							{
  								return 1;
  							}
  						}
  					}
  				}
  				else
  				{
  					return 1;
  				}
  			}
  			else
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_92(int iParam0)
  {
  	float fVar0;
  	
  	if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		fVar0 = ENTITY::GET_ENTITY_SPEED(iParam0);
  		if (fVar0 > -0.5f && fVar0 < 0.5f)
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_93(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	if (!PED::IS_PED_INJURED(iParam0))
  	{
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam1, false))
  		{
  			iVar0 = PED::GET_VEHICLE_PED_IS_USING(iParam0);
  			if (iVar0 == iParam1)
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  void func_94()
  {
  	int iVar0;
  	int iVar1;
  	
  	if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true))
  	{
  		iVar0 = PED::GET_VEHICLE_PED_IS_ENTERING(PLAYER::PLAYER_PED_ID());
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false))
  		{
  			iVar1 = VEHICLE::GET_PED_IN_VEHICLE_SEAT(iVar0, 0, false);
  			if (!PED::IS_PED_INJURED(iVar1))
  			{
  				if (iVar1 != PLAYER::PLAYER_PED_ID())
  				{
  					if (ENTITY::IS_ENTITY_A_MISSION_ENTITY(iVar1))
  					{
  						if (!PED::IS_PED_HEADTRACKING_ENTITY(iVar1, PLAYER::PLAYER_PED_ID()))
  						{
  							TASK::TASK_LOOK_AT_ENTITY(iVar1, PLAYER::PLAYER_PED_ID(), 2000, 2048, 2);
  						}
  					}
  				}
  			}
  		}
  	}
  }
  
  void func_95(var uParam0)
  {
  	int iVar0;
  	
  	if (!MISC::IS_BIT_SET(uParam0->f_13, 25))
  	{
  		if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  		{
  			PED::SET_PED_CONFIG_FLAG(PLAYER::PLAYER_PED_ID(), 32, false);
  		}
  		iVar0 = 0;
  		while (iVar0 < 3)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_17[iVar0]))
  			{
  				if (!PED::IS_PED_INJURED(uParam0->f_17[iVar0]))
  				{
  					PED::SET_PED_CONFIG_FLAG(uParam0->f_17[iVar0], 32, false);
  					PED::SET_PED_CONFIG_FLAG(uParam0->f_17[iVar0], 305, true);
  					PED::SET_PED_CONFIG_FLAG(uParam0->f_17[iVar0], 268, true);
  					PED::SET_PED_GET_OUT_UPSIDE_DOWN_VEHICLE(uParam0->f_17[iVar0], false);
  				}
  			}
  			iVar0++;
  		}
  		MISC::SET_BIT(&(uParam0->f_13), 25);
  	}
  }
  
  void func_96(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 3)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_17[iVar0]))
  		{
  			if (!PED::IS_PED_INJURED(uParam0->f_17[iVar0]))
  			{
  				if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(uParam0->f_17[iVar0]))
  				{
  					PED::SET_PED_CAN_PLAY_AMBIENT_ANIMS(uParam0->f_17[iVar0], false);
  					PED::SET_PED_CAN_PLAY_AMBIENT_BASE_ANIMS(uParam0->f_17[iVar0], false);
  				}
  			}
  		}
  		iVar0++;
  	}
  	if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  	{
  		if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
  		{
  			if (PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID()))
  			{
  				PED::SET_PED_CAN_PLAY_AMBIENT_ANIMS(PLAYER::PLAYER_PED_ID(), false);
  				PED::SET_PED_CAN_PLAY_AMBIENT_BASE_ANIMS(PLAYER::PLAYER_PED_ID(), false);
  			}
  		}
  	}
  }
  
  var func_97()
  {
  	var uVar0;
  	
  	return uVar0;
  }
  
  Vector3 func_98()
  {
  	struct<3> Var0;
  	
  	return Var0;
  }
  
  int func_99()
  {
  	if (ENTITY::DOES_ENTITY_EXIST(iLocal_2600) && VEHICLE::IS_VEHICLE_DRIVEABLE(iLocal_2600, false))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  bool func_100(int* iParam0, struct<3> Param1, struct<3> Param4, struct<3> Param7, float fParam10, bool bParam11, int iParam12, char* sParam13, char* sParam14, char* sParam15, bool bParam16, int iParam17, bool bParam18, int iParam19)
  {
  	return func_56(iParam0, Param1, func_101(), Param4, Param7, bParam11, 5, 0, 0, 0, iParam12, sParam13, func_97(), func_97(), func_97(), func_97(), sParam14, 0, bParam16, sParam15, 1, iParam17, bParam18, iParam19, func_97(), func_97(), func_97(), 1, fParam10);
  }
  
  Vector3 func_101()
  {
  	return 0f, 0f, 2f;
  }
  
  int func_102()
  {
  	int iVar0;
  	
  	if (func_103())
  	{
  		iVar0 = 0;
  		while (iVar0 <= 2)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar0 /*8*/], false))
  			{
  				if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) && PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), Local_579[iVar0 /*8*/], true))
  				{
  					return iVar0;
  				}
  			}
  			iVar0++;
  		}
  	}
  	return -1;
  }
  
  int func_103()
  {
  	int iVar0;
  	
  	if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  	{
  		iVar0 = 0;
  		while (iVar0 <= 2)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar0 /*8*/], false))
  			{
  				if (PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), Local_579[iVar0 /*8*/], false))
  				{
  					return 1;
  				}
  			}
  			iVar0++;
  		}
  	}
  	return 0;
  }
  
  void func_104(int iParam0, int iParam1)
  {
  	Global_62109 = iParam0;
  	Global_62110 = iParam1;
  }
  
  int func_105(bool bParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	iVar1 = 0;
  	while (iVar1 <= 2)
  	{
  		if (((ENTITY::DOES_ENTITY_EXIST(Local_579[iVar1 /*8*/]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar1 /*8*/], false)) && !func_109(Local_579[iVar1 /*8*/])) && (!bParam0 || func_106(Local_579[iVar1 /*8*/])))
  		{
  			iVar0++;
  		}
  		iVar1++;
  	}
  	return iVar0;
  }
  
  int func_106(int iParam0)
  {
  	if (INTERIOR::GET_INTERIOR_FROM_ENTITY(iParam0) == iLocal_2552)
  	{
  		if (func_108(PLAYER::PLAYER_PED_ID(), Local_642, 1) < 500f)
  		{
  			return 1;
  		}
  	}
  	else if (func_107(iParam0, PLAYER::PLAYER_PED_ID(), 1) < 300f)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  float func_107(int iParam0, int iParam1, bool bParam2)
  {
  	struct<3> Var0;
  	struct<3> Var3;
  	
  	if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		Var0 = { ENTITY::GET_ENTITY_COORDS(iParam0, true) };
  	}
  	else
  	{
  		Var0 = { ENTITY::GET_ENTITY_COORDS(iParam0, false) };
  	}
  	if (!ENTITY::IS_ENTITY_DEAD(iParam1, false))
  	{
  		Var3 = { ENTITY::GET_ENTITY_COORDS(iParam1, true) };
  	}
  	else
  	{
  		Var3 = { ENTITY::GET_ENTITY_COORDS(iParam1, false) };
  	}
  	return MISC::GET_DISTANCE_BETWEEN_COORDS(Var0, Var3, bParam2);
  }
  
  float func_108(int iParam0, struct<3> Param1, bool bParam4)
  {
  	struct<3> Var0;
  	
  	if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		Var0 = { ENTITY::GET_ENTITY_COORDS(iParam0, true) };
  	}
  	else
  	{
  		Var0 = { ENTITY::GET_ENTITY_COORDS(iParam0, false) };
  	}
  	return MISC::GET_DISTANCE_BETWEEN_COORDS(Var0, Param1, bParam4);
  }
  
  int func_109(int iParam0)
  {
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		if ((VEHICLE::IS_VEHICLE_STUCK_TIMER_UP(iParam0, 0, 7000) || VEHICLE::IS_VEHICLE_STUCK_TIMER_UP(iParam0, 1, 7000)) || VEHICLE::IS_VEHICLE_STUCK_TIMER_UP(iParam0, 2, 7000))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_110(char* sParam0, int iParam1, int iParam2)
  {
  	iParam2 = iParam2;
  	HUD::BEGIN_TEXT_COMMAND_PRINT(sParam0);
  	HUD::END_TEXT_COMMAND_PRINT(iParam1, true);
  }
  
  void func_111(struct<3> Param0, float fParam3, int iParam4, int iParam5)
  {
  	struct<3> Var0;
  	var uVar3;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(Global_102858.f_4))
  	{
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(Global_102858.f_4, false))
  		{
  			if (func_164(24) != Global_102858.f_4)
  			{
  				if (iParam4 == 1)
  				{
  					if (func_161(ENTITY::GET_ENTITY_COORDS(Global_102858.f_4, true), iParam5, &Var0, &uVar3))
  					{
  						Param0 = { Var0 };
  						fParam3 = uVar3;
  					}
  				}
  				func_112(Global_102858.f_4, Param0, fParam3, 24, 0);
  			}
  		}
  	}
  }
  
  void func_112(int iParam0, struct<3> Param1, float fParam4, int iParam5, bool bParam6)
  {
  	struct<60> Var0;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(iParam0) && VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		if (iParam5 != 24 && iParam5 != 25)
  		{
  			return;
  		}
  		if (iParam5 == 24)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Global_76066.f_484[25]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Global_76066.f_484[25], false))
  			{
  				if (Global_76066.f_484[25] == iParam0)
  				{
  					return;
  				}
  			}
  		}
  		if (!bParam6)
  		{
  			if ((VEHICLE::IS_BIG_VEHICLE(iParam0) || ENTITY::GET_ENTITY_MODEL(iParam0) == joaat("bus")) || ENTITY::GET_ENTITY_MODEL(iParam0) == joaat("tourbus"))
  			{
  				return;
  			}
  		}
  		func_160(iParam5);
  		Var0.f_9 = 49;
  		Var0.f_59 = 2;
  		func_155(iParam0, &Var0);
  		if (func_154(Param1, 0f, 0f, 0f, 0))
  		{
  			Param1 = { ENTITY::GET_ENTITY_COORDS(iParam0, true) };
  			fParam4 = ENTITY::GET_ENTITY_HEADING(iParam0);
  		}
  		if (iParam5 == 24)
  		{
  			if (MISC::GET_HASH_KEY(SCRIPT::GET_THIS_SCRIPT_NAME()) != joaat("vehicle_gen_controller"))
  			{
  				Global_77054 = MISC::GET_HASH_KEY(SCRIPT::GET_THIS_SCRIPT_NAME());
  			}
  		}
  		func_147(iParam5, &Var0, Param1, fParam4, func_153(iParam0));
  		func_113(iParam5, iParam0, 0);
  	}
  }
  
  void func_113(int iParam0, int iParam1, int iParam2)
  {
  	int iVar0;
  	
  	if (iParam0 == -1)
  	{
  		return;
  	}
  	if (!func_143(&(Global_76066.f_555[0 /*21*/]), iParam0))
  	{
  		return;
  	}
  	if (!MISC::IS_BIT_SET(Global_76066.f_555[0 /*21*/].f_9, 12) && !MISC::IS_BIT_SET(Global_76066.f_555[0 /*21*/].f_9, 10))
  	{
  		if (Global_76066.f_555[0 /*21*/].f_4 != ENTITY::GET_ENTITY_MODEL(iParam1))
  		{
  			return;
  		}
  	}
  	if (Global_76973 != -1 && Global_76973 != iParam0)
  	{
  		return;
  	}
  	if (ENTITY::DOES_ENTITY_EXIST(iParam1))
  	{
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam1, false))
  		{
  			if (!ENTITY::IS_ENTITY_A_MISSION_ENTITY(iParam1))
  			{
  				ENTITY::SET_ENTITY_AS_MISSION_ENTITY(iParam1, true, true);
  			}
  			if (iParam0 == 24)
  			{
  				Global_112293.f_32747.f_4801 = func_132();
  			}
  			if (iParam1 != Global_76066.f_139[iParam0])
  			{
  				if (iParam0 == 24)
  				{
  					iVar0 = func_164(iParam0);
  					if ((ENTITY::DOES_ENTITY_EXIST(iVar0) && VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false)) && iParam1 != iVar0)
  					{
  						func_114(iVar0, 145);
  					}
  				}
  				Global_76972 = iParam1;
  				Global_76973 = iParam0;
  				Global_76974 = iParam2;
  			}
  		}
  	}
  }
  
  void func_114(int iParam0, int iParam1)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	
  	if (!func_115(iParam0))
  	{
  		return;
  	}
  	if ((iParam1 != 0 && iParam1 != 1) && iParam1 != 2)
  	{
  		iVar0 = VEHICLE::GET_PED_IN_VEHICLE_SEAT(iParam0, -1, false);
  		if (!ENTITY::DOES_ENTITY_EXIST(iVar0))
  		{
  			iVar0 = VEHICLE::GET_LAST_PED_IN_VEHICLE_SEAT(iParam0, -1);
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(iVar0) && !PED::IS_PED_INJURED(iVar0))
  		{
  			if (ENTITY::GET_ENTITY_MODEL(iVar0) == joaat("player_zero"))
  			{
  				iParam1 = 0;
  			}
  			else if (ENTITY::GET_ENTITY_MODEL(iVar0) == joaat("player_one"))
  			{
  				iParam1 = 1;
  			}
  			else if (ENTITY::GET_ENTITY_MODEL(iVar0) == joaat("player_two"))
  			{
  				iParam1 = 2;
  			}
  		}
  		if ((iParam1 != 0 && iParam1 != 1) && iParam1 != 2)
  		{
  			iParam1 = Global_112293.f_2361.f_539.f_4321;
  		}
  	}
  	iVar1 = 0;
  	while (iVar1 < 3)
  	{
  		iVar2 = 0;
  		while (iVar2 < 2)
  		{
  			if (ENTITY::GET_ENTITY_MODEL(iParam0) == Global_112293.f_32747.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_66)
  			{
  				if (!MISC::IS_STRING_NULL_OR_EMPTY(&(Global_112293.f_32747.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_1)))
  				{
  					if (MISC::ARE_STRINGS_EQUAL(VEHICLE::GET_VEHICLE_NUMBER_PLATE_TEXT(iParam0), &(Global_112293.f_32747.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_1)))
  					{
  						Global_112293.f_32747.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_66 = 0;
  						Global_112293.f_32747.f_5592[iVar1] = iVar2;
  					}
  				}
  			}
  			iVar2++;
  		}
  		iVar1++;
  	}
  	iVar1 = 0;
  	while (iVar1 < 3)
  	{
  		if (ENTITY::GET_ENTITY_MODEL(iParam0) == Global_112293.f_32747.f_5600[iVar1 /*78*/].f_66)
  		{
  			if (!MISC::IS_STRING_NULL_OR_EMPTY(&(Global_112293.f_32747.f_5600[iVar1 /*78*/].f_1)))
  			{
  				if (MISC::ARE_STRINGS_EQUAL(VEHICLE::GET_VEHICLE_NUMBER_PLATE_TEXT(iParam0), &(Global_112293.f_32747.f_5600[iVar1 /*78*/].f_1)))
  				{
  					Global_112293.f_32747.f_5600[iVar1 /*78*/].f_66 = 0;
  				}
  			}
  		}
  		iVar1++;
  	}
  	Global_112293.f_32747.f_5590 = iParam1;
  	Global_76971 = iParam0;
  	Global_112293.f_32747.f_5588 = 1;
  	func_155(iParam0, &(Global_112293.f_32747.f_5510));
  }
  
  int func_115(int iParam0)
  {
  	if ((((((((((!ENTITY::DOES_ENTITY_EXIST(iParam0) || !VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false)) || func_130(iParam0, 0, 0)) || func_130(iParam0, 1, 0)) || func_130(iParam0, 2, 0)) || func_153(iParam0) != 145) || func_129(iParam0)) || func_128(iParam0)) || func_127(iParam0)) || func_126(iParam0)) || !func_116(ENTITY::GET_ENTITY_MODEL(iParam0)))
  	{
  		if (func_128(iParam0))
  		{
  		}
  		if (func_128(iParam0))
  		{
  		}
  		if (func_130(iParam0, 0, 0))
  		{
  		}
  		if (func_130(iParam0, 1, 0))
  		{
  		}
  		if (func_130(iParam0, 2, 0))
  		{
  		}
  		if (func_153(iParam0) != 145)
  		{
  		}
  		return 0;
  	}
  	return 1;
  }
  
  int func_116(int iParam0)
  {
  	if (iParam0 == 0)
  	{
  		return 0;
  	}
  	if (!func_117(iParam0, 0))
  	{
  		return 0;
  	}
  	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 0;
  	}
  	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 joaat("firetruk"):
  		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 0;
  			break;
  	}
  	return 1;
  }
  
  int func_117(int iParam0, bool bParam1)
  {
  	int iVar0;
  	struct<2> Var1;
  	
  	if (iParam0 == 0)
  	{
  		return 0;
  	}
  	if (!STREAMING::IS_MODEL_A_VEHICLE(iParam0))
  	{
  		return 0;
  	}
  	if (((((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("stalion2") && !NETWORK::NETWORK_IS_GAME_IN_PROGRESS()))
  	{
  		if (!func_125())
  		{
  			return 0;
  		}
  	}
  	else
  	{
  		iVar0 = 0;
  		while (iVar0 < FILES::GET_NUM_DLC_VEHICLES())
  		{
  			if (FILES::GET_DLC_VEHICLE_DATA(iVar0, &Var1))
  			{
  				if (iParam0 == Var1.f_1)
  				{
  					if (FILES::IS_CONTENT_ITEM_LOCKED(Var1))
  					{
  						return 0;
  					}
  				}
  			}
  			iVar0++;
  		}
  	}
  	if (iParam0 == joaat("blimp"))
  	{
  		if ((((!func_124() && !func_123()) && !func_122()) && !func_121()) && !func_125())
  		{
  			return 0;
  		}
  	}
  	if ((iParam0 == joaat("hotknife") || iParam0 == joaat("carbonrs")) || iParam0 == joaat("khamelion"))
  	{
  		if ((MISC::IS_DURANGO_VERSION() || MISC::IS_PC_VERSION()) || MISC::IS_ORBIS_VERSION())
  		{
  		}
  		else if (!func_122())
  		{
  			return 0;
  		}
  	}
  	if (bParam1)
  	{
  		if (!func_120(iParam0))
  		{
  			return 0;
  		}
  	}
  	if (!func_118(iParam0))
  	{
  		return 0;
  	}
  	return 1;
  }
  
  int func_118(int iParam0)
  {
  	int iVar0;
  	var uVar1;
  	char cVar2[64];
  	
  	if (!func_119())
  	{
  		return 1;
  	}
  	NETSHOPPING::_NET_GAMESERVER_GET_TRANSACTION_MANAGER_DATA(&iVar0, &uVar1);
  	if (iVar0 == 4)
  	{
  		return 1;
  	}
  	switch (iParam0)
  	{
  		case joaat("dune4"):
  			StringCopy(&cVar2, "VE_DUNE4_t0_v3", 64);
  			break;
  		
  		case joaat("voltic2"):
  			StringCopy(&cVar2, "VE_VOLTIC2_t0_v3", 64);
  			break;
  		
  		case joaat("ruiner2"):
  			StringCopy(&cVar2, "VE_RUINER2_t0_v3", 64);
  			break;
  		
  		case joaat("phantom2"):
  			StringCopy(&cVar2, "VE_PHANTOM2_t0_v3", 64);
  			break;
  		
  		case joaat("technical2"):
  			StringCopy(&cVar2, "VE_TECHNICAL2_t0_v3", 64);
  			break;
  		
  		case joaat("boxville5"):
  			StringCopy(&cVar2, "VE_BOXVILLE5_t0_v3", 64);
  			break;
  		
  		case joaat("wastelander"):
  			StringCopy(&cVar2, "VE_WASTELANDER_t0_v3", 64);
  			break;
  		
  		case joaat("blazer5"):
  			StringCopy(&cVar2, "VE_BLAZER5_t0_v3", 64);
  			break;
  		
  		default:
  			return 1;
  			break;
  	}
  	if (!NETSHOPPING::_NET_GAMESERVER_CATALOG_ITEM_EXISTS(&cVar2))
  	{
  		return 0;
  	}
  	return 1;
  }
  
  int func_119()
  {
  	if (MISC::IS_PC_VERSION())
  	{
  		return NETSHOPPING::_NET_GAMESERVER_USE_SERVER_TRANSACTIONS();
  	}
  	return 0;
  }
  
  int func_120(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (Global_2518293)
  	{
  		return 1;
  	}
  	iVar0 = 1;
  	iVar1 = NETWORK::GET_CLOUD_TIME_AS_INT();
  	if (iParam0 == joaat("btype3"))
  	{
  		if ((!Global_262145.f_6770 && !Global_262145.f_13100) && iVar1 < Global_262145.f_13101)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("faction3"))
  	{
  		if (!Global_262145.f_14400 && iVar1 < Global_262145.f_14412)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("virgo3") || iParam0 == joaat("virgo2"))
  	{
  		if (!Global_262145.f_14396 && iVar1 < Global_262145.f_14408)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("sabregt2"))
  	{
  		if (!Global_262145.f_14397 && iVar1 < Global_262145.f_14409)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tornado5"))
  	{
  		if (!Global_262145.f_14398 && iVar1 < Global_262145.f_14410)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("minivan2"))
  	{
  		if (!Global_262145.f_14399 && iVar1 < Global_262145.f_14411)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("slamvan3"))
  	{
  		if (!Global_262145.f_14401 && iVar1 < Global_262145.f_14413)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("prototipo"))
  	{
  		if (!Global_262145.f_14402 && iVar1 < Global_262145.f_14405)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("seven70"))
  	{
  		if (!Global_262145.f_14403 && iVar1 < Global_262145.f_14406)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("pfister811"))
  	{
  		if (!Global_262145.f_14404 && iVar1 < Global_262145.f_14407)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("bf400"))
  	{
  		if (!Global_262145.f_17032 && iVar1 < Global_262145.f_16997)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("brioso"))
  	{
  		if (!Global_262145.f_17027 && iVar1 < Global_262145.f_16992)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("cliffhanger"))
  	{
  		if (!Global_262145.f_17031 && iVar1 < Global_262145.f_16996)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("contender"))
  	{
  		if (!Global_262145.f_17030 && iVar1 < Global_262145.f_16995)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("le7b"))
  	{
  		if (!Global_262145.f_17024 && iVar1 < Global_262145.f_16989)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("omnis"))
  	{
  		if (!Global_262145.f_17025 && iVar1 < Global_262145.f_16990)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("trophytruck"))
  	{
  		if (!Global_262145.f_17028 && iVar1 < Global_262145.f_16993)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("trophytruck2"))
  	{
  		if (!Global_262145.f_17029 && iVar1 < Global_262145.f_16994)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tropos"))
  	{
  		if (!Global_262145.f_17026 && iVar1 < Global_262145.f_16991)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("gargoyle"))
  	{
  		if (!Global_262145.f_17034 && iVar1 < Global_262145.f_16999)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("rallytruck"))
  	{
  		if (!Global_262145.f_17035 && iVar1 < Global_262145.f_17000)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tampa2"))
  	{
  		if (!Global_262145.f_17023 && iVar1 < Global_262145.f_16988)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tyrus"))
  	{
  		if (!Global_262145.f_17022 && iVar1 < Global_262145.f_16987)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("sheava"))
  	{
  		if (!Global_262145.f_17021 && iVar1 < Global_262145.f_16986)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("lynx"))
  	{
  		if (!Global_262145.f_17033 && iVar1 < Global_262145.f_16998)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("stalion2"))
  	{
  		if (!Global_262145.f_17036 && iVar1 < Global_262145.f_17001)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("gauntlet2"))
  	{
  		if (!Global_262145.f_17037 && iVar1 < Global_262145.f_17002)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("dominator2"))
  	{
  		if (!Global_262145.f_17038 && iVar1 < Global_262145.f_17003)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("buffalo3"))
  	{
  		if (!Global_262145.f_17039 && iVar1 < Global_262145.f_17004)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("defiler"))
  	{
  		if (!Global_262145.f_17186 && iVar1 < Global_262145.f_17208)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("nightblade"))
  	{
  		if (!Global_262145.f_17187 && iVar1 < Global_262145.f_17209)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("zombiea"))
  	{
  		if (!Global_262145.f_17188 && iVar1 < Global_262145.f_17210)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("esskey"))
  	{
  		if (!Global_262145.f_17189 && iVar1 < Global_262145.f_17211)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("avarus"))
  	{
  		if (!Global_262145.f_17190 && iVar1 < Global_262145.f_17212)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("zombieb"))
  	{
  		if (!Global_262145.f_17191 && iVar1 < Global_262145.f_17213)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("hakuchou2"))
  	{
  		if (!Global_262145.f_17193 && iVar1 < Global_262145.f_17214)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("vortex"))
  	{
  		if (!Global_262145.f_17194 && iVar1 < Global_262145.f_17215)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("shotaro"))
  	{
  		if (!Global_262145.f_17195 && iVar1 < Global_262145.f_17216)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("chimera"))
  	{
  		if (!Global_262145.f_17196 && iVar1 < Global_262145.f_17217)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("raptor"))
  	{
  		if (!Global_262145.f_17197 && iVar1 < Global_262145.f_17218)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("daemon2"))
  	{
  		if (!Global_262145.f_17198 && iVar1 < Global_262145.f_17219)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("blazer4"))
  	{
  		if (!Global_262145.f_17199 && iVar1 < Global_262145.f_17220)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tornado6"))
  	{
  		if (!Global_262145.f_17205 && iVar1 < Global_262145.f_17227)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("youga2"))
  	{
  		if (!Global_262145.f_17202 && iVar1 < Global_262145.f_17223)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("wolfsbane"))
  	{
  		if (!Global_262145.f_17203 && iVar1 < Global_262145.f_17224)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("faggio3"))
  	{
  		if (!Global_262145.f_17204 && iVar1 < Global_262145.f_17225)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("faggio"))
  	{
  		if (!Global_262145.f_17192 && iVar1 < Global_262145.f_17226)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("bagger"))
  	{
  		if (!Global_262145.f_17206 && iVar1 < Global_262145.f_17228)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("sanctus"))
  	{
  		if (!Global_262145.f_17200 && iVar1 < Global_262145.f_17221)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("manchez"))
  	{
  		if (!Global_262145.f_17201 && iVar1 < Global_262145.f_17222)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("ratbike"))
  	{
  		if (!Global_262145.f_17207 && iVar1 < Global_262145.f_17229)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("voltic2"))
  	{
  		if (!Global_262145.f_18838 && iVar1 < Global_262145.f_18935)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("ruiner2"))
  	{
  		if (!Global_262145.f_18839 && iVar1 < Global_262145.f_18936)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("dune4"))
  	{
  		if (!Global_262145.f_18840 && iVar1 < Global_262145.f_18937)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("dune5"))
  	{
  		if (!Global_262145.f_18841 && iVar1 < Global_262145.f_18938)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("phantom2"))
  	{
  		if (!Global_262145.f_18842 && iVar1 < Global_262145.f_18939)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("technical2"))
  	{
  		if (!Global_262145.f_18843 && iVar1 < Global_262145.f_18940)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("boxville5"))
  	{
  		if (!Global_262145.f_18844 && iVar1 < Global_262145.f_18941)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("wastelander"))
  	{
  		if (!Global_262145.f_18845 && iVar1 < Global_262145.f_18942)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("blazer5"))
  	{
  		if (!Global_262145.f_18846 && iVar1 < Global_262145.f_18943)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("comet2"))
  	{
  		if (!Global_262145.f_18847 && iVar1 < Global_262145.f_18944)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("comet3"))
  	{
  		if (!Global_262145.f_18848 && iVar1 < Global_262145.f_18945)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("diablous"))
  	{
  		if (!Global_262145.f_18849 && iVar1 < Global_262145.f_18946)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("diablous2"))
  	{
  		if (!Global_262145.f_18850 && iVar1 < Global_262145.f_18947)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("elegy"))
  	{
  		if (!Global_262145.f_18851 && iVar1 < Global_262145.f_18948)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("elegy2"))
  	{
  		if (!Global_262145.f_18852 && iVar1 < Global_262145.f_18949)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("fcr"))
  	{
  		if (!Global_262145.f_18853 && iVar1 < Global_262145.f_18950)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("fcr2"))
  	{
  		if (!Global_262145.f_18854 && iVar1 < Global_262145.f_18951)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("italigtb"))
  	{
  		if (!Global_262145.f_18855 && iVar1 < Global_262145.f_18952)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("italigtb2"))
  	{
  		if (!Global_262145.f_18856 && iVar1 < Global_262145.f_18953)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("nero"))
  	{
  		if (!Global_262145.f_18857 && iVar1 < Global_262145.f_18954)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("nero2"))
  	{
  		if (!Global_262145.f_18858 && iVar1 < Global_262145.f_18955)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("penetrator"))
  	{
  		if (!Global_262145.f_18859 && iVar1 < Global_262145.f_18956)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("specter"))
  	{
  		if (!Global_262145.f_18860 && iVar1 < Global_262145.f_18957)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("specter2"))
  	{
  		if (!Global_262145.f_18861 && iVar1 < Global_262145.f_18958)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tempesta"))
  	{
  		if (!Global_262145.f_18862 && iVar1 < Global_262145.f_18959)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("gp1"))
  	{
  		if (!Global_262145.f_19919 && iVar1 < Global_262145.f_19915)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("infernus2"))
  	{
  		if (!Global_262145.f_19920 && iVar1 < Global_262145.f_19916)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("ruston"))
  	{
  		if (!Global_262145.f_19921 && iVar1 < Global_262145.f_19917)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("turismo2"))
  	{
  		if (!Global_262145.f_19922 && iVar1 < Global_262145.f_19918)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("xa21"))
  	{
  		if (!Global_262145.f_20800 && iVar1 < Global_262145.f_20808)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("cheetah2"))
  	{
  		if (!Global_262145.f_20801 && iVar1 < Global_262145.f_20809)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("torero"))
  	{
  		if (!Global_262145.f_20802 && iVar1 < Global_262145.f_20810)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("vagner"))
  	{
  		if (!Global_262145.f_20803 && iVar1 < Global_262145.f_20811)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("ardent"))
  	{
  		if (!Global_262145.f_20804 && iVar1 < Global_262145.f_20812)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("nightshark"))
  	{
  		if (!Global_262145.f_20805 && iVar1 < Global_262145.f_20813)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("microlight"))
  	{
  		if (!Global_262145.f_21580 && iVar1 < Global_262145.f_21600)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("mogul"))
  	{
  		if (!Global_262145.f_21592 && iVar1 < Global_262145.f_21612)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("rogue"))
  	{
  		if (!Global_262145.f_21583 && iVar1 < Global_262145.f_21603)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("starling"))
  	{
  		if (!Global_262145.f_21593 && iVar1 < Global_262145.f_21613)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("seabreeze"))
  	{
  		if (!Global_262145.f_21581 && iVar1 < Global_262145.f_21601)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tula"))
  	{
  		if (!Global_262145.f_21597 && iVar1 < Global_262145.f_21617)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("pyro"))
  	{
  		if (!Global_262145.f_21595 && iVar1 < Global_262145.f_21615)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("molotok"))
  	{
  		if (!Global_262145.f_21596 && iVar1 < Global_262145.f_21616)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("nokota"))
  	{
  		if (!Global_262145.f_21591 && iVar1 < Global_262145.f_21611)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("bombushka"))
  	{
  		if (!Global_262145.f_21598 && iVar1 < Global_262145.f_21618)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("hunter"))
  	{
  		if (!Global_262145.f_21594 && iVar1 < Global_262145.f_21614)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("havok"))
  	{
  		if (!Global_262145.f_21590 && iVar1 < Global_262145.f_21610)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("howard"))
  	{
  		if (!Global_262145.f_21582 && iVar1 < Global_262145.f_21602)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("alphaz1"))
  	{
  		if (!Global_262145.f_21584 && iVar1 < Global_262145.f_21604)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("cyclone"))
  	{
  		if (!Global_262145.f_21585 && iVar1 < Global_262145.f_21605)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("visione"))
  	{
  		if (!Global_262145.f_21586 && iVar1 < Global_262145.f_21606)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("vigilante"))
  	{
  		if (!Global_262145.f_21587 && iVar1 < Global_262145.f_21607)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("retinue"))
  	{
  		if (!Global_262145.f_21588 && iVar1 < Global_262145.f_21608)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("rapidgt3"))
  	{
  		if (!Global_262145.f_21589 && iVar1 < Global_262145.f_21609)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("deluxo"))
  	{
  		if (!Global_262145.f_22541 && iVar1 < Global_262145.f_22569)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("stromberg"))
  	{
  		if (!Global_262145.f_22542 && iVar1 < Global_262145.f_22570)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("riot2"))
  	{
  		if (!Global_262145.f_22543 && iVar1 < Global_262145.f_22571)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("chernobog"))
  	{
  		if (!Global_262145.f_22544 && iVar1 < Global_262145.f_22572)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("khanjali"))
  	{
  		if (!Global_262145.f_22545 && iVar1 < Global_262145.f_22573)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("akula"))
  	{
  		if (!Global_262145.f_22546 && iVar1 < Global_262145.f_22574)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("thruster"))
  	{
  		if (!Global_262145.f_22547 && iVar1 < Global_262145.f_22575)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("barrage"))
  	{
  		if (!Global_262145.f_22548 && iVar1 < Global_262145.f_22576)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("volatol"))
  	{
  		if (!Global_262145.f_22549 && iVar1 < Global_262145.f_22577)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("comet4"))
  	{
  		if (!Global_262145.f_22550 && iVar1 < Global_262145.f_22578)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("neon"))
  	{
  		if (!Global_262145.f_22551 && iVar1 < Global_262145.f_22579)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("streiter"))
  	{
  		if (!Global_262145.f_22552 && iVar1 < Global_262145.f_22580)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("sentinel3"))
  	{
  		if (!Global_262145.f_22553 && iVar1 < Global_262145.f_22581)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("yosemite"))
  	{
  		if (!Global_262145.f_22554 && iVar1 < Global_262145.f_22582)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("sc1"))
  	{
  		if (!Global_262145.f_22555 && iVar1 < Global_262145.f_22583)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("autarch"))
  	{
  		if (!Global_262145.f_22556 && iVar1 < Global_262145.f_22584)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("gt500"))
  	{
  		if (!Global_262145.f_22557 && iVar1 < Global_262145.f_22585)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("hustler"))
  	{
  		if (!Global_262145.f_22558 && iVar1 < Global_262145.f_22586)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("revolter"))
  	{
  		if (!Global_262145.f_22559 && iVar1 < Global_262145.f_22587)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("pariah"))
  	{
  		if (!Global_262145.f_22560 && iVar1 < Global_262145.f_22588)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("raiden"))
  	{
  		if (!Global_262145.f_22561 && iVar1 < Global_262145.f_22589)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("savestra"))
  	{
  		if (!Global_262145.f_22562 && iVar1 < Global_262145.f_22590)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("riata"))
  	{
  		if (!Global_262145.f_22563 && iVar1 < Global_262145.f_22591)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("hermes"))
  	{
  		if (!Global_262145.f_22564 && iVar1 < Global_262145.f_22592)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("comet5"))
  	{
  		if (!Global_262145.f_22565 && iVar1 < Global_262145.f_22593)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("z190"))
  	{
  		if (!Global_262145.f_22566 && iVar1 < Global_262145.f_22594)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("viseris"))
  	{
  		if (!Global_262145.f_22567 && iVar1 < Global_262145.f_22595)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("kamacho"))
  	{
  		if (!Global_262145.f_22568 && iVar1 < Global_262145.f_22596)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("gb200"))
  	{
  		if (!Global_262145.f_23761 && iVar1 < Global_262145.f_23777)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("fagaloa"))
  	{
  		if (!Global_262145.f_23762 && iVar1 < Global_262145.f_23778)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("ellie"))
  	{
  		if (!Global_262145.f_23766 && iVar1 < Global_262145.f_23782)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("issi3"))
  	{
  		if (!Global_262145.f_23769 && iVar1 < Global_262145.f_23785)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("michelli"))
  	{
  		if (!Global_262145.f_23774 && iVar1 < Global_262145.f_23790)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("flashgt"))
  	{
  		if (!Global_262145.f_23768 && iVar1 < Global_262145.f_23784)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("hotring"))
  	{
  		if (!Global_262145.f_23760 && iVar1 < Global_262145.f_23776)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tezeract"))
  	{
  		if (!Global_262145.f_23767 && iVar1 < Global_262145.f_23783)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tyrant"))
  	{
  		if (!Global_262145.f_23773 && iVar1 < Global_262145.f_23789)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("dominator3"))
  	{
  		if (!Global_262145.f_23772 && iVar1 < Global_262145.f_23788)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("taipan"))
  	{
  		if (!Global_262145.f_23763 && iVar1 < Global_262145.f_23779)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("entity2"))
  	{
  		if (!Global_262145.f_23765 && iVar1 < Global_262145.f_23781)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("jester3"))
  	{
  		if (!Global_262145.f_23775 && iVar1 < Global_262145.f_23791)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("cheburek"))
  	{
  		if (!Global_262145.f_23771 && iVar1 < Global_262145.f_23787)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("caracara"))
  	{
  		if (!Global_262145.f_23764 && iVar1 < Global_262145.f_23780)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("seasparrow"))
  	{
  		if (!Global_262145.f_23770 && iVar1 < Global_262145.f_23786)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("terbyte"))
  	{
  		if (!Global_262145.f_23851 && iVar1 < Global_262145.f_23838)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("pbus2"))
  	{
  		if (!Global_262145.f_23852 && iVar1 < Global_262145.f_23839)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("mule4"))
  	{
  		if (!Global_262145.f_23857 && iVar1 < Global_262145.f_23844)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("pounder2"))
  	{
  		if (!Global_262145.f_23856 && iVar1 < Global_262145.f_23843)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("swinger"))
  	{
  		if (!Global_262145.f_23854 && iVar1 < Global_262145.f_23841)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("menacer"))
  	{
  		if (!Global_262145.f_23860 && iVar1 < Global_262145.f_23847)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("scramjet"))
  	{
  		if (!Global_262145.f_23862 && iVar1 < Global_262145.f_23849)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("strikeforce"))
  	{
  		if (!Global_262145.f_23863 && iVar1 < Global_262145.f_23850)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("oppressor2"))
  	{
  		if (!Global_262145.f_23861 && iVar1 < Global_262145.f_23848)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("patriot2"))
  	{
  		if (!Global_262145.f_23853 && iVar1 < Global_262145.f_23840)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("stafford"))
  	{
  		if (!Global_262145.f_23855 && iVar1 < Global_262145.f_23842)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("freecrawler"))
  	{
  		if (!Global_262145.f_23859 && iVar1 < Global_262145.f_23846)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("blimp3"))
  	{
  		if (!Global_262145.f_23858 && iVar1 < Global_262145.f_23845)
  		{
  			iVar0 = 0;
  		}
  	}
  	if (iParam0 == joaat("monster3"))
  	{
  	}
  	else if (iParam0 == joaat("cerberus"))
  	{
  	}
  	else if (iParam0 == joaat("cerberus2"))
  	{
  	}
  	else if (iParam0 == joaat("cerberus3"))
  	{
  	}
  	else if (iParam0 == joaat("brutus"))
  	{
  	}
  	else if (iParam0 == joaat("brutus2"))
  	{
  	}
  	else if (iParam0 == joaat("brutus3"))
  	{
  	}
  	else if (iParam0 == joaat("scarab"))
  	{
  	}
  	else if (iParam0 == joaat("scarab2"))
  	{
  	}
  	else if (iParam0 == joaat("scarab3"))
  	{
  	}
  	else if (iParam0 == joaat("imperator"))
  	{
  	}
  	else if (iParam0 == joaat("imperator2"))
  	{
  	}
  	else if (iParam0 == joaat("imperator3"))
  	{
  	}
  	else if (iParam0 == joaat("zr380"))
  	{
  	}
  	else if (iParam0 == joaat("zr3802"))
  	{
  	}
  	else if (iParam0 == joaat("zr3803"))
  	{
  	}
  	else if (iParam0 == joaat("impaler"))
  	{
  	}
  	else if (iParam0 == joaat("deveste"))
  	{
  		if (!Global_262145.f_26267 && iVar1 < Global_262145.f_26269)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("toros"))
  	{
  		if (!Global_262145.f_25280 && iVar1 < Global_262145.f_25273)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("clique"))
  	{
  		if (!Global_262145.f_25281 && iVar1 < Global_262145.f_25274)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("italigto"))
  	{
  		if (!Global_262145.f_25282 && iVar1 < Global_262145.f_25275)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("deviant"))
  	{
  		if (!Global_262145.f_25283 && iVar1 < Global_262145.f_25276)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("vamos"))
  	{
  		if (!Global_262145.f_26268 && iVar1 < Global_262145.f_26270)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tulip"))
  	{
  		if (!Global_262145.f_25284 && iVar1 < Global_262145.f_25277)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("schlagen"))
  	{
  		if (!Global_262145.f_25285 && iVar1 < Global_262145.f_25278)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("rcbandito"))
  	{
  		if (!Global_262145.f_25286 && iVar1 < Global_262145.f_25279)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("thrax"))
  	{
  		if (!Global_262145.f_25291 && iVar1 < Global_262145.f_25312)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("drafter"))
  	{
  		if (!Global_262145.f_25292 && iVar1 < Global_262145.f_25313)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("locust"))
  	{
  		if (!Global_262145.f_25293 && iVar1 < Global_262145.f_25314)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("novak"))
  	{
  		if (!Global_262145.f_25294 && iVar1 < Global_262145.f_25315)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("zorrusso"))
  	{
  		if (!Global_262145.f_25295 && iVar1 < Global_262145.f_25316)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("gauntlet3"))
  	{
  		if (!Global_262145.f_25296 && iVar1 < Global_262145.f_25317)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("issi7"))
  	{
  		if (!Global_262145.f_25297 && iVar1 < Global_262145.f_25318)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("zion3"))
  	{
  		if (!Global_262145.f_25298 && iVar1 < Global_262145.f_25319)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("nebula"))
  	{
  		if (!Global_262145.f_25299 && iVar1 < Global_262145.f_25320)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("hellion"))
  	{
  		if (!Global_262145.f_25300 && iVar1 < Global_262145.f_25321)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("dynasty"))
  	{
  		if (!Global_262145.f_25301 && iVar1 < Global_262145.f_25322)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("rrocket"))
  	{
  		if (!Global_262145.f_25302 && iVar1 < Global_262145.f_25323)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("peyote2"))
  	{
  		if (!Global_262145.f_25303 && iVar1 < Global_262145.f_25324)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("gauntlet4"))
  	{
  		if (!Global_262145.f_25304 && iVar1 < Global_262145.f_25325)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("caracara2"))
  	{
  		if (!Global_262145.f_25305 && iVar1 < Global_262145.f_25326)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("jugular"))
  	{
  		if (!Global_262145.f_25306 && iVar1 < Global_262145.f_25327)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("s80"))
  	{
  		if (!Global_262145.f_25307 && iVar1 < Global_262145.f_25328)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("krieger"))
  	{
  		if (!Global_262145.f_25308 && iVar1 < Global_262145.f_25329)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("emerus"))
  	{
  		if (!Global_262145.f_25309 && iVar1 < Global_262145.f_25330)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("neo"))
  	{
  		if (!Global_262145.f_25310 && iVar1 < Global_262145.f_25331)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("paragon"))
  	{
  		if (!Global_262145.f_25311 && iVar1 < Global_262145.f_25332)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("asbo"))
  	{
  		if (!Global_262145.f_28111 && iVar1 < Global_262145.f_28132)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("kanjo"))
  	{
  		if (!Global_262145.f_28112 && iVar1 < Global_262145.f_28133)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("everon"))
  	{
  		if (!Global_262145.f_28113 && iVar1 < Global_262145.f_28134)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("retinue2"))
  	{
  		if (!Global_262145.f_28114 && iVar1 < Global_262145.f_28135)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("yosemite2"))
  	{
  		if (!Global_262145.f_28115 && iVar1 < Global_262145.f_28136)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("sugoi"))
  	{
  		if (!Global_262145.f_28116 && iVar1 < Global_262145.f_28137)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("sultan2"))
  	{
  		if (!Global_262145.f_28117 && iVar1 < Global_262145.f_28138)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("outlaw"))
  	{
  		if (!Global_262145.f_28118 && iVar1 < Global_262145.f_28139)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("vagrant"))
  	{
  		if (!Global_262145.f_28119 && iVar1 < Global_262145.f_28140)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("komoda"))
  	{
  		if (!Global_262145.f_28120 && iVar1 < Global_262145.f_28141)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("stryder"))
  	{
  		if (!Global_262145.f_28121 && iVar1 < Global_262145.f_28142)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("furia"))
  	{
  		if (!Global_262145.f_28122 && iVar1 < Global_262145.f_28143)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("zhaba"))
  	{
  		if (!Global_262145.f_28123 && iVar1 < Global_262145.f_28144)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("jb7002"))
  	{
  		if (!Global_262145.f_28124 && iVar1 < Global_262145.f_28145)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("firetruk"))
  	{
  		if (!Global_262145.f_28125 && iVar1 < Global_262145.f_28146)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("burrito2"))
  	{
  		if (!Global_262145.f_28126 && iVar1 < Global_262145.f_28147)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("boxville"))
  	{
  		if (!Global_262145.f_28127 && iVar1 < Global_262145.f_28148)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("stockade"))
  	{
  		if (!Global_262145.f_28128 && iVar1 < Global_262145.f_28149)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("minitank"))
  	{
  		if (!Global_262145.f_28129 && iVar1 < Global_262145.f_28150)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("lguard"))
  	{
  		if (!Global_262145.f_28130 && iVar1 < Global_262145.f_28151)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("blazer2"))
  	{
  		if (!Global_262145.f_28131 && iVar1 < Global_262145.f_28152)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("formula"))
  	{
  		if ((!Global_262145.f_28154 && iVar1 < Global_262145.f_28155) && !Global_262145.f_28109)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("formula2"))
  	{
  		if ((!Global_262145.f_28157 && iVar1 < Global_262145.f_28158) && !Global_262145.f_28110)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("imorgon"))
  	{
  		if (!Global_262145.f_28162 && iVar1 < Global_262145.f_28165)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("rebla"))
  	{
  		if (!Global_262145.f_28163 && iVar1 < Global_262145.f_28166)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("vstr"))
  	{
  		if (!Global_262145.f_28164 && iVar1 < Global_262145.f_28167)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("gauntlet5"))
  	{
  		if (!Global_262145.f_29178 && iVar1 < Global_262145.f_28843)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("club"))
  	{
  		if (!Global_262145.f_28829 && iVar1 < Global_262145.f_28850)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("dukes3"))
  	{
  		if (!Global_262145.f_28830 && iVar1 < Global_262145.f_28836)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("yosemite3"))
  	{
  		if (!Global_262145.f_29176 && iVar1 < Global_262145.f_28844)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("peyote3"))
  	{
  		if (!Global_262145.f_29177 && iVar1 < Global_262145.f_28845)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("glendale2"))
  	{
  		if (!Global_262145.f_28823 && iVar1 < Global_262145.f_28842)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("penumbra2"))
  	{
  		if (!Global_262145.f_28824 && iVar1 < Global_262145.f_28851)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("landstalker2"))
  	{
  		if (!Global_262145.f_28825 && iVar1 < Global_262145.f_28841)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("seminole2"))
  	{
  		if (!Global_262145.f_28826 && iVar1 < Global_262145.f_28839)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tigon"))
  	{
  		if (!Global_262145.f_29172 && iVar1 < Global_262145.f_28846)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("openwheel1"))
  	{
  		if (!Global_262145.f_29173 && iVar1 < Global_262145.f_28847)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("openwheel2"))
  	{
  		if (!Global_262145.f_29174 && iVar1 < Global_262145.f_28848)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("coquette4"))
  	{
  		if (!Global_262145.f_29175 && iVar1 < Global_262145.f_28849)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("manana2"))
  	{
  		if (!Global_262145.f_28827 && iVar1 < Global_262145.f_28838)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("youga3"))
  	{
  		if (!Global_262145.f_28828 && iVar1 < Global_262145.f_28840)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("toreador"))
  	{
  		if (!Global_262145.f_29620 && iVar1 < Global_262145.f_29603)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("annihilator2"))
  	{
  		if (!Global_262145.f_29621 && iVar1 < Global_262145.f_29604)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("alkonost"))
  	{
  		if (!Global_262145.f_29622 && iVar1 < Global_262145.f_29605)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("patrolboat"))
  	{
  		if (!Global_262145.f_29623 && iVar1 < Global_262145.f_29606)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("longfin"))
  	{
  		if (!Global_262145.f_29624 && iVar1 < Global_262145.f_29607)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("winky"))
  	{
  		if (!Global_262145.f_29625 && iVar1 < Global_262145.f_29608)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("veto"))
  	{
  		if (!Global_262145.f_29626 && iVar1 < Global_262145.f_29609)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("veto2"))
  	{
  		if (!Global_262145.f_29627 && iVar1 < Global_262145.f_29610)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("italirsx"))
  	{
  		if (!Global_262145.f_29628 && iVar1 < Global_262145.f_29611)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("weevil"))
  	{
  		if (Global_262145.f_29637)
  		{
  		}
  		else if (!Global_262145.f_29629 && iVar1 < Global_262145.f_29612)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("manchez2"))
  	{
  		if (!Global_262145.f_29630 && iVar1 < Global_262145.f_29613)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("slamtruck"))
  	{
  		if (!Global_262145.f_29631 && iVar1 < Global_262145.f_29614)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("vetir"))
  	{
  		if (!Global_262145.f_29632 && iVar1 < Global_262145.f_29615)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("squaddie"))
  	{
  		if (!Global_262145.f_29633 && iVar1 < Global_262145.f_29616)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("brioso2"))
  	{
  		if (Global_262145.f_29638)
  		{
  		}
  		else if (!Global_262145.f_29634 && iVar1 < Global_262145.f_29617)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("dinghy5"))
  	{
  		if (!Global_262145.f_29635 && iVar1 < Global_262145.f_29618)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("verus"))
  	{
  		if (!Global_262145.f_29636 && iVar1 < Global_262145.f_29619)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("tailgater2"))
  	{
  		if (!Global_262145.f_30484 && iVar1 < Global_262145.f_30467)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("euros"))
  	{
  		if (!Global_262145.f_30485 && iVar1 < Global_262145.f_30468)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("sultan3"))
  	{
  		if (!Global_262145.f_30486 && iVar1 < Global_262145.f_30469)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("rt3000"))
  	{
  		if (!Global_262145.f_30487 && iVar1 < Global_262145.f_30470)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("vectre"))
  	{
  		if (!Global_262145.f_30488 && iVar1 < Global_262145.f_30471)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("zr350"))
  	{
  		if (!Global_262145.f_30489 && iVar1 < Global_262145.f_30472)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("warrener2"))
  	{
  		if (!Global_262145.f_30490 && iVar1 < Global_262145.f_30473)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("calico"))
  	{
  		if (!Global_262145.f_30491 && iVar1 < Global_262145.f_30474)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("remus"))
  	{
  		if (!Global_262145.f_30492 && iVar1 < Global_262145.f_30475)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("cypher"))
  	{
  		if (!Global_262145.f_30493 && iVar1 < Global_262145.f_30476)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("dominator7"))
  	{
  		if (!Global_262145.f_30494 && iVar1 < Global_262145.f_30477)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("jester4"))
  	{
  		if (!Global_262145.f_30495 && iVar1 < Global_262145.f_30478)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("futo2"))
  	{
  		if (!Global_262145.f_30496 && iVar1 < Global_262145.f_30479)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("dominator8"))
  	{
  		if (!Global_262145.f_30497 && iVar1 < Global_262145.f_30480)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("previon"))
  	{
  		if (!Global_262145.f_30498 && iVar1 < Global_262145.f_30481)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("growler"))
  	{
  		if (!Global_262145.f_30499 && iVar1 < Global_262145.f_30482)
  		{
  			iVar0 = 0;
  		}
  	}
  	else if (iParam0 == joaat("comet6"))
  	{
  		if (!Global_262145.f_30500 && iVar1 < Global_262145.f_30483)
  		{
  			iVar0 = 0;
  		}
  	}
  	return iVar0;
  }
  
  int func_121()
  {
  	return 0;
  }
  
  int func_122()
  {
  	return 1;
  }
  
  int func_123()
  {
  	return 1;
  }
  
  int func_124()
  {
  	if (DLC::IS_DLC_PRESENT(-1226939934))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_125()
  {
  	int iVar0;
  	
  	if (NETWORK::NETWORK_IS_SIGNED_IN())
  	{
  		if (NETWORK::NETWORK_HAS_VALID_ROS_CREDENTIALS())
  		{
  			if (NETWORK::_NETWORK_GET_ROS_PRIVILEGE_24())
  			{
  				STATS::STAT_GET_INT(joaat("sp_unlock_exclus_content"), &iVar0, -1);
  				MISC::SET_BIT(&iVar0, 2);
  				MISC::SET_BIT(&iVar0, 4);
  				MISC::SET_BIT(&iVar0, 6);
  				MISC::SET_BIT(&Global_25, 2);
  				MISC::SET_BIT(&Global_25, 4);
  				MISC::SET_BIT(&Global_25, 6);
  				STATS::STAT_SET_INT(joaat("sp_unlock_exclus_content"), iVar0, true);
  				if (MISC::ARE_PROFILE_SETTINGS_VALID())
  				{
  					iVar0 = MISC::GET_PROFILE_SETTING(866);
  					MISC::SET_BIT(&iVar0, 0);
  					STATS::_SET_HAS_CONTENT_UNLOCKS_FLAGS(iVar0);
  				}
  				return 1;
  			}
  		}
  	}
  	if (Global_151130 == 2)
  	{
  		return 1;
  	}
  	else if (Global_151130 == 3)
  	{
  		return 0;
  	}
  	if (MISC::ARE_PROFILE_SETTINGS_VALID())
  	{
  		if (MISC::IS_BIT_SET(MISC::GET_PROFILE_SETTING(866), 0))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_126(int iParam0)
  {
  	int iVar0;
  	char* sVar1;
  	
  	iVar0 = ENTITY::GET_ENTITY_MODEL(iParam0);
  	sVar1 = VEHICLE::GET_VEHICLE_NUMBER_PLATE_TEXT(iParam0);
  	if (iVar0 == joaat("speedo") && MISC::ARE_STRINGS_EQUAL(sVar1, "LAMAR G "))
  	{
  		return 1;
  	}
  	if (!func_117(iVar0, 0))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_127(int iParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 3)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Global_96731[iVar0]))
  		{
  			if (Global_96731[iVar0] == iParam0)
  			{
  				return 1;
  			}
  		}
  		iVar0++;
  	}
  	return 0;
  }
  
  int func_128(int iParam0)
  {
  	int iVar0;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(iParam0) && VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		iVar0 = 0;
  		while (iVar0 < 9)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Global_96701[iVar0]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Global_96701[iVar0], false))
  			{
  				if (Global_96701[iVar0] == iParam0 && ENTITY::GET_ENTITY_MODEL(Global_96701[iVar0]) == ENTITY::GET_ENTITY_MODEL(iParam0))
  				{
  					return 1;
  				}
  			}
  			iVar0++;
  		}
  	}
  	return 0;
  }
  
  int func_129(int iParam0)
  {
  	int iVar0;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(Global_76066.f_484[24]))
  	{
  		if (iParam0 == Global_76066.f_484[24])
  		{
  			return 0;
  		}
  	}
  	iVar0 = 0;
  	while (iVar0 < 68)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Global_76066.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_76066.f_484[iVar0])
  				{
  					return 1;
  				}
  			}
  		}
  		iVar0++;
  	}
  	return 0;
  }
  
  int func_130(int iParam0, int iParam1, bool bParam2)
  {
  	int iVar0;
  	char* sVar1;
  	int iVar9;
  	
  	if (!ENTITY::DOES_ENTITY_EXIST(iParam0) || !VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		return 0;
  	}
  	iVar0 = 0;
  	while (func_131(iParam1, iVar0, &sVar1, &iVar9))
  	{
  		if (!bParam2 || MISC::IS_BIT_SET(Global_112293.f_7227[iVar9], 0))
  		{
  			if (VEHICLE::IS_VEHICLE_IN_GARAGE_AREA(&sVar1, iParam0))
  			{
  				return 1;
  			}
  		}
  		iVar0++;
  	}
  	return 0;
  }
  
  int func_131(int iParam0, int iParam1, char* sParam2, var uParam3)
  {
  	StringCopy(sParam2, "", 32);
  	switch (iParam0)
  	{
  		case 0:
  			if (iParam1 == 0)
  			{
  				StringCopy(sParam2, "Michael - Beverly Hills", 32);
  				*uParam3 = 0;
  				return 1;
  			}
  			else if (iParam1 == 1)
  			{
  				StringCopy(sParam2, "Trevor - Countryside", 32);
  				*uParam3 = 1;
  				return 1;
  			}
  			break;
  		
  		case 1:
  			if (iParam1 == 0)
  			{
  				StringCopy(sParam2, "Franklin - Aunt", 32);
  				*uParam3 = 5;
  				return 1;
  			}
  			else if (iParam1 == 1)
  			{
  				StringCopy(sParam2, "Franklin - Hills", 32);
  				*uParam3 = 6;
  				return 1;
  			}
  			break;
  		
  		case 2:
  			if (iParam1 == 0)
  			{
  				StringCopy(sParam2, "Trevor - Countryside", 32);
  				*uParam3 = 2;
  				return 1;
  			}
  			else if (iParam1 == 1)
  			{
  				StringCopy(sParam2, "Trevor - City", 32);
  				*uParam3 = 3;
  				return 1;
  			}
  			else if (iParam1 == 2)
  			{
  				StringCopy(sParam2, "Trevor - Stripclub", 32);
  				*uParam3 = 4;
  				return 1;
  			}
  			break;
  	}
  	return 0;
  }
  
  var func_132()
  {
  	var uVar0;
  	
  	func_142(&uVar0, CLOCK::GET_CLOCK_SECONDS());
  	func_141(&uVar0, CLOCK::GET_CLOCK_MINUTES());
  	func_140(&uVar0, CLOCK::GET_CLOCK_HOURS());
  	func_135(&uVar0, CLOCK::GET_CLOCK_DAY_OF_MONTH());
  	func_134(&uVar0, CLOCK::GET_CLOCK_MONTH());
  	func_133(&uVar0, CLOCK::GET_CLOCK_YEAR());
  	return uVar0;
  }
  
  void func_133(var uParam0, int iParam1)
  {
  	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_134(var uParam0, int iParam1)
  {
  	if (iParam1 < 0 || iParam1 > 11)
  	{
  		return;
  	}
  	*uParam0 = (*uParam0 - *uParam0 & 15);
  	*uParam0 = (*uParam0 || iParam1);
  }
  
  void func_135(var uParam0, int iParam1)
  {
  	int iVar0;
  	int iVar1;
  	
  	iVar0 = func_139(*uParam0);
  	iVar1 = func_137(*uParam0);
  	if (iParam1 < 1 || iParam1 > func_136(iVar0, iVar1))
  	{
  		return;
  	}
  	*uParam0 = (*uParam0 - *uParam0 & 496);
  	*uParam0 = (*uParam0 || SYSTEM::SHIFT_LEFT(iParam1, 4));
  }
  
  int func_136(int iParam0, int iParam1)
  {
  	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_137(int iParam0)
  {
  	return (SYSTEM::SHIFT_RIGHT(iParam0, 26) & 31 * func_138(MISC::IS_BIT_SET(iParam0, 31), -1, 1)) + 2011;
  }
  
  int func_138(bool bParam0, int iParam1, int iParam2)
  {
  	if (bParam0)
  	{
  		return iParam1;
  	}
  	return iParam2;
  }
  
  int func_139(var uParam0)
  {
  	return uParam0 & 15;
  }
  
  void func_140(var uParam0, int iParam1)
  {
  	if (iParam1 < 0 || iParam1 > 24)
  	{
  		return;
  	}
  	*uParam0 = (*uParam0 - *uParam0 & 15872);
  	*uParam0 = (*uParam0 || SYSTEM::SHIFT_LEFT(iParam1, 9));
  }
  
  void func_141(var uParam0, int iParam1)
  {
  	if (iParam1 < 0 || iParam1 >= 60)
  	{
  		return;
  	}
  	*uParam0 = (*uParam0 - *uParam0 & 1032192);
  	*uParam0 = (*uParam0 || SYSTEM::SHIFT_LEFT(iParam1, 14));
  }
  
  void func_142(var uParam0, int iParam1)
  {
  	if (iParam1 < 0 || iParam1 >= 60)
  	{
  		return;
  	}
  	*uParam0 = (*uParam0 - *uParam0 & 66060288);
  	*uParam0 = (*uParam0 || SYSTEM::SHIFT_LEFT(iParam1, 20));
  }
  
  int func_143(var uParam0, int iParam1)
  {
  	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_144(0, 1);
  			uParam0->f_12 = 0;
  			MISC::SET_BIT(&(uParam0->f_9), 20);
  			MISC::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_144(0, 1);
  			uParam0->f_12 = 0;
  			MISC::SET_BIT(&(uParam0->f_9), 20);
  			MISC::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_144(1, 1);
  			uParam0->f_12 = 1;
  			MISC::SET_BIT(&(uParam0->f_9), 20);
  			MISC::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_144(1, 2);
  			uParam0->f_12 = 1;
  			MISC::SET_BIT(&(uParam0->f_9), 19);
  			MISC::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_144(1, 1);
  			uParam0->f_12 = 1;
  			MISC::SET_BIT(&(uParam0->f_9), 20);
  			MISC::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_144(1, 2);
  			uParam0->f_12 = 1;
  			MISC::SET_BIT(&(uParam0->f_9), 19);
  			MISC::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_144(2, 1);
  			uParam0->f_12 = 2;
  			MISC::SET_BIT(&(uParam0->f_9), 20);
  			MISC::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_144(2, 1);
  			uParam0->f_12 = 2;
  			MISC::SET_BIT(&(uParam0->f_9), 20);
  			MISC::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_144(2, 1);
  			uParam0->f_12 = 2;
  			MISC::SET_BIT(&(uParam0->f_9), 20);
  			MISC::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");
  			MISC::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;
  			MISC::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;
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::SET_BIT(&(uParam0->f_9), 22);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::SET_BIT(&(uParam0->f_9), 22);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::SET_BIT(&(uParam0->f_9), 22);
  			MISC::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 };
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::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 };
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::SET_BIT(&(uParam0->f_9), 23);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::SET_BIT(&(uParam0->f_9), 24);
  			MISC::SET_BIT(&(uParam0->f_9), 28);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::SET_BIT(&(uParam0->f_9), 24);
  			MISC::SET_BIT(&(uParam0->f_9), 28);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 14);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::SET_BIT(&(uParam0->f_9), 24);
  			MISC::SET_BIT(&(uParam0->f_9), 28);
  			MISC::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);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 27);
  			MISC::SET_BIT(&(uParam0->f_9), 24);
  			MISC::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);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 27);
  			MISC::SET_BIT(&(uParam0->f_9), 24);
  			MISC::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);
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 12);
  			MISC::SET_BIT(&(uParam0->f_9), 7);
  			MISC::SET_BIT(&(uParam0->f_9), 27);
  			MISC::SET_BIT(&(uParam0->f_9), 24);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 11);
  			MISC::SET_BIT(&(uParam0->f_9), 13);
  			MISC::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");
  			MISC::SET_BIT(&(uParam0->f_9), 10);
  			MISC::SET_BIT(&(uParam0->f_9), 11);
  			MISC::SET_BIT(&(uParam0->f_9), 13);
  			MISC::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");
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 9);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 9);
  			MISC::SET_BIT(&(uParam0->f_9), 23);
  			MISC::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");
  			MISC::SET_BIT(&(uParam0->f_9), 23);
  			MISC::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");
  			MISC::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");
  			MISC::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");
  			MISC::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");
  			MISC::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 = joaat("firetruk");
  			MISC::SET_BIT(&(uParam0->f_9), 23);
  			MISC::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;
  			MISC::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;
  			MISC::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;
  			MISC::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;
  			MISC::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;
  			MISC::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;
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 2);
  			MISC::SET_BIT(&(uParam0->f_9), 30);
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 2);
  			MISC::SET_BIT(&(uParam0->f_9), 22);
  			MISC::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_125())
  			{
  				uParam0->f_4 = joaat("blimp2");
  			}
  			else
  			{
  				uParam0->f_4 = joaat("blimp");
  			}
  			uParam0->f_13 = 401;
  			MISC::SET_BIT(&(uParam0->f_9), 13);
  			MISC::SET_BIT(&(uParam0->f_9), 2);
  			MISC::SET_BIT(&(uParam0->f_9), 1);
  			MISC::SET_BIT(&(uParam0->f_9), 23);
  			MISC::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_125())
  			{
  				uParam0->f_4 = joaat("blimp2");
  			}
  			else
  			{
  				uParam0->f_4 = joaat("blimp");
  			}
  			uParam0->f_13 = 401;
  			MISC::SET_BIT(&(uParam0->f_9), 13);
  			MISC::SET_BIT(&(uParam0->f_9), 2);
  			MISC::SET_BIT(&(uParam0->f_9), 1);
  			MISC::SET_BIT(&(uParam0->f_9), 23);
  			MISC::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");
  			MISC::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;
  			MISC::SET_BIT(&(uParam0->f_9), 0);
  			MISC::SET_BIT(&(uParam0->f_9), 21);
  			MISC::SET_BIT(&(uParam0->f_9), 23);
  			MISC::SET_BIT(&(uParam0->f_9), 6);
  			MISC::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");
  			MISC::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");
  			MISC::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");
  			MISC::SET_BIT(&(uParam0->f_9), 30);
  			MISC::SET_BIT(&(uParam0->f_9), 23);
  			MISC::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");
  			MISC::SET_BIT(&(uParam0->f_9), 30);
  			MISC::SET_BIT(&(uParam0->f_9), 23);
  			MISC::SET_BIT(&(uParam0->f_9), 6);
  			iVar0 = 1;
  			break;
  	}
  	if (MISC::IS_BIT_SET(uParam0->f_9, 10))
  	{
  		uParam0->f_4 = Global_112293.f_32747.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_154(Global_112293.f_32747.f_1864[uParam0->f_14 /*3*/], 0f, 0f, 0f, 0))
  		{
  			*uParam0 = { Global_112293.f_32747.f_1864[uParam0->f_14 /*3*/] };
  		}
  		if (Global_112293.f_32747.f_1934[uParam0->f_14] != -1f)
  		{
  			uParam0->f_3 = Global_112293.f_32747.f_1934[uParam0->f_14];
  		}
  	}
  	if (MISC::IS_BIT_SET(uParam0->f_9, 19))
  	{
  		if (!func_154(Global_112293.f_2361.f_539.f_3588[1 /*10*/][uParam0->f_12 /*3*/], 0f, 0f, 0f, 0))
  		{
  			*uParam0 = { Global_112293.f_2361.f_539.f_3588[1 /*10*/][uParam0->f_12 /*3*/] };
  			uParam0->f_3 = Global_112293.f_2361.f_539.f_3609[1 /*4*/][uParam0->f_12];
  		}
  	}
  	else if (MISC::IS_BIT_SET(uParam0->f_9, 20))
  	{
  		if (!func_154(Global_112293.f_2361.f_539.f_3588[0 /*10*/][uParam0->f_12 /*3*/], 0f, 0f, 0f, 0))
  		{
  			*uParam0 = { Global_112293.f_2361.f_539.f_3588[0 /*10*/][uParam0->f_12 /*3*/] };
  			uParam0->f_3 = Global_112293.f_2361.f_539.f_3609[0 /*4*/][uParam0->f_12];
  		}
  	}
  	return iVar0;
  }
  
  int func_144(int iParam0, int iParam1)
  {
  	struct<82> Var0;
  	
  	if (func_146(iParam0))
  	{
  		Var0.f_11 = 12;
  		Var0.f_31 = 49;
  		Var0.f_81 = 2;
  		func_145(iParam0, &Var0, iParam1);
  		return Var0;
  	}
  	else if (iParam0 != 145)
  	{
  	}
  	return 0;
  }
  
  void func_145(int iParam0, var uParam1, int iParam2)
  {
  	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_112293.f_9083.f_99.f_58[128] && !Global_112293.f_9083.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_112293.f_9083.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_112293.f_9083.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;
  	}
  }
  
  bool func_146(int iParam0)
  {
  	return iParam0 < 3;
  }
  
  void func_147(int iParam0, var uParam1, struct<3> Param2, float fParam5, int iParam6)
  {
  	if (func_143(&(Global_76066.f_555[0 /*21*/]), iParam0))
  	{
  		if (MISC::IS_BIT_SET(Global_76066.f_555[0 /*21*/].f_9, 10))
  		{
  			func_152(iParam0);
  			func_151(uParam1, &(Global_112293.f_32747.f_69[Global_76066.f_555[0 /*21*/].f_14 /*78*/]));
  			if (MISC::IS_BIT_SET(Global_76066.f_555[0 /*21*/].f_9, 11))
  			{
  				Global_112293.f_32747.f_1864[Global_76066.f_555[0 /*21*/].f_14 /*3*/] = { Param2 };
  				Global_112293.f_32747.f_1934[Global_76066.f_555[0 /*21*/].f_14] = fParam5;
  			}
  			else
  			{
  				Global_112293.f_32747.f_1864[Global_76066.f_555[0 /*21*/].f_14 /*3*/] = { 0f, 0f, 0f };
  				Global_112293.f_32747.f_1934[Global_76066.f_555[0 /*21*/].f_14] = -1f;
  			}
  			Global_112293.f_32747.f_1958[Global_76066.f_555[0 /*21*/].f_14] = iParam6 + 1;
  			func_148(iParam0, 1);
  		}
  	}
  }
  
  void func_148(int iParam0, bool bParam1)
  {
  	if (iParam0 == -1)
  	{
  		return;
  	}
  	if (bParam1)
  	{
  		if (!func_150(iParam0, 0))
  		{
  			func_149(iParam0, 1, 0);
  			func_149(iParam0, 2, 0);
  			func_149(iParam0, 3, 0);
  			func_149(iParam0, 4, 0);
  			func_149(iParam0, 0, 1);
  			Global_76066[iParam0] = 1;
  		}
  	}
  	else
  	{
  		func_149(iParam0, 0, 0);
  	}
  }
  
  void func_149(int iParam0, int iParam1, bool bParam2)
  {
  	if (iParam0 == -1)
  	{
  		return;
  	}
  	if (bParam2)
  	{
  		MISC::SET_BIT(&(Global_112293.f_32747[iParam0]), iParam1);
  	}
  	else
  	{
  		MISC::CLEAR_BIT(&(Global_112293.f_32747[iParam0]), iParam1);
  	}
  }
  
  bool func_150(int iParam0, int iParam1)
  {
  	if (iParam0 == -1)
  	{
  		return 0;
  	}
  	return MISC::IS_BIT_SET(Global_112293.f_32747[iParam0], iParam1);
  }
  
  void func_151(var uParam0, var uParam1)
  {
  	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;
  }
  
  void func_152(int iParam0)
  {
  	if (iParam0 == -1)
  	{
  		return;
  	}
  	if (func_143(&(Global_76066.f_555[0 /*21*/]), iParam0))
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Global_76066.f_139[iParam0]))
  		{
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Global_76066.f_139[iParam0], true, true);
  			ENTITY::SET_VEHICLE_AS_NO_LONGER_NEEDED(&(Global_76066.f_139[iParam0]));
  			Global_76066.f_139[iParam0] = 0;
  		}
  		if (MISC::IS_BIT_SET(Global_76066.f_555[0 /*21*/].f_9, 13))
  		{
  			func_148(iParam0, 0);
  		}
  	}
  }
  
  int func_153(int iParam0)
  {
  	int iVar0;
  	
  	if (!ENTITY::DOES_ENTITY_EXIST(iParam0))
  	{
  		return 145;
  	}
  	if (!VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		return 145;
  	}
  	iVar0 = 0;
  	while (iVar0 < 9)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Global_96701[iVar0]))
  		{
  			if (Global_96701[iVar0] == iParam0)
  			{
  				return Global_96711[iVar0];
  			}
  		}
  		iVar0++;
  	}
  	return 145;
  }
  
  bool func_154(struct<3> Param0, struct<3> Param3, bool bParam6)
  {
  	if (bParam6)
  	{
  		return (Param0.x == Param3.x && Param0.f_1 == Param3.f_1);
  	}
  	return ((Param0.x == Param3.x && Param0.f_1 == Param3.f_1) && Param0.f_2 == Param3.f_2);
  }
  
  void func_155(int iParam0, var uParam1)
  {
  	int iVar0;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		func_159(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))
  		{
  			MISC::SET_BIT(&(uParam1->f_77), 28);
  		}
  		if (VEHICLE::_IS_VEHICLE_NEON_LIGHT_ENABLED(iParam0, 3))
  		{
  			MISC::SET_BIT(&(uParam1->f_77), 29);
  		}
  		if (VEHICLE::_IS_VEHICLE_NEON_LIGHT_ENABLED(iParam0, 0))
  		{
  			MISC::SET_BIT(&(uParam1->f_77), 30);
  		}
  		if (VEHICLE::_IS_VEHICLE_NEON_LIGHT_ENABLED(iParam0, 1))
  		{
  			MISC::SET_BIT(&(uParam1->f_77), 31);
  		}
  		if (uParam1->f_65 == -1 && !func_158(uParam1->f_66))
  		{
  			uParam1->f_65 = 0;
  		}
  		if (VEHICLE::IS_VEHICLE_A_CONVERTIBLE(iParam0, false))
  		{
  			uParam1->f_68 = VEHICLE::GET_CONVERTIBLE_ROOF_STATE(iParam0);
  		}
  		if (VEHICLE::IS_THIS_MODEL_A_PLANE(uParam1->f_66))
  		{
  			if (VEHICLE::IS_PLANE_LANDING_GEAR_INTACT(iParam0))
  			{
  				switch (VEHICLE::GET_LANDING_GEAR_STATE(iParam0))
  				{
  					case 3:
  					case 0:
  						MISC::CLEAR_BIT(&(uParam1->f_77), 23);
  						MISC::SET_BIT(&(uParam1->f_77), 22);
  						break;
  					
  					case 4:
  					case 1:
  						MISC::CLEAR_BIT(&(uParam1->f_77), 23);
  						MISC::CLEAR_BIT(&(uParam1->f_77), 22);
  						break;
  					
  					case 5:
  						MISC::SET_BIT(&(uParam1->f_77), 23);
  						break;
  				}
  			}
  			else
  			{
  				MISC::SET_BIT(&(uParam1->f_77), 23);
  			}
  		}
  		if (!VEHICLE::GET_VEHICLE_TYRES_CAN_BURST(iParam0))
  		{
  			MISC::SET_BIT(&(uParam1->f_77), 9);
  		}
  		if (VEHICLE::IS_VEHICLE_STOLEN(iParam0))
  		{
  			MISC::SET_BIT(&(uParam1->f_77), 10);
  		}
  		if (VEHICLE::GET_IS_VEHICLE_PRIMARY_COLOUR_CUSTOM(iParam0))
  		{
  			MISC::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))
  		{
  			MISC::SET_BIT(&(uParam1->f_77), 12);
  		}
  		func_157(&iParam0, &(uParam1->f_9), &(uParam1->f_59));
  		iVar0 = 0;
  		while (iVar0 <= 11)
  		{
  			if (VEHICLE::IS_VEHICLE_EXTRA_TURNED_ON(iParam0, iVar0 + 1))
  			{
  				MISC::SET_BIT(&(uParam1->f_77), func_156(iVar0 + 1));
  			}
  			iVar0++;
  		}
  		if (GRAPHICS::DOES_VEHICLE_HAVE_CREW_EMBLEM(iParam0, 0))
  		{
  			MISC::SET_BIT(&(uParam1->f_77), 11);
  		}
  		else
  		{
  			MISC::CLEAR_BIT(&(uParam1->f_77), 11);
  		}
  		if (DECORATOR::DECOR_EXIST_ON(iParam0, "IgnoredByQuickSave") && DECORATOR::DECOR_GET_BOOL(iParam0, "IgnoredByQuickSave"))
  		{
  			MISC::SET_BIT(&(uParam1->f_77), 27);
  		}
  		else
  		{
  			MISC::CLEAR_BIT(&(uParam1->f_77), 27);
  		}
  	}
  }
  
  int func_156(int iParam0)
  {
  	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;
  }
  
  int func_157(int iParam0, var uParam1, var uParam2)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (!VEHICLE::IS_VEHICLE_DRIVEABLE(*iParam0, false))
  	{
  		return 0;
  	}
  	if (VEHICLE::GET_NUM_MOD_KITS(*iParam0) == 0)
  	{
  		return 0;
  	}
  	iVar0 = 0;
  	while (iVar0 < *uParam1)
  	{
  		iVar1 = iVar0;
  		if ((((iVar1 == 17 || iVar1 == 18) || iVar1 == 19) || iVar1 == 20) || iVar1 == 21)
  		{
  			(*uParam1)[iVar0] = 0;
  			if (VEHICLE::IS_TOGGLE_MOD_ON(*iParam0, iVar1))
  			{
  				(*uParam1)[iVar0] = 1;
  			}
  		}
  		else if (iVar1 == 22)
  		{
  			if (VEHICLE::IS_TOGGLE_MOD_ON(*iParam0, iVar1))
  			{
  				switch (VEHICLE::_GET_VEHICLE_XENON_LIGHTS_COLOR(*iParam0))
  				{
  					case 255:
  						(*uParam1)[iVar0] = 1;
  						break;
  					
  					case 0:
  						(*uParam1)[iVar0] = 2;
  						break;
  					
  					case 1:
  						(*uParam1)[iVar0] = 3;
  						break;
  					
  					case 2:
  						(*uParam1)[iVar0] = 4;
  						break;
  					
  					case 3:
  						(*uParam1)[iVar0] = 5;
  						break;
  					
  					case 4:
  						(*uParam1)[iVar0] = 6;
  						break;
  					
  					case 5:
  						(*uParam1)[iVar0] = 7;
  						break;
  					
  					case 6:
  						(*uParam1)[iVar0] = 8;
  						break;
  					
  					case 7:
  						(*uParam1)[iVar0] = 9;
  						break;
  					
  					case 8:
  						(*uParam1)[iVar0] = 10;
  						break;
  					
  					case 9:
  						(*uParam1)[iVar0] = 11;
  						break;
  					
  					case 10:
  						(*uParam1)[iVar0] = 12;
  						break;
  					
  					case 11:
  						(*uParam1)[iVar0] = 13;
  						break;
  					
  					case 12:
  						(*uParam1)[iVar0] = 14;
  						break;
  					
  					case 13:
  						(*uParam1)[iVar0] = 15;
  						break;
  				}
  			}
  			else
  			{
  				(*uParam1)[iVar0] = 0;
  			}
  		}
  		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 1;
  }
  
  int func_158(int iParam0)
  {
  	switch (iParam0)
  	{
  		case joaat("granger"):
  		case joaat("visione"):
  			return 1;
  		
  		default:
  	}
  	return 0;
  }
  
  void func_159(var uParam0)
  {
  	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_160(int iParam0)
  {
  	if (iParam0 != 24 && iParam0 != 25)
  	{
  	}
  	func_152(iParam0);
  	func_148(iParam0, 0);
  }
  
  int func_161(struct<3> Param0, int iParam3, var uParam4, var uParam5)
  {
  	int iVar0;
  	
  	iVar0 = func_162(Param0, iParam3, 1);
  	switch (iVar0)
  	{
  		case 0:
  			*uParam4 = { -827.351f, 157.785f, 68.2143f };
  			*uParam5 = 85.1509f;
  			return 1;
  			break;
  		
  		case 1:
  		case 2:
  			*uParam4 = { 1992.523f, 3813.916f, 31.1008f };
  			*uParam5 = 122.1498f;
  			return 1;
  			break;
  		
  		case 3:
  			*uParam4 = { -1184.258f, -1496.556f, 3.3895f };
  			*uParam5 = 303.2098f;
  			return 1;
  			break;
  		
  		case 4:
  			*uParam4 = { 118.1067f, -1325.906f, 28.3706f };
  			*uParam5 = 123.5016f;
  			return 1;
  			break;
  		
  		case 5:
  			*uParam4 = { -18.118f, -1455.126f, 29.5004f };
  			*uParam5 = 273.2822f;
  			return 1;
  			break;
  		
  		case 6:
  			*uParam4 = { 1.5947f, 543.4017f, 173.4644f };
  			*uParam5 = 310.7556f;
  			return 1;
  			break;
  		
  		default:
  			break;
  	}
  	return 0;
  }
  
  int func_162(struct<3> Param0, int iParam3, int iParam4)
  {
  	int iVar0;
  	float fVar1;
  	float fVar2;
  	int iVar3;
  	
  	fVar2 = 1000000f;
  	iVar3 = 10;
  	iVar0 = 0;
  	while (iVar0 <= (10 - 1))
  	{
  		if (Global_94408[iVar0 /*10*/].f_7 != 263)
  		{
  			if (Global_94408[iVar0 /*10*/].f_9 == iParam3 || iParam3 == 145)
  			{
  				if (func_163(iVar0) || iParam4 == 0)
  				{
  					fVar1 = MISC::GET_DISTANCE_BETWEEN_COORDS(Param0, Global_94408[iVar0 /*10*/].f_3, true);
  					if (fVar1 < fVar2)
  					{
  						fVar2 = fVar1;
  						iVar3 = iVar0;
  					}
  				}
  			}
  		}
  		iVar0++;
  	}
  	return iVar3;
  }
  
  bool func_163(int iParam0)
  {
  	return MISC::IS_BIT_SET(Global_112293.f_7227[iParam0], 0);
  }
  
  int func_164(int iParam0)
  {
  	if (iParam0 == -1)
  	{
  		return 0;
  	}
  	return Global_76066.f_139[iParam0];
  }
  
  int func_165()
  {
  	func_166();
  	return Global_112293.f_2361.f_539.f_4321;
  }
  
  void func_166()
  {
  	int iVar0;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(PLAYER::PLAYER_PED_ID()))
  	{
  		if (func_168(Global_112293.f_2361.f_539.f_4321) != ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()))
  		{
  			iVar0 = func_167(PLAYER::PLAYER_PED_ID());
  			if (func_146(iVar0) && (!func_40(14) || Global_111244))
  			{
  				if (Global_112293.f_2361.f_539.f_4321 != iVar0 && func_146(Global_112293.f_2361.f_539.f_4321))
  				{
  					Global_112293.f_2361.f_539.f_4322 = Global_112293.f_2361.f_539.f_4321;
  				}
  				Global_112293.f_2361.f_539.f_4323 = iVar0;
  				Global_112293.f_2361.f_539.f_4321 = iVar0;
  				return;
  			}
  		}
  		else
  		{
  			if (Global_112293.f_2361.f_539.f_4321 != 145)
  			{
  				Global_112293.f_2361.f_539.f_4323 = Global_112293.f_2361.f_539.f_4321;
  			}
  			return;
  		}
  	}
  	Global_112293.f_2361.f_539.f_4321 = 145;
  }
  
  int func_167(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(iParam0))
  	{
  		iVar1 = ENTITY::GET_ENTITY_MODEL(iParam0);
  		iVar0 = 0;
  		while (iVar0 <= 2)
  		{
  			if (func_168(iVar0) == iVar1)
  			{
  				return iVar0;
  			}
  			iVar0++;
  		}
  	}
  	return 145;
  }
  
  int func_168(int iParam0)
  {
  	if (func_146(iParam0))
  	{
  		return func_169(iParam0);
  	}
  	else if (iParam0 != 145)
  	{
  	}
  	return 0;
  }
  
  var func_169(int iParam0)
  {
  	return Global_1878[iParam0 /*29*/];
  }
  
  int func_170(var uParam0, int iParam1, int iParam2, int iParam3)
  {
  	if (*uParam0 == -1)
  	{
  		return 0;
  	}
  	else if (*uParam0 == 1)
  	{
  		return 1;
  	}
  	else if (*uParam0 == 0 || ((*uParam0 == 2 && uParam0->f_1 == 1) && iParam2))
  	{
  		if (iParam1 > 0)
  		{
  			*uParam0 = 2;
  			uParam0->f_6 = iParam1;
  		}
  		else
  		{
  			*uParam0 = 1;
  			uParam0->f_6 = 0;
  		}
  		uParam0->f_4 = MISC::GET_GAME_TIMER();
  		uParam0->f_5 = MISC::GET_GAME_TIMER();
  		uParam0->f_1 = iParam3;
  		return 1;
  	}
  	return 0;
  }
  
  int func_171(var uParam0, int iParam1)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (iParam1 == 0)
  	{
  		return 0;
  	}
  	iVar1 = -1;
  	iVar0 = 0;
  	while (iVar0 < *uParam0)
  	{
  		if ((*uParam0)[iVar0 /*5*/])
  		{
  			if ((uParam0[iVar0 /*5*/])->f_4 == iParam1)
  			{
  				(uParam0[iVar0 /*5*/])->f_2 = 0;
  				if (!(uParam0[iVar0 /*5*/])->f_1)
  				{
  					uParam0->f_1007 = 1;
  					return 1;
  				}
  				else
  				{
  					return 1;
  				}
  			}
  		}
  		else if (iVar1 == -1)
  		{
  			iVar1 = iVar0;
  		}
  		iVar0++;
  	}
  	if (iVar1 >= 0)
  	{
  		STREAMING::REQUEST_MODEL(iParam1);
  		(*uParam0)[iVar1 /*5*/] = 1;
  		(uParam0[iVar1 /*5*/])->f_3 = MISC::GET_GAME_TIMER();
  		(uParam0[iVar1 /*5*/])->f_4 = iParam1;
  		uParam0->f_1007 = 1;
  		return 1;
  	}
  	return 0;
  }
  
  int func_172(var uParam0, char* sParam1)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (MISC::IS_STRING_NULL_OR_EMPTY(sParam1))
  	{
  		return 0;
  	}
  	iVar1 = -1;
  	iVar0 = 0;
  	while (iVar0 < uParam0->f_737)
  	{
  		if (uParam0->f_737[iVar0 /*5*/])
  		{
  			if (MISC::ARE_STRINGS_EQUAL(uParam0->f_737[iVar0 /*5*/].f_4, sParam1))
  			{
  				uParam0->f_737[iVar0 /*5*/].f_2 = 0;
  				if (!uParam0->f_737[iVar0 /*5*/].f_1)
  				{
  					uParam0->f_1007 = 1;
  					return 1;
  				}
  				else
  				{
  					return 1;
  				}
  			}
  		}
  		else if (iVar1 == -1)
  		{
  			iVar1 = iVar0;
  		}
  		iVar0++;
  	}
  	if (iVar1 >= 0)
  	{
  		AUDIO::REQUEST_SCRIPT_AUDIO_BANK(sParam1, false, -1);
  		uParam0->f_737[iVar1 /*5*/] = 1;
  		uParam0->f_737[iVar1 /*5*/].f_3 = MISC::GET_GAME_TIMER();
  		uParam0->f_737[iVar1 /*5*/].f_4 = sParam1;
  		uParam0->f_1007 = 1;
  		return 1;
  	}
  	return 0;
  }
  
  void func_173(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < *uParam0)
  	{
  		switch ((*uParam0)[iVar0 /*8*/])
  		{
  			case 1:
  				Stack.Push(uParam0[iVar0 /*8*/]);
  				Call_Loc((uParam0[iVar0 /*8*/])->f_7);
  				break;
  			
  			case 2:
  				if ((MISC::GET_GAME_TIMER() - (uParam0[iVar0 /*8*/])->f_5) > (uParam0[iVar0 /*8*/])->f_6)
  				{
  					(*uParam0)[iVar0 /*8*/] = 1;
  					(uParam0[iVar0 /*8*/])->f_6 = 0;
  				}
  				break;
  		}
  		iVar0++;
  	}
  }
  
  void func_174()
  {
  	int iVar0;
  	int iVar1;
  	bool bVar2;
  	bool bVar3;
  	int iVar4;
  	
  	bVar2 = false;
  	if (func_108(PLAYER::PLAYER_PED_ID(), Local_642, 1) < 70f)
  	{
  		HUD::FORCE_SONAR_BLIPS_THIS_FRAME();
  	}
  	if (iLocal_2598 == 9)
  	{
  		if (!iLocal_2597)
  		{
  			if (PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0))
  			{
  				AUDIO::PLAY_POLICE_REPORT("SCRIPTED_SCANNER_REPORT_JSH_PREP_1A_01", 0f);
  				iLocal_2597 = 1;
  			}
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(Local_469))
  		{
  			if (func_107(Local_469, PLAYER::PLAYER_PED_ID(), 1) > 300f)
  			{
  				ENTITY::SET_PED_AS_NO_LONGER_NEEDED(&Local_469);
  			}
  		}
  	}
  	if (ENTITY::DOES_ENTITY_EXIST(iLocal_2600) && VEHICLE::IS_VEHICLE_DRIVEABLE(iLocal_2600, false))
  	{
  		iVar0 = 0;
  		while (iVar0 <= 2)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar0 /*8*/], false))
  			{
  				if (VEHICLE::IS_VEHICLE_ATTACHED_TO_TOW_TRUCK(iLocal_2600, Local_579[iVar0 /*8*/]))
  				{
  					bVar2 = true;
  				}
  			}
  			iVar0++;
  		}
  		if (!bVar2)
  		{
  			iLocal_2600 = 0;
  		}
  	}
  	if (func_184())
  	{
  		iVar0 = 0;
  		while (iVar0 <= 2)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar0 /*8*/], false))
  			{
  				if (VEHICLE::IS_VEHICLE_ATTACHED_TO_TOW_TRUCK(PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false), Local_579[iVar0 /*8*/]))
  				{
  					iLocal_2600 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  				}
  			}
  			iVar0++;
  		}
  	}
  	func_177();
  	if (iLocal_651 == 0)
  	{
  		if (!ENTITY::IS_ENTITY_AT_COORD(PLAYER::PLAYER_PED_ID(), 182.9537f, -3119.884f, 101.9226f, 115f, 260f, 120f, false, true, 0))
  		{
  			bVar3 = true;
  		}
  		iVar1 = 0;
  		while (iVar1 < Local_28)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Local_28[iVar1 /*110*/]))
  			{
  				if ((Local_28[iVar1 /*110*/].f_5 == 5 && func_107(PLAYER::PLAYER_PED_ID(), Local_28[iVar1 /*110*/], 1) > 300f) && func_108(PLAYER::PLAYER_PED_ID(), Local_642, 1) > 300f)
  				{
  					PED::DELETE_PED(&(Local_28[iVar1 /*110*/]));
  				}
  			}
  			iVar1++;
  		}
  		iVar4 = 6;
  		iVar0 = 0;
  		while (iVar0 <= 2)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]))
  			{
  				if (!VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar0 /*8*/], false))
  				{
  					ENTITY::SET_VEHICLE_AS_NO_LONGER_NEEDED(&(Local_579[iVar0 /*8*/]));
  					if (HUD::DOES_BLIP_EXIST(Local_579[iVar0 /*8*/].f_1))
  					{
  						HUD::REMOVE_BLIP(&(Local_579[iVar0 /*8*/].f_1));
  					}
  					if (bVar3)
  					{
  						iVar4 = 1;
  					}
  					else
  					{
  						iVar4 = 2;
  					}
  				}
  				else if (func_109(Local_579[iVar0 /*8*/]))
  				{
  					if (HUD::DOES_BLIP_EXIST(Local_579[iVar0 /*8*/].f_1))
  					{
  						HUD::REMOVE_BLIP(&(Local_579[iVar0 /*8*/].f_1));
  					}
  					iVar4 = 3;
  				}
  				else if (!func_106(Local_579[iVar0 /*8*/]))
  				{
  					if (INTERIOR::GET_INTERIOR_FROM_ENTITY(Local_579[iVar0 /*8*/]) == iLocal_2552)
  					{
  						if (iVar4 != 4)
  						{
  							iVar4 = 5;
  						}
  					}
  					else
  					{
  						iVar4 = 4;
  					}
  				}
  			}
  			if (((((iLocal_2598 == 9 && func_102() != -1) && ENTITY::DOES_ENTITY_EXIST(Local_579[func_102() /*8*/])) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[func_102() /*8*/], false)) && !func_109(Local_579[func_102() /*8*/])) || (((iLocal_2598 == 10 && func_54() != -1) && ENTITY::DOES_ENTITY_EXIST(Local_579[func_54() /*8*/])) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[func_54() /*8*/], false)))
  			{
  				if (HUD::DOES_BLIP_EXIST(Local_579[iVar0 /*8*/].f_1))
  				{
  					HUD::REMOVE_BLIP(&(Local_579[iVar0 /*8*/].f_1));
  				}
  			}
  			else if ((((ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar0 /*8*/], false)) && !func_109(Local_579[iVar0 /*8*/])) && func_106(Local_579[iVar0 /*8*/])) && iLocal_652 == 0)
  			{
  				if (!HUD::DOES_BLIP_EXIST(Local_579[iVar0 /*8*/].f_1))
  				{
  					Local_579[iVar0 /*8*/].f_1 = func_176(Local_579[iVar0 /*8*/], 0, 0);
  					HUD::SET_BLIP_PRIORITY(Local_579[iVar0 /*8*/].f_1, 1);
  				}
  			}
  			iVar0++;
  		}
  		if (iLocal_2598 == 9 || iLocal_2598 == 10)
  		{
  			if (func_175("JHP1A_BKIN", 0, 0) || func_175("JHP1A_BKINANY", 0, 0))
  			{
  				HUD::CLEAR_PRINTS();
  			}
  		}
  		else if (iLocal_652 == 0)
  		{
  			if (!iLocal_2592)
  			{
  				if (func_105(1) == 1)
  				{
  					func_110("JHP1A_BKIN", 7500, 1);
  				}
  				iLocal_2592 = 1;
  			}
  		}
  		if (func_105(1) == 0)
  		{
  			if (iVar4 != 6)
  			{
  				func_289(iVar4);
  			}
  		}
  	}
  }
  
  bool func_175(char* sParam0, int iParam1, char* sParam2)
  {
  	HUD::BEGIN_TEXT_COMMAND_IS_MESSAGE_DISPLAYED(sParam0);
  	if (iParam1 == 1)
  	{
  		HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL(sParam2);
  	}
  	return HUD::END_TEXT_COMMAND_IS_MESSAGE_DISPLAYED();
  }
  
  int func_176(int iParam0, bool bParam1, bool bParam2)
  {
  	return func_58(iParam0, !bParam1, bParam2);
  }
  
  void func_177()
  {
  	if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
  	{
  		if (PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), Local_579[3 /*8*/], true))
  		{
  			iLocal_2598 = 11;
  		}
  		else if (func_183())
  		{
  			iLocal_2598 = 7;
  		}
  		else if (func_182())
  		{
  			iLocal_2598 = 6;
  		}
  		else if (func_103())
  		{
  			iLocal_2598 = 9;
  			iLocal_2592 = 0;
  		}
  		else if (func_99())
  		{
  			iLocal_2598 = 10;
  		}
  		else if (func_181())
  		{
  			iLocal_2598 = 8;
  		}
  		else if (((ENTITY::DOES_ENTITY_EXIST(iLocal_2601) && VEHICLE::IS_VEHICLE_DRIVEABLE(iLocal_2601, false)) && !PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iLocal_2601, true)) && ENTITY::IS_ENTITY_IN_ANGLED_AREA(iLocal_2601, Local_642, 119.7228f, -3092.472f, 13.46126f, 44f, false, true, 0))
  		{
  			iLocal_2598 = 5;
  		}
  		else if (((!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) && ENTITY::DOES_ENTITY_EXIST(PLAYER::GET_PLAYERS_LAST_VEHICLE())) && !func_180()) && ENTITY::IS_ENTITY_IN_ANGLED_AREA(PLAYER::GET_PLAYERS_LAST_VEHICLE(), Local_642, 119.7228f, -3092.472f, 13.46126f, 44f, false, true, 0))
  		{
  			iLocal_2601 = PLAYER::GET_PLAYERS_LAST_VEHICLE();
  			iLocal_2598 = 5;
  		}
  		else if (!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) && ENTITY::IS_ENTITY_IN_ANGLED_AREA(PLAYER::PLAYER_PED_ID(), Local_642, 119.7228f, -3092.472f, 13.46126f, 44f, false, true, 0))
  		{
  			iLocal_2598 = 2;
  		}
  		else if (((ENTITY::DOES_ENTITY_EXIST(iLocal_2601) && VEHICLE::IS_VEHICLE_DRIVEABLE(iLocal_2601, false)) && !PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iLocal_2601, true)) && (ENTITY::IS_ENTITY_IN_ANGLED_AREA(iLocal_2601, 170.8236f, -3092.406f, 4.849259f, 154.33f, -3092.45f, 9.783653f, 14.0625f, false, true, 0) || ENTITY::IS_ENTITY_AT_COORD(iLocal_2601, 115.7556f, -3092.294f, 7.576007f, 4.375f, 10.1875f, 2.5625f, false, true, 0)))
  		{
  			iLocal_2598 = 4;
  		}
  		else if (((!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) && ENTITY::DOES_ENTITY_EXIST(PLAYER::GET_PLAYERS_LAST_VEHICLE())) && !func_180()) && (ENTITY::IS_ENTITY_IN_ANGLED_AREA(PLAYER::GET_PLAYERS_LAST_VEHICLE(), 170.8236f, -3092.406f, 4.849259f, 154.33f, -3092.45f, 9.783653f, 14.0625f, false, true, 0) || ENTITY::IS_ENTITY_AT_COORD(PLAYER::GET_PLAYERS_LAST_VEHICLE(), 115.7556f, -3092.294f, 7.576007f, 4.375f, 10.1875f, 2.5625f, false, true, 0)))
  		{
  			iLocal_2601 = PLAYER::GET_PLAYERS_LAST_VEHICLE();
  			iLocal_2598 = 4;
  		}
  		else if ((PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) && !func_180()) && ENTITY::IS_ENTITY_IN_ANGLED_AREA(PLAYER::PLAYER_PED_ID(), Local_642, 119.7228f, -3092.472f, 13.46126f, 44f, false, true, 0))
  		{
  			iLocal_2601 = PLAYER::GET_PLAYERS_LAST_VEHICLE();
  			iLocal_2598 = 3;
  		}
  		else if ((PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) && !func_180()) && ENTITY::IS_ENTITY_IN_ANGLED_AREA(PLAYER::PLAYER_PED_ID(), 170.8236f, -3092.406f, 4.849259f, 154.33f, -3092.45f, 9.783653f, 14.0625f, false, true, 0))
  		{
  			iLocal_2601 = PLAYER::GET_PLAYERS_LAST_VEHICLE();
  			iLocal_2598 = 1;
  		}
  		else if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) && ENTITY::IS_ENTITY_AT_COORD(PLAYER::PLAYER_PED_ID(), 115.7556f, -3092.294f, 7.576007f, 4.375f, 10.1875f, 2.5625f, false, true, 0))
  		{
  			iLocal_2598 = 1;
  		}
  		else
  		{
  			iLocal_2601 = 0;
  			if (!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) && ENTITY::IS_ENTITY_AT_COORD(PLAYER::PLAYER_PED_ID(), 159.688f, -3092.446f, 7.314032f, 4.9375f, 7.3125f, 2.3125f, false, true, 0))
  			{
  				iLocal_2598 = 0;
  			}
  			else if (!PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) && ENTITY::IS_ENTITY_AT_COORD(PLAYER::PLAYER_PED_ID(), 115.7556f, -3092.294f, 7.576007f, 4.375f, 10.1875f, 2.5625f, false, true, 0))
  			{
  				iLocal_2598 = 0;
  			}
  			else
  			{
  				iLocal_2598 = -1;
  			}
  		}
  		if (iLocal_2598 == 1)
  		{
  			if (func_179(Local_28[0 /*110*/]))
  			{
  				func_178(Local_28[0 /*110*/], 120f, 20f, 120f, -90f, 90f);
  			}
  		}
  		else if (func_179(Local_28[0 /*110*/]))
  		{
  			func_178(Local_28[0 /*110*/], 17.5f, 10f, 120f, -90f, 90f);
  		}
  		if (bLocal_2595)
  		{
  			PED::SET_PED_RESET_FLAG(PLAYER::PLAYER_PED_ID(), 155, true);
  		}
  		if ((iLocal_2598 != -1 && PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0)) && PED::IS_COP_PED_IN_AREA_3D(Vector(101.9226f, -3119.884f, 182.9537f) - Vector(108.0625f, 239.75f, 94.25f), Vector(101.9226f, -3119.884f, 182.9537f) + Vector(108.0625f, 239.75f, 94.25f)))
  		{
  		}
  	}
  }
  
  void func_178(int iParam0, float fParam1, float fParam2, float fParam3, float fParam4, float fParam5)
  {
  	if (!PED::IS_PED_INJURED(iParam0))
  	{
  		PED::SET_PED_SEEING_RANGE(iParam0, fParam1);
  		PED::SET_PED_VISUAL_FIELD_PERIPHERAL_RANGE(iParam0, fParam2);
  		PED::SET_PED_VISUAL_FIELD_CENTER_ANGLE(iParam0, (fParam3 / 2f));
  		PED::SET_PED_VISUAL_FIELD_MIN_ANGLE(iParam0, fParam4);
  		PED::SET_PED_VISUAL_FIELD_MAX_ANGLE(iParam0, fParam5);
  	}
  }
  
  int func_179(int iParam0)
  {
  	if (iParam0 != 0 && ENTITY::DOES_ENTITY_EXIST(iParam0))
  	{
  		switch (ENTITY::GET_ENTITY_TYPE(iParam0))
  		{
  			case 1:
  				if (!PED::IS_PED_INJURED(ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iParam0)))
  				{
  					return 1;
  				}
  				break;
  			
  			case 2:
  				if (VEHICLE::IS_VEHICLE_DRIVEABLE(ENTITY::GET_VEHICLE_INDEX_FROM_ENTITY_INDEX(iParam0), false))
  				{
  					return 1;
  				}
  				break;
  			
  			default:
  				if (!ENTITY::IS_ENTITY_DEAD(iParam0, false))
  				{
  					return 1;
  				}
  				break;
  			}
  	}
  	return 0;
  }
  
  int func_180()
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 <= 2)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar0 /*8*/], false))
  		{
  			if (PLAYER::GET_PLAYERS_LAST_VEHICLE() == Local_579[iVar0 /*8*/])
  			{
  				return 1;
  			}
  		}
  		iVar0++;
  	}
  	return 0;
  }
  
  int func_181()
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 <= 2)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(Local_579[iVar0 /*8*/], PLAYER::PLAYER_PED_ID(), true))
  		{
  			return 1;
  		}
  		iVar0++;
  	}
  	return 0;
  }
  
  int func_182()
  {
  	int iVar0;
  	
  	if (PED::IS_PED_GETTING_INTO_A_VEHICLE(PLAYER::PLAYER_PED_ID()))
  	{
  		iVar0 = 0;
  		while (iVar0 <= 2)
  		{
  			if ((ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar0 /*8*/], false)) && PED::GET_VEHICLE_PED_IS_ENTERING(PLAYER::PLAYER_PED_ID()) == Local_579[iVar0 /*8*/])
  			{
  				return 1;
  			}
  			iVar0++;
  		}
  	}
  	return 0;
  }
  
  int func_183()
  {
  	int iVar0;
  	
  	if ((PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true) && !PED::IS_PED_SITTING_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID())) && !PED::IS_PED_GETTING_INTO_A_VEHICLE(PLAYER::PLAYER_PED_ID()))
  	{
  		iVar0 = 0;
  		while (iVar0 <= 2)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar0 /*8*/], false))
  			{
  				if (PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), Local_579[iVar0 /*8*/], true))
  				{
  					return 1;
  				}
  			}
  			iVar0++;
  		}
  	}
  	return 0;
  }
  
  int func_184()
  {
  	int iVar0;
  	
  	if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  	{
  		iVar0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false) && (ENTITY::GET_ENTITY_MODEL(iVar0) == joaat("towtruck") || ENTITY::GET_ENTITY_MODEL(iVar0) == joaat("towtruck2")))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_185()
  {
  	int iVar0;
  	
  	if (PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
  	{
  		func_289(6);
  	}
  	iVar0 = 0;
  	while (iVar0 < Local_28)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Local_28[iVar0 /*110*/]))
  		{
  			if (Local_28[iVar0 /*110*/].f_93)
  			{
  				if (Local_28[iVar0 /*110*/].f_102)
  				{
  					func_186(Local_28[iVar0 /*110*/], &(Local_28[iVar0 /*110*/].f_94), 3, 0, 0, 0, -1082130432, 0, -1, -1, 1, 0);
  				}
  				else
  				{
  					func_186(Local_28[iVar0 /*110*/], &(Local_28[iVar0 /*110*/].f_94), 2, 0, 0, 0, -1082130432, 0, -1, -1, 1, 0);
  				}
  			}
  			if (!func_179(Local_28[iVar0 /*110*/]))
  			{
  				if (Local_28[iVar0 /*110*/].f_103 == -1)
  				{
  					Local_28[iVar0 /*110*/].f_103 = MISC::GET_GAME_TIMER();
  				}
  				else if ((MISC::GET_GAME_TIMER() - Local_28[iVar0 /*110*/].f_103) >= 5000)
  				{
  				}
  			}
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < Local_579)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && Local_579[iVar0 /*8*/].f_7)
  		{
  			if (!func_179(Local_579[iVar0 /*8*/]))
  			{
  				if (HUD::DOES_BLIP_EXIST(Local_579[iVar0 /*8*/].f_1))
  				{
  					HUD::REMOVE_BLIP(&(Local_579[iVar0 /*8*/].f_1));
  				}
  				ENTITY::SET_VEHICLE_AS_NO_LONGER_NEEDED(&(Local_579[iVar0 /*8*/]));
  			}
  		}
  		iVar0++;
  	}
  }
  
  int func_186(int iParam0, var uParam1, int iParam2, int iParam3, bool bParam4, bool bParam5, float fParam6, char* sParam7, int iParam8, int iParam9, bool bParam10, int iParam11)
  {
  	bool bVar0;
  	
  	if (iParam3 == 0)
  	{
  		iParam3 = PLAYER::GET_PLAYER_INDEX();
  	}
  	if (fParam6 < 0f)
  	{
  		fParam6 = 100f;
  	}
  	if (!PED::IS_PED_INJURED(iParam0))
  	{
  		if (!HUD::DOES_PED_HAVE_AI_BLIP(iParam0))
  		{
  			bVar0 = true;
  			if (PED::IS_PED_IN_FLYING_VEHICLE(iParam0) && iParam11)
  			{
  				bVar0 = false;
  			}
  			if (bVar0)
  			{
  				if (iParam8 == -1)
  				{
  					HUD::SET_PED_HAS_AI_BLIP(iParam0, true);
  				}
  				else
  				{
  					HUD::_SET_PED_HAS_AI_BLIP_WITH_COLOR(iParam0, true, iParam8);
  				}
  				uParam1->f_7 = iParam0;
  				HUD::SET_PED_AI_BLIP_GANG_ID(iParam0, iParam2);
  				HUD::SET_PED_AI_BLIP_NOTICE_RANGE(iParam0, fParam6);
  				if (HUD::DOES_BLIP_EXIST(*uParam1))
  				{
  					HUD::SET_BLIP_PRIORITY(*uParam1, 7);
  				}
  			}
  		}
  		if (!iParam9 == -1)
  		{
  			HUD::_SET_PED_AI_BLIP_SPRITE(iParam0, iParam9);
  		}
  		HUD::SET_PED_AI_BLIP_FORCED_ON(iParam0, bParam4);
  		HUD::SET_PED_AI_BLIP_HAS_CONE(iParam0, bParam5);
  		*uParam1 = HUD::_GET_AI_BLIP_2(iParam0);
  		if (!iParam9 == -1)
  		{
  			if (HUD::DOES_BLIP_EXIST(*uParam1))
  			{
  				if (!iParam8 == -1)
  				{
  					HUD::SET_BLIP_COLOUR(*uParam1, iParam8);
  				}
  				if (!MISC::IS_STRING_NULL_OR_EMPTY(sParam7))
  				{
  					HUD::BEGIN_TEXT_COMMAND_SET_BLIP_NAME("STRING");
  					if (bParam10)
  					{
  						HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(sParam7);
  					}
  					else
  					{
  						HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL(sParam7);
  					}
  					HUD::END_TEXT_COMMAND_SET_BLIP_NAME(*uParam1);
  				}
  				HUD::SET_BLIP_PRIORITY(*uParam1, 7);
  			}
  		}
  		if (!MISC::IS_BIT_SET(uParam1->f_6, 2))
  		{
  			if (HUD::DOES_BLIP_EXIST(*uParam1))
  			{
  				MISC::SET_BIT(&(uParam1->f_6), 2);
  			}
  		}
  		if (PED::IS_PED_IN_ANY_VEHICLE(iParam0, false))
  		{
  			uParam1->f_1 = HUD::_GET_AI_BLIP(iParam0);
  			if (!MISC::IS_BIT_SET(uParam1->f_6, 3))
  			{
  				if (HUD::DOES_BLIP_EXIST(uParam1->f_1))
  				{
  					if (!iParam8 == -1)
  					{
  						HUD::SET_BLIP_COLOUR(uParam1->f_1, iParam8);
  					}
  					if (!MISC::IS_STRING_NULL_OR_EMPTY(sParam7))
  					{
  						HUD::BEGIN_TEXT_COMMAND_SET_BLIP_NAME("STRING");
  						if (bParam10)
  						{
  							HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(sParam7);
  						}
  						else
  						{
  							HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL(sParam7);
  						}
  						HUD::END_TEXT_COMMAND_SET_BLIP_NAME(uParam1->f_1);
  					}
  					HUD::SET_BLIP_PRIORITY(uParam1->f_1, 7);
  					MISC::SET_BIT(&(uParam1->f_6), 3);
  				}
  			}
  			else if (!HUD::DOES_BLIP_EXIST(uParam1->f_1))
  			{
  				uParam1->f_1 = 0;
  				MISC::CLEAR_BIT(&(uParam1->f_6), 3);
  			}
  		}
  		else if (HUD::DOES_BLIP_EXIST(uParam1->f_1))
  		{
  			uParam1->f_1 = 0;
  			MISC::CLEAR_BIT(&(uParam1->f_6), 3);
  		}
  	}
  	else
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_187()
  {
  	struct<3> Var0;
  	float fVar3;
  	
  	if (bLocal_654 == 1)
  	{
  		if (!CAM::IS_SCREEN_FADED_OUT())
  		{
  			if (!CAM::IS_SCREEN_FADING_OUT())
  			{
  				CAM::DO_SCREEN_FADE_OUT(1000);
  			}
  		}
  		else
  		{
  			if (CUTSCENE::IS_CUTSCENE_ACTIVE())
  			{
  				CUTSCENE::STOP_CUTSCENE(false);
  				CUTSCENE::REMOVE_CUTSCENE();
  			}
  			func_24(iLocal_655);
  			CAM::RENDER_SCRIPT_CAMS(false, false, 3000, true, false, 0);
  			HUD::CLEAR_PRINTS();
  			HUD::CLEAR_HELP(true);
  			func_8(1);
  			if (!func_235())
  			{
  				func_234(iLocal_651, &Var0, &fVar3);
  				ENTITY::SET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), Var0, true, false, false, true);
  				ENTITY::SET_ENTITY_HEADING(PLAYER::PLAYER_PED_ID(), fVar3);
  				ENTITY::FREEZE_ENTITY_POSITION(PLAYER::PLAYER_PED_ID(), true);
  				func_232(&uLocal_658, Var0, 50f, 0);
  			}
  			func_231(&uLocal_658);
  			switch (iLocal_651)
  			{
  				case 0:
  					func_171(&uLocal_658, joaat("burrito2"));
  					func_171(&uLocal_658, joaat("s_m_y_pestcont_01"));
  					func_171(&uLocal_658, joaat("s_m_m_security_01"));
  					func_171(&uLocal_658, joaat("dilettante2"));
  					func_171(&uLocal_658, joaat("p_amb_clipboard_01"));
  					func_230(&uLocal_658, &cLocal_645);
  					func_229(&uLocal_658, "misslsdhsclipboard@base");
  					func_229(&uLocal_658, "misslsdhsclipboard@idle_a");
  					func_229(&uLocal_658, "misstrevor3");
  					func_228(&uLocal_658, iLocal_2552);
  					if (((func_227() && !VEHICLE::IS_THIS_MODEL_A_BOAT(func_226())) && !VEHICLE::IS_THIS_MODEL_A_PLANE(func_226())) && !VEHICLE::IS_THIS_MODEL_A_HELI(func_226()))
  					{
  						func_171(&uLocal_658, func_226());
  					}
  					break;
  				
  				case 1:
  					func_171(&uLocal_658, joaat("burrito2"));
  					break;
  			}
  			while (!func_225(&uLocal_658))
  			{
  				SYSTEM::WAIT(0);
  				func_185();
  			}
  			switch (iLocal_651)
  			{
  				case 0:
  					if (((func_227() && !VEHICLE::IS_THIS_MODEL_A_BOAT(func_226())) && !VEHICLE::IS_THIS_MODEL_A_PLANE(func_226())) && !VEHICLE::IS_THIS_MODEL_A_HELI(func_226()))
  					{
  						while (!func_224())
  						{
  							SYSTEM::WAIT(0);
  						}
  						Local_579[4 /*8*/] = func_194(189.3979f, -2932.721f, 5.6127f, 180.5455f);
  					}
  					if (func_235())
  					{
  						if (ENTITY::DOES_ENTITY_EXIST(Local_579[4 /*8*/]))
  						{
  							func_191(Local_579[4 /*8*/], -1, 1);
  						}
  						else
  						{
  							func_191(0, -1, 1);
  						}
  					}
  					else
  					{
  						ENTITY::FREEZE_ENTITY_POSITION(PLAYER::PLAYER_PED_ID(), false);
  						if (ENTITY::DOES_ENTITY_EXIST(Local_579[4 /*8*/]))
  						{
  							PED::SET_PED_INTO_VEHICLE(PLAYER::PLAYER_PED_ID(), Local_579[4 /*8*/], -1);
  						}
  					}
  					while (!func_188(0))
  					{
  						SYSTEM::WAIT(0);
  					}
  					CAM::SET_GAMEPLAY_CAM_RELATIVE_HEADING(0f);
  					CAM::SET_GAMEPLAY_CAM_RELATIVE_PITCH(0f, 1f);
  					break;
  				
  				case 1:
  					if (!func_7(88))
  					{
  						Local_579[0 /*8*/] = VEHICLE::CREATE_VEHICLE(joaat("burrito2"), 693.725f, -1006.302f, 21.8355f, 359.884f, true, true, false);
  						VEHICLE::SET_VEHICLE_IS_CONSIDERED_BY_PLAYER(Local_579[0 /*8*/], false);
  						VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(Local_579[0 /*8*/], 5f);
  					}
  					if (func_235())
  					{
  						func_191(0, -1, 1);
  					}
  					else
  					{
  						ENTITY::FREEZE_ENTITY_POSITION(PLAYER::PLAYER_PED_ID(), false);
  					}
  					ENTITY::SET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 692.067f, -1004.812f, 21.9059f, true, false, false, true);
  					ENTITY::SET_ENTITY_HEADING(PLAYER::PLAYER_PED_ID(), 359.5735f);
  					CAM::SET_GAMEPLAY_CAM_RELATIVE_HEADING(0f);
  					CAM::SET_GAMEPLAY_CAM_RELATIVE_PITCH(0f, 1f);
  					break;
  			}
  			if (CAM::IS_SCREEN_FADED_OUT() || !CAM::IS_SCREEN_FADING_IN())
  			{
  				if (!func_7(88) || iLocal_651 != 1)
  				{
  					CAM::DO_SCREEN_FADE_IN(800);
  				}
  			}
  			bLocal_654 = false;
  		}
  	}
  }
  
  int func_188(bool bParam0)
  {
  	bool bVar0;
  	int iVar1;
  	int iVar2;
  	
  	bVar0 = false;
  	iVar1 = 1;
  	if (bParam0)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Global_95867[0]))
  		{
  			Local_579[0 /*8*/] = Global_95867[0];
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Local_579[0 /*8*/], true, true);
  		}
  		else
  		{
  			bVar0 = true;
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(Global_95867[1]))
  		{
  			Local_579[1 /*8*/] = Global_95867[1];
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Local_579[1 /*8*/], true, true);
  		}
  		else
  		{
  			bVar0 = true;
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(Global_95867[2]))
  		{
  			Local_579[2 /*8*/] = Global_95867[2];
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Local_579[2 /*8*/], true, true);
  		}
  		else
  		{
  			bVar0 = true;
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(Global_95867.f_9[0]))
  		{
  			Local_28[1 /*110*/] = Global_95867.f_9[0];
  			if (!PED::IS_PED_INJURED(Local_28[1 /*110*/]))
  			{
  				ENTITY::SET_ENTITY_LOAD_COLLISION_FLAG(Local_28[1 /*110*/], false, 1);
  			}
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Local_28[1 /*110*/], true, true);
  		}
  		else
  		{
  			bVar0 = true;
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(Global_95867.f_28[0]))
  		{
  			Local_28[1 /*110*/].f_105 = Global_95867.f_28[0];
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Local_28[1 /*110*/].f_105, true, true);
  		}
  		else
  		{
  			bVar0 = true;
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(Global_95867.f_9[2]))
  		{
  			Local_28[0 /*110*/] = Global_95867.f_9[2];
  			if (!PED::IS_PED_INJURED(Local_28[0 /*110*/]))
  			{
  				ENTITY::SET_ENTITY_LOAD_COLLISION_FLAG(Local_28[0 /*110*/], false, 1);
  			}
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Local_28[0 /*110*/], true, true);
  		}
  		else
  		{
  			bVar0 = true;
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(Global_95867.f_9[3]))
  		{
  			Local_28[2 /*110*/] = Global_95867.f_9[3];
  			if (!PED::IS_PED_INJURED(Local_28[3 /*110*/]))
  			{
  				ENTITY::SET_ENTITY_LOAD_COLLISION_FLAG(Local_28[2 /*110*/], false, 1);
  			}
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Local_28[2 /*110*/], true, true);
  		}
  		else
  		{
  			bVar0 = true;
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(Global_95867.f_9[4]))
  		{
  			Local_28[3 /*110*/] = Global_95867.f_9[4];
  			if (!PED::IS_PED_INJURED(Local_28[3 /*110*/]))
  			{
  				ENTITY::SET_ENTITY_LOAD_COLLISION_FLAG(Local_28[3 /*110*/], false, 1);
  			}
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Local_28[3 /*110*/], true, true);
  		}
  		else
  		{
  			bVar0 = true;
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(Global_95867.f_9[5]))
  		{
  			Local_469 = Global_95867.f_9[5];
  			if (!PED::IS_PED_INJURED(Local_469))
  			{
  				ENTITY::SET_ENTITY_LOAD_COLLISION_FLAG(Local_469, false, 1);
  			}
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Local_469, true, true);
  		}
  		else
  		{
  			bVar0 = true;
  		}
  		if (ENTITY::DOES_ENTITY_EXIST(Global_95867[3]))
  		{
  			Local_579[3 /*8*/] = Global_95867[3];
  			ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Local_579[3 /*8*/], true, true);
  		}
  		else
  		{
  			bVar0 = true;
  		}
  	}
  	else
  	{
  		if (!ENTITY::DOES_ENTITY_EXIST(Local_579[0 /*8*/]))
  		{
  			Local_579[0 /*8*/] = VEHICLE::CREATE_VEHICLE(joaat("burrito2"), 148.7243f, -3104.619f, 4.8962f, 179.6158f, true, true, false);
  		}
  		if (!ENTITY::DOES_ENTITY_EXIST(Local_579[1 /*8*/]))
  		{
  			Local_579[1 /*8*/] = VEHICLE::CREATE_VEHICLE(joaat("burrito2"), 145.9856f, -3080f, 4.8962f, 269.0827f, true, true, false);
  		}
  		if (!ENTITY::DOES_ENTITY_EXIST(Local_579[2 /*8*/]))
  		{
  			Local_579[2 /*8*/] = VEHICLE::CREATE_VEHICLE(joaat("burrito2"), 129.9696f, -3089.331f, 4.8796f, 269.9255f, true, true, false);
  		}
  		if (!ENTITY::DOES_ENTITY_EXIST(Local_28[1 /*110*/]))
  		{
  			Local_28[1 /*110*/] = PED::CREATE_PED(26, joaat("s_m_y_pestcont_01"), 126.2174f, -3089.383f, 4.9199f, 275.4068f, true, true);
  			ENTITY::SET_ENTITY_HEALTH(Local_28[1 /*110*/], 150, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[1 /*110*/], 8, 1, 0, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[1 /*110*/], 0, 0, 2, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[1 /*110*/], 3, 0, 1, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[1 /*110*/], 4, 0, 1, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[1 /*110*/], 8, 0, 0, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[1 /*110*/], 10, 1, 0, 0);
  			PED::SET_PED_PROP_INDEX(Local_28[1 /*110*/], 0, 1, 0, false);
  			PED::SET_PED_PROP_INDEX(Local_28[1 /*110*/], 1, 0, 0, false);
  			PED::SET_PED_LOD_MULTIPLIER(Local_28[1 /*110*/], 2f);
  		}
  		if (!ENTITY::DOES_ENTITY_EXIST(Local_28[1 /*110*/].f_105))
  		{
  			Local_28[1 /*110*/].f_105 = OBJECT::CREATE_OBJECT(joaat("p_amb_clipboard_01"), PED::GET_PED_BONE_COORDS(Local_28[1 /*110*/], 60309, 0f, 0f, 0f), true, true, false);
  			ENTITY::ATTACH_ENTITY_TO_ENTITY(Local_28[1 /*110*/].f_105, Local_28[1 /*110*/], PED::GET_PED_BONE_INDEX(Local_28[1 /*110*/], 60309), 0f, 0f, 0f, 0f, 0f, 0f, true, true, true, false, 2, true);
  		}
  		if (!ENTITY::DOES_ENTITY_EXIST(Local_28[0 /*110*/]))
  		{
  			Local_28[0 /*110*/] = PED::CREATE_PED(26, joaat("s_m_y_pestcont_01"), 155.74f, -3098.89f, 5.93f, 0f, true, true);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[0 /*110*/], 0, 0, 0, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[0 /*110*/], 3, 0, 0, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[0 /*110*/], 4, 0, 0, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[0 /*110*/], 8, 1, 0, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[0 /*110*/], 10, 0, 0, 0);
  			PED::SET_PED_PROP_INDEX(Local_28[0 /*110*/], 0, 0, 0, false);
  			PED::SET_PED_LOD_MULTIPLIER(Local_28[0 /*110*/], 2f);
  		}
  		if (!ENTITY::DOES_ENTITY_EXIST(Local_28[2 /*110*/]))
  		{
  			Local_28[2 /*110*/] = PED::CREATE_PED(26, joaat("s_m_y_pestcont_01"), 159.8f, -3085.96f, 6f, 0f, true, true);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[2 /*110*/], 0, 0, 1, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[2 /*110*/], 3, 0, 2, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[2 /*110*/], 4, 0, 2, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[2 /*110*/], 8, 1, 0, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[2 /*110*/], 10, 1, 0, 0);
  			PED::SET_PED_PROP_INDEX(Local_28[2 /*110*/], 1, 0, 0, false);
  			PED::SET_PED_LOD_MULTIPLIER(Local_28[2 /*110*/], 2f);
  		}
  		if (!ENTITY::DOES_ENTITY_EXIST(Local_28[3 /*110*/]))
  		{
  			Local_28[3 /*110*/] = PED::CREATE_PED(26, joaat("s_m_y_pestcont_01"), 159.06f, -3085f, 6.01f, 0f, true, true);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[3 /*110*/], 0, 1, 1, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[3 /*110*/], 3, 0, 3, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[3 /*110*/], 4, 0, 3, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[3 /*110*/], 8, 1, 0, 0);
  			PED::SET_PED_COMPONENT_VARIATION(Local_28[3 /*110*/], 10, 0, 0, 0);
  			PED::SET_PED_PROP_INDEX(Local_28[3 /*110*/], 0, 0, 0, false);
  			PED::SET_PED_LOD_MULTIPLIER(Local_28[3 /*110*/], 2f);
  		}
  		if (!ENTITY::DOES_ENTITY_EXIST(Local_469) && !ENTITY::DOES_ENTITY_EXIST(Local_579[3 /*8*/]))
  		{
  			if (CLOCK::GET_CLOCK_HOURS() >= 5 && CLOCK::GET_CLOCK_HOURS() < 21)
  			{
  				Local_579[3 /*8*/] = VEHICLE::CREATE_VEHICLE(joaat("dilettante2"), 144.84f, -2982.75f, 5.32f, 266.5972f, true, true, false);
  				Local_469 = PED::CREATE_PED_INSIDE_VEHICLE(Local_579[3 /*8*/], 26, joaat("s_m_m_security_01"), -1, true, true);
  			}
  			else
  			{
  				Local_579[3 /*8*/] = VEHICLE::CREATE_VEHICLE(joaat("dilettante2"), 169.3554f, -3110.025f, 4.8228f, 88.4411f, true, true, false);
  				Local_469 = PED::CREATE_PED(26, joaat("s_m_m_security_01"), 161.7414f, -3117.074f, 4.9643f, 333.7041f, true, true);
  			}
  		}
  	}
  	if (ENTITY::DOES_ENTITY_EXIST(Local_579[0 /*8*/]))
  	{
  		func_190(Local_579[0 /*8*/], 0);
  		VEHICLE::SET_VEHICLE_DOORS_LOCKED(Local_579[0 /*8*/], 7);
  		VEHICLE::SET_VEHICLE_ALARM(Local_579[0 /*8*/], true);
  		VEHICLE::SET_VEHICLE_HAS_STRONG_AXLES(Local_579[0 /*8*/], true);
  		Local_579[0 /*8*/].f_7 = 0;
  	}
  	if (ENTITY::DOES_ENTITY_EXIST(Local_579[1 /*8*/]))
  	{
  		func_190(Local_579[1 /*8*/], 1);
  		VEHICLE::SET_VEHICLE_ENGINE_ON(Local_579[1 /*8*/], true, true, false);
  		VEHICLE::_SET_VEHICLE_DOOR_CAN_BREAK(Local_579[1 /*8*/], 4, false);
  		VEHICLE::SET_VEHICLE_DOOR_OPEN(Local_579[1 /*8*/], 0, true, false);
  		VEHICLE::SET_VEHICLE_DOOR_OPEN(Local_579[1 /*8*/], 4, false, true);
  		VEHICLE::SET_VEHICLE_HAS_STRONG_AXLES(Local_579[1 /*8*/], true);
  		Local_579[1 /*8*/].f_7 = 0;
  	}
  	if (ENTITY::DOES_ENTITY_EXIST(Local_579[2 /*8*/]))
  	{
  		func_190(Local_579[2 /*8*/], 2);
  		VEHICLE::SET_VEHICLE_DOOR_OPEN(Local_579[2 /*8*/], 2, true, false);
  		VEHICLE::SET_VEHICLE_DOOR_OPEN(Local_579[2 /*8*/], 3, true, false);
  		VEHICLE::SET_VEHICLE_HAS_STRONG_AXLES(Local_579[2 /*8*/], true);
  		Local_579[2 /*8*/].f_7 = 0;
  	}
  	if (ENTITY::DOES_ENTITY_EXIST(Local_28[1 /*110*/]))
  	{
  		PED::SET_PED_NAME_DEBUG(Local_28[1 /*110*/], &(Local_28[1 /*110*/].f_1));
  		PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(Local_28[1 /*110*/], true);
  		PED::SET_PED_RELATIONSHIP_GROUP_HASH(Local_28[1 /*110*/], iLocal_2550);
  		AUDIO::STOP_PED_SPEAKING(Local_28[1 /*110*/], true);
  		func_178(Local_28[1 /*110*/], 20f, 5f, 90f, -90f, 90f);
  		PED::SET_PED_HEARING_RANGE(Local_28[1 /*110*/], 50f);
  		StringCopy(&(Local_28[1 /*110*/].f_1), "foreman2(rear)", 16);
  		Local_28[1 /*110*/].f_42 = 20f;
  		Local_28[1 /*110*/].f_86 = 1;
  		Local_28[1 /*110*/].f_87 = 1;
  		Local_28[1 /*110*/].f_107 = joaat("p_amb_clipboard_01");
  		Local_28[1 /*110*/].f_106 = 60309;
  		Local_28[1 /*110*/].f_108 = 0;
  	}
  	if (ENTITY::DOES_ENTITY_EXIST(Local_28[0 /*110*/]))
  	{
  		PED::SET_PED_NAME_DEBUG(Local_28[0 /*110*/], &(Local_28[0 /*110*/].f_1));
  		PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(Local_28[0 /*110*/], true);
  		PED::SET_PED_RELATIONSHIP_GROUP_HASH(Local_28[0 /*110*/], iLocal_2550);
  		AUDIO::STOP_PED_SPEAKING(Local_28[0 /*110*/], true);
  		func_178(Local_28[0 /*110*/], 17.5f, 10f, 120f, -90f, 90f);
  		PED::SET_PED_HEARING_RANGE(Local_28[0 /*110*/], 50f);
  		StringCopy(&(Local_28[0 /*110*/].f_1), "foreman1(front)", 16);
  		Local_28[0 /*110*/].f_86 = 1;
  		Local_28[0 /*110*/].f_87 = 1;
  		Local_28[0 /*110*/].f_42 = 17.5f;
  	}
  	if (ENTITY::DOES_ENTITY_EXIST(Local_28[2 /*110*/]))
  	{
  		PED::SET_PED_NAME_DEBUG(Local_28[2 /*110*/], &(Local_28[2 /*110*/].f_1));
  		PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(Local_28[2 /*110*/], true);
  		PED::SET_PED_RELATIONSHIP_GROUP_HASH(Local_28[2 /*110*/], iLocal_2550);
  		func_178(Local_28[2 /*110*/], 20f, 5f, 90f, -90f, 90f);
  		AUDIO::STOP_PED_SPEAKING(Local_28[2 /*110*/], true);
  		PED::SET_PED_HEARING_RANGE(Local_28[2 /*110*/], 50f);
  		StringCopy(&(Local_28[2 /*110*/].f_1), "front 1", 16);
  		Local_28[2 /*110*/].f_86 = 0;
  		Local_28[2 /*110*/].f_87 = 0;
  		Local_28[2 /*110*/].f_42 = 17.5f;
  	}
  	if (ENTITY::DOES_ENTITY_EXIST(Local_28[3 /*110*/]))
  	{
  		PED::SET_PED_NAME_DEBUG(Local_28[3 /*110*/], &(Local_28[3 /*110*/].f_1));
  		PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(Local_28[3 /*110*/], true);
  		PED::SET_PED_RELATIONSHIP_GROUP_HASH(Local_28[3 /*110*/], iLocal_2550);
  		PED::SET_PED_HEARING_RANGE(Local_28[3 /*110*/], 50f);
  		func_178(Local_28[3 /*110*/], 20f, 5f, 90f, -90f, 90f);
  		AUDIO::STOP_PED_SPEAKING(Local_28[3 /*110*/], true);
  		StringCopy(&(Local_28[3 /*110*/].f_1), "front 2", 16);
  		Local_28[3 /*110*/].f_86 = 0;
  		Local_28[3 /*110*/].f_87 = 0;
  		Local_28[3 /*110*/].f_42 = 17.5f;
  	}
  	if (ENTITY::DOES_ENTITY_EXIST(Local_469) && ENTITY::DOES_ENTITY_EXIST(Local_579[3 /*8*/]))
  	{
  		PED::SET_PED_NAME_DEBUG(Local_469, &(Local_469.f_1));
  		PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(Local_469, true);
  		PED::SET_PED_RELATIONSHIP_GROUP_HASH(Local_469, iLocal_2550);
  		PED::SET_PED_TARGET_LOSS_RESPONSE(Local_469, 2);
  		PED::SET_PED_COMBAT_ATTRIBUTES(Local_469, 2, false);
  		WEAPON::GIVE_WEAPON_TO_PED(Local_469, joaat("weapon_nightstick"), -1, false, true);
  		PED::SET_PED_ACCURACY(Local_469, 5);
  		func_178(Local_469, 40f, 5f, 90f, -90f, 90f);
  		StringCopy(&(Local_469.f_1), "sec", 16);
  		Local_469.f_86 = 1;
  		Local_469.f_87 = 1;
  		Local_469.f_93 = 0;
  		if (Global_95867.f_357 == 1)
  		{
  			if (!func_189(Local_469, 242628503, 1))
  			{
  				if (TASK::DOES_SCENARIO_OF_TYPE_EXIST_IN_AREA(203.68f, -3132.46f, 4.79f, "WORLD_HUMAN_SMOKING", 1f, true))
  				{
  					iLocal_2602 = 0;
  					TASK::OPEN_SEQUENCE_TASK(&iVar2);
  					TASK::TASK_VEHICLE_FOLLOW_WAYPOINT_RECORDING(0, Local_579[3 /*8*/], &cLocal_645, 786599, 0, 0, -1, -1f, false, 2f);
  					TASK::TASK_LEAVE_VEHICLE(0, Local_579[3 /*8*/], 0);
  					TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD(0, 203.68f, -3132.46f, 4.79f, 1f, 0);
  					TASK::CLOSE_SEQUENCE_TASK(iVar2);
  					TASK::TASK_PERFORM_SEQUENCE(Local_469, iVar2);
  					TASK::CLEAR_SEQUENCE_TASK(&iVar2);
  				}
  				else
  				{
  					iVar1 = 0;
  				}
  			}
  		}
  		else if (!func_189(Local_469, -1680762137, 1))
  		{
  			if (TASK::DOES_SCENARIO_OF_TYPE_EXIST_IN_AREA(162.69f, -3115.67f, 4.95f, "WORLD_HUMAN_SECURITY_SHINE_TORCH", 1f, true))
  			{
  				iLocal_2602 = 1;
  				TASK::TASK_USE_NEAREST_SCENARIO_CHAIN_TO_COORD_WARP(Local_469, 162.69f, -3115.67f, 4.95f, 1f, 0);
  			}
  			else
  			{
  				iVar1 = 0;
  			}
  		}
  	}
  	if (((((((((ENTITY::DOES_ENTITY_EXIST(Local_579[0 /*8*/]) && ENTITY::DOES_ENTITY_EXIST(Local_579[1 /*8*/])) && ENTITY::DOES_ENTITY_EXIST(Local_579[2 /*8*/])) && ENTITY::DOES_ENTITY_EXIST(Local_579[3 /*8*/])) && ENTITY::DOES_ENTITY_EXIST(Local_28[1 /*110*/])) && ENTITY::DOES_ENTITY_EXIST(Local_28[0 /*110*/])) && ENTITY::DOES_ENTITY_EXIST(Local_28[2 /*110*/])) && ENTITY::DOES_ENTITY_EXIST(Local_28[3 /*110*/])) && ENTITY::DOES_ENTITY_EXIST(Local_469)) && iVar1)
  	{
  		return 1;
  	}
  	else if (bVar0)
  	{
  		return 0;
  	}
  	return 0;
  }
  
  int func_189(int iParam0, int iParam1, bool bParam2)
  {
  	int iVar0;
  	
  	iVar0 = TASK::GET_SCRIPT_TASK_STATUS(iParam0, iParam1);
  	if (iVar0 == 1 || iVar0 == 0)
  	{
  		return 1;
  	}
  	else if (!bParam2)
  	{
  		if (iVar0 == 2 || iVar0 == 3)
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_190(var uParam0, int iParam1)
  {
  	Global_99370.f_22[iParam1] = uParam0;
  }
  
  void func_191(int iParam0, int iParam1, int iParam2)
  {
  	if (func_193() && func_235())
  	{
  		while (Global_99365 != 6)
  		{
  			SYSTEM::WAIT(0);
  		}
  		MISC::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, false))
  					{
  						if (!PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), iParam0, false))
  						{
  							PED::SET_PED_INTO_VEHICLE(PLAYER::PLAYER_PED_ID(), iParam0, iParam1);
  							CAM::SET_GAMEPLAY_CAM_RELATIVE_PITCH(0f, 1f);
  							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::ANIMPOSTFX_STOP_ALL();
  		func_192(0);
  	}
  }
  
  void func_192(int iParam0)
  {
  	if (iParam0 == 1)
  	{
  		MISC::SET_BIT(&(Global_99370.f_20), 13);
  	}
  	else
  	{
  		MISC::CLEAR_BIT(&(Global_99370.f_20), 13);
  	}
  }
  
  int func_193()
  {
  	if (Global_99370 == 10 || Global_99370 == 9)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_194(struct<3> Param0, float fParam3)
  {
  	return func_195(&(Global_105842.f_2890), Param0, fParam3, 0);
  }
  
  int func_195(var uParam0, struct<3> Param1, float fParam4, bool bParam5)
  {
  	int iVar0;
  	struct<3> Var1;
  	bool bVar4;
  	var uVar5;
  	int iVar8;
  	
  	if (func_223(uParam0))
  	{
  		if (func_154(Param1, 0f, 0f, 0f, 0))
  		{
  			Param1 = { *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(Param1, -816.8716f, 185.6238f, 71.40275f, -807.4894f, 189.3762f, 75.27323f, 6.5f, false, true))
  			{
  				Param1 = { -850.93f, 158.82f, 65.7f };
  				fParam4 = 89.5f;
  			}
  		}
  		if (func_222(uParam0))
  		{
  			MISC::CLEAR_AREA(Param1, 5f, true, false, false, false);
  			func_221(Param1, 5f, 0);
  			iVar0 = VEHICLE::CREATE_VEHICLE(uParam0->f_12.f_66, Param1, fParam4, true, true, false);
  			if (ENTITY::DOES_ENTITY_EXIST(iVar0))
  			{
  				Var1 = { ENTITY::GET_ENTITY_COORDS(iVar0, true) };
  				if (SYSTEM::VDIST2(Var1, -1151.15f, -1530.32f, 7.48925f) <= 3f)
  				{
  					ENTITY::SET_ENTITY_COORDS_NO_OFFSET(iVar0, Param1, false, false, true);
  				}
  				func_204(iVar0, &(uParam0->f_12), 0, 1);
  				bVar4 = true;
  				if (VEHICLE::IS_THIS_MODEL_A_BOAT(uParam0->f_12.f_66) || VEHICLE::IS_THIS_MODEL_A_JETSKI(uParam0->f_12.f_66))
  				{
  					if (!WATER::TEST_PROBE_AGAINST_WATER(Param1.x, Param1.f_1, (Param1.f_2 + 30f), Param1.x, Param1.f_1, (Param1.f_2 - 30f), &uVar5))
  					{
  						bVar4 = false;
  					}
  				}
  				if (bVar4)
  				{
  					VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(iVar0, 5f);
  				}
  				if (uParam0->f_7 == 1)
  				{
  					if (bParam5)
  					{
  						if (VEHICLE::IS_THIS_MODEL_A_CAR(ENTITY::GET_ENTITY_MODEL(iVar0)))
  						{
  							func_203(uParam0->f_11, 1);
  						}
  						else if (VEHICLE::IS_THIS_MODEL_A_BIKE(ENTITY::GET_ENTITY_MODEL(iVar0)))
  						{
  							func_203(uParam0->f_11, 2);
  						}
  					}
  					VEHICLE::_0xAB04325045427AAE(iVar0, false);
  					VEHICLE::SET_VEHICLE_CAN_SAVE_IN_GARAGE(iVar0, false);
  					VEHICLE::SET_VEHICLE_HAS_STRONG_AXLES(iVar0, true);
  					func_202(iVar0, uParam0->f_11);
  				}
  				else if ((!func_200(iVar0, uParam0->f_3, uParam0->f_8) && uParam0->f_10) && MISC::ARE_STRINGS_EQUAL(SCRIPT::GET_THIS_SCRIPT_NAME(), "startup_positioning"))
  				{
  					iVar8 = func_199(iVar0);
  					if (iVar8 == -1)
  					{
  						uParam0->f_10 = 0;
  					}
  					else
  					{
  						func_196(iVar8);
  					}
  				}
  				if (((Global_99370 != 13 && Global_99370 != 10) && Global_99370 != 11) && Global_99370 != 12)
  				{
  					if (MISC::GET_HASH_KEY(&(Global_99370.f_3)) == Global_77054)
  					{
  						if (uParam0->f_12.f_66 == Global_112293.f_32747.f_69[21 /*78*/].f_66)
  						{
  							func_148(24, 0);
  							func_196(24);
  						}
  					}
  				}
  				if (uParam0->f_9 == 1)
  				{
  					func_114(iVar0, uParam0->f_11);
  				}
  				STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(uParam0->f_12.f_66);
  				Var1 = { ENTITY::GET_ENTITY_COORDS(iVar0, true) };
  			}
  			return iVar0;
  		}
  	}
  	return iVar0;
  }
  
  void func_196(int iParam0)
  {
  	bool bVar0;
  	
  	if (iParam0 == -1)
  	{
  		return;
  	}
  	if (func_143(&(Global_76066.f_555[0 /*21*/]), iParam0))
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Global_76066.f_139[iParam0]))
  		{
  			bVar0 = true;
  			if (!PED::IS_PED_INJURED(PLAYER::PLAYER_PED_ID()))
  			{
  				if (VEHICLE::IS_VEHICLE_DRIVEABLE(Global_76066.f_139[iParam0], false))
  				{
  					if (PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), Global_76066.f_139[iParam0], false))
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			if (bVar0)
  			{
  				ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Global_76066.f_139[iParam0], true, true);
  				VEHICLE::DELETE_VEHICLE(&(Global_76066.f_139[iParam0]));
  			}
  		}
  		Global_76066[iParam0] = 1;
  		if (MISC::IS_BIT_SET(Global_76066.f_555[0 /*21*/].f_9, 13))
  		{
  			if (((((iParam0 == 24 && func_150(iParam0, 0)) && Global_76975.f_66 == 0) && Global_112293.f_32747.f_1958[Global_76066.f_555[0 /*21*/].f_14] != 0) && Global_112293.f_32747.f_1958[Global_76066.f_555[0 /*21*/].f_14] > 3) && (!func_197(0, Global_76066.f_555[0 /*21*/].f_12) || !func_197(1, Global_76066.f_555[0 /*21*/].f_12)))
  			{
  				func_151(&(Global_112293.f_32747.f_69[Global_76066.f_555[0 /*21*/].f_14 /*78*/]), &Global_76975);
  				Global_77053 = Global_112293.f_32747.f_5591;
  			}
  			func_148(iParam0, 0);
  		}
  	}
  }
  
  int func_197(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	switch (iParam1)
  	{
  		case 0:
  			iVar0 = 0;
  			break;
  		
  		case 1:
  			iVar0 = 1;
  			break;
  		
  		case 2:
  			iVar0 = 2;
  			break;
  	}
  	if (iParam0 < 0 || iParam0 >= func_198(&(Global_112293.f_32747.f_5038[iVar0 /*157*/])))
  	{
  		return 0;
  	}
  	return func_117(Global_112293.f_32747.f_5038[iVar0 /*157*/][iParam0 /*78*/].f_66, 0);
  }
  
  int func_198(var uParam0)
  {
  	return *uParam0;
  }
  
  int func_199(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	int iVar4;
  	
  	iVar0 = 0;
  	while (iVar0 < 68)
  	{
  		if ((ENTITY::DOES_ENTITY_EXIST(Global_76066.f_484[iVar0]) && !ENTITY::IS_ENTITY_DEAD(Global_76066.f_484[iVar0], false)) && VEHICLE::IS_VEHICLE_DRIVEABLE(Global_76066.f_484[iVar0], false))
  		{
  			VEHICLE::GET_VEHICLE_COLOURS(iParam0, &iVar1, &iVar2);
  			VEHICLE::GET_VEHICLE_COLOURS(Global_76066.f_484[iVar0], &iVar3, &iVar4);
  			if (((ENTITY::GET_ENTITY_MODEL(iParam0) == ENTITY::GET_ENTITY_MODEL(Global_76066.f_484[iVar0]) && VEHICLE::GET_VEHICLE_LIVERY(iParam0) == VEHICLE::GET_VEHICLE_LIVERY(Global_76066.f_484[iVar0])) && iVar1 == iVar2) && iVar3 == iVar4)
  			{
  				return iVar0;
  			}
  		}
  		iVar0++;
  	}
  	return -1;
  }
  
  int func_200(int iParam0, struct<3> Param1, bool bParam4)
  {
  	int iVar0;
  	var uVar1[3];
  	int iVar5;
  	int iVar6;
  	
  	iVar0 = ENTITY::GET_ENTITY_MODEL(iParam0);
  	switch (iVar0)
  	{
  		case joaat("cargobob"):
  			if (func_201(iParam0, Global_76066.f_139[38], 0))
  			{
  				func_196(38);
  				return 1;
  			}
  			break;
  		
  		case joaat("firetruk"):
  			if (func_201(iParam0, Global_76066.f_139[43], 1))
  			{
  				func_196(43);
  				return 1;
  			}
  			break;
  		
  		case joaat("cuban800"):
  			iVar5 = PED::GET_PED_NEARBY_VEHICLES(PLAYER::PLAYER_PED_ID(), &uVar1);
  			iVar6 = 0;
  			while (iVar6 <= (iVar5 - 1))
  			{
  				if (func_201(iParam0, uVar1[iVar6], 1) && func_65(ENTITY::GET_ENTITY_COORDS(uVar1[iVar6], true), 2136.133f, 4780.563f, 39.9702f, 5f, 0))
  				{
  					if ((!bParam4 || func_154(Param1, 0f, 0f, 0f, 0)) || MISC::GET_DISTANCE_BETWEEN_COORDS(ENTITY::GET_ENTITY_COORDS(iParam0, true), ENTITY::GET_ENTITY_COORDS(uVar1[iVar6], true), true) < 10f)
  					{
  						VEHICLE::DELETE_VEHICLE(&iParam0);
  						return 1;
  					}
  					else
  					{
  						return 0;
  					}
  				}
  				iVar6++;
  			}
  			break;
  		
  		case joaat("luxor2"):
  			if ((ENTITY::DOES_ENTITY_EXIST(Global_76066.f_484[14]) && VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false)) && VEHICLE::IS_VEHICLE_DRIVEABLE(Global_76066.f_484[14], false))
  			{
  				if (ENTITY::GET_ENTITY_MODEL(Global_76066.f_484[14]) == joaat("luxor2") && VEHICLE::GET_VEHICLE_LIVERY(iParam0) == VEHICLE::GET_VEHICLE_LIVERY(Global_76066.f_484[14]))
  				{
  					func_196(14);
  					return 1;
  				}
  			}
  			break;
  		
  		case joaat("swift2"):
  			if ((ENTITY::DOES_ENTITY_EXIST(Global_76066.f_484[20]) && VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false)) && VEHICLE::IS_VEHICLE_DRIVEABLE(Global_76066.f_484[20], false))
  			{
  				if (ENTITY::GET_ENTITY_MODEL(Global_76066.f_484[20]) == joaat("swift2") && VEHICLE::GET_VEHICLE_LIVERY(iParam0) == VEHICLE::GET_VEHICLE_LIVERY(Global_76066.f_484[20]))
  				{
  					func_196(20);
  					return 1;
  				}
  			}
  			break;
  	}
  	return 0;
  }
  
  int func_201(int iParam0, int iParam1, bool bParam2)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	
  	if ((ENTITY::DOES_ENTITY_EXIST(iParam1) && !ENTITY::IS_ENTITY_DEAD(iParam1, false)) && VEHICLE::IS_VEHICLE_DRIVEABLE(iParam1, false))
  	{
  		if (bParam2)
  		{
  			VEHICLE::GET_VEHICLE_COLOURS(iParam0, &iVar0, &iVar1);
  			VEHICLE::GET_VEHICLE_COLOURS(iParam1, &iVar2, &iVar3);
  			if (iVar0 == iVar2 && iVar1 == iVar3)
  			{
  				return 1;
  			}
  		}
  		else
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_202(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 9)
  	{
  		if (!ENTITY::DOES_ENTITY_EXIST(Global_96701[iVar0]))
  		{
  			Global_96701[iVar0] = iParam0;
  			Global_96711[iVar0] = iParam1;
  			Global_96721[iVar0] = ENTITY::GET_ENTITY_MODEL(iParam0);
  			if (VEHICLE::IS_THIS_MODEL_A_CAR(Global_96721[iVar0]))
  			{
  				Global_96749[iParam1 /*3*/][0] = -1;
  			}
  			else
  			{
  				Global_96749[iParam1 /*3*/][1] = -1;
  			}
  			iVar0 = 9;
  		}
  		if (iVar0 == 8)
  		{
  		}
  		iVar0++;
  	}
  }
  
  void func_203(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 9)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Global_96701[iVar0]))
  		{
  			if (iParam0 == 145 || Global_96711[iVar0] == iParam0)
  			{
  				if (iParam1 == 0 || ENTITY::GET_ENTITY_MODEL(Global_96701[iVar0]) == func_144(iParam0, iParam1))
  				{
  					if (!PED::IS_PED_IN_VEHICLE(PLAYER::PLAYER_PED_ID(), Global_96701[iVar0], false))
  					{
  						ENTITY::SET_ENTITY_AS_MISSION_ENTITY(Global_96701[iVar0], false, true);
  						VEHICLE::DELETE_VEHICLE(&(Global_96701[iVar0]));
  						Global_96711[iVar0] = 145;
  					}
  				}
  			}
  		}
  		iVar0++;
  	}
  }
  
  void func_204(int iParam0, var uParam1, bool bParam2, bool bParam3)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	int iVar3;
  	int iVar4;
  	int iVar5;
  	
  	if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		if (uParam1->f_66 != 0)
  		{
  		}
  		if (!func_213(iParam0))
  		{
  			if (MISC::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 (MISC::IS_BIT_SET(uParam1->f_77, func_156(iVar0 + 1)))
  			{
  			}
  			else
  			{
  				MISC::SET_BIT(&(uParam1->f_77), func_156(iVar0 + 1));
  			}
  		}
  		else if (uParam1->f_66 == joaat("sandking") || uParam1->f_66 == joaat("sandking2"))
  		{
  			iVar1 = 1;
  			if (MISC::IS_BIT_SET(uParam1->f_77, func_156(iVar1 + 1)))
  			{
  			}
  			else
  			{
  				MISC::SET_BIT(&(uParam1->f_77), func_156(iVar1 + 1));
  			}
  		}
  		else if (uParam1->f_66 == joaat("formula") || uParam1->f_66 == joaat("formula2"))
  		{
  			iVar2 = 1;
  			while (iVar2 <= 9)
  			{
  				if (MISC::IS_BIT_SET(uParam1->f_77, func_156(iVar2)))
  				{
  				}
  				else
  				{
  					MISC::SET_BIT(&(uParam1->f_77), func_156(iVar2));
  				}
  				iVar2++;
  			}
  		}
  		else if (uParam1->f_66 == joaat("openwheel1"))
  		{
  			iVar3 = 1;
  			while (iVar3 <= 6)
  			{
  				if (MISC::IS_BIT_SET(uParam1->f_77, func_156(iVar3)))
  				{
  				}
  				else
  				{
  					MISC::SET_BIT(&(uParam1->f_77), func_156(iVar3));
  				}
  				iVar3++;
  			}
  		}
  		else if (uParam1->f_66 == joaat("openwheel2"))
  		{
  			iVar4 = 1;
  			while (iVar4 <= 11)
  			{
  				if (iVar4 != 9 && iVar4 != 10)
  				{
  					if (MISC::IS_BIT_SET(uParam1->f_77, func_156(iVar4)))
  					{
  					}
  					else
  					{
  						MISC::SET_BIT(&(uParam1->f_77), func_156(iVar4));
  					}
  				}
  				iVar4++;
  			}
  		}
  		else if (uParam1->f_66 == joaat("dinghy5"))
  		{
  			if (MISC::IS_BIT_SET(uParam1->f_77, func_156(4)))
  			{
  			}
  			else
  			{
  				MISC::SET_BIT(&(uParam1->f_77), func_156(4));
  			}
  		}
  		else if (uParam1->f_66 == joaat("coquette4"))
  		{
  			if (VEHICLE::GET_VEHICLE_MOD(iParam0, 10) != 0)
  			{
  				MISC::SET_BIT(&(uParam1->f_77), 0);
  			}
  		}
  		else if (uParam1->f_66 == joaat("yosemite2"))
  		{
  			MISC::SET_BIT(&(uParam1->f_77), func_156(1));
  		}
  		if (uParam1->f_66 == joaat("nightshark"))
  		{
  			VEHICLE::_SET_DISABLE_VEHICLE_WINDOW_COLLISIONS(iParam0, false);
  			if (VEHICLE::GET_VEHICLE_MOD(iParam0, 5) != -1)
  			{
  				VEHICLE::_SET_DISABLE_VEHICLE_WINDOW_COLLISIONS(iParam0, true);
  			}
  		}
  		if (MISC::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 (MISC::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);
  		}
  		if (uParam1->f_5 != -1 && uParam1->f_6 != -1)
  		{
  			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 (((MISC::IS_BIT_SET(uParam1->f_77, 15) || func_212(iParam0)) || (((uParam1->f_62 == 0 && uParam1->f_63 == 0) && uParam1->f_64 == 0) && uParam1->f_9[20] > 0)) && func_211())
  		{
  			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 && !func_158(uParam1->f_66))
  		{
  			VEHICLE::SET_VEHICLE_WINDOW_TINT(iParam0, 0);
  		}
  		else
  		{
  			VEHICLE::SET_VEHICLE_WINDOW_TINT(iParam0, 0);
  			VEHICLE::SET_VEHICLE_WINDOW_TINT(iParam0, uParam1->f_65);
  		}
  		if (MISC::IS_BIT_SET(uParam1->f_77, 9))
  		{
  			VEHICLE::SET_VEHICLE_TYRES_CAN_BURST(iParam0, false);
  			VEHICLE::_SET_DRIFT_TYRES_ENABLED(iParam0, false);
  		}
  		if (bParam2)
  		{
  			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, MISC::IS_BIT_SET(uParam1->f_77, 28));
  		VEHICLE::_SET_VEHICLE_NEON_LIGHT_ENABLED(iParam0, 3, MISC::IS_BIT_SET(uParam1->f_77, 29));
  		VEHICLE::_SET_VEHICLE_NEON_LIGHT_ENABLED(iParam0, 0, MISC::IS_BIT_SET(uParam1->f_77, 30));
  		VEHICLE::_SET_VEHICLE_NEON_LIGHT_ENABLED(iParam0, 1, MISC::IS_BIT_SET(uParam1->f_77, 31));
  		VEHICLE::SET_VEHICLE_IS_STOLEN(iParam0, MISC::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_210(iParam0, uParam1->f_69);
  					}
  				}
  				else
  				{
  					func_210(iParam0, uParam1->f_69);
  				}
  			}
  		}
  		if (VEHICLE::IS_VEHICLE_A_CONVERTIBLE(iParam0, false))
  		{
  			if ((uParam1->f_68 == 0 || uParam1->f_68 == 3) || uParam1->f_68 == 5)
  			{
  				VEHICLE::RAISE_CONVERTIBLE_ROOF(iParam0, true);
  			}
  			else
  			{
  				VEHICLE::LOWER_CONVERTIBLE_ROOF(iParam0, true);
  			}
  		}
  		if (bParam3)
  		{
  			func_205(&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))
  		{
  			iVar5 = 0;
  			while (iVar5 <= 11)
  			{
  				if (MISC::IS_BIT_SET(uParam1->f_77, func_156(iVar5 + 1)))
  				{
  					if (!VEHICLE::IS_VEHICLE_EXTRA_TURNED_ON(iParam0, iVar5 + 1))
  					{
  						VEHICLE::SET_VEHICLE_EXTRA(iParam0, iVar5 + 1, false);
  					}
  				}
  				else if (VEHICLE::IS_VEHICLE_EXTRA_TURNED_ON(iParam0, iVar5 + 1))
  				{
  					VEHICLE::SET_VEHICLE_EXTRA(iParam0, iVar5 + 1, true);
  				}
  				iVar5++;
  			}
  		}
  		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) && VEHICLE::_DOES_VEHICLE_HAVE_LANDING_GEAR(iParam0)) && !VEHICLE::IS_VEHICLE_MODEL(iParam0, joaat("avenger"))) && !((((Global_4456448.f_76587 == 6 || Global_4456448.f_76587 == 7) || Global_4456448.f_76587 == 18) || Global_4456448.f_76587 == 19) && Global_4456448.f_2 == 20))
  		{
  			if (!MISC::IS_BIT_SET(uParam1->f_77, 23))
  			{
  				if (MISC::IS_BIT_SET(uParam1->f_77, 22))
  				{
  					VEHICLE::CONTROL_LANDING_GEAR(iParam0, 2);
  				}
  				else
  				{
  					VEHICLE::CONTROL_LANDING_GEAR(iParam0, 3);
  				}
  			}
  			else
  			{
  				VEHICLE::CONTROL_LANDING_GEAR(iParam0, 4);
  			}
  		}
  		if (MISC::IS_BIT_SET(uParam1->f_77, 27))
  		{
  			DECORATOR::DECOR_SET_BOOL(iParam0, "IgnoredByQuickSave", true);
  		}
  		else
  		{
  			DECORATOR::DECOR_SET_BOOL(iParam0, "IgnoredByQuickSave", false);
  		}
  	}
  }
  
  int func_205(int iParam0, var uParam1, var uParam2)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (!VEHICLE::IS_VEHICLE_DRIVEABLE(*iParam0, false))
  	{
  		return 0;
  	}
  	if (VEHICLE::GET_NUM_MOD_KITS(*iParam0) == 0)
  	{
  		return 0;
  	}
  	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)
  		{
  			VEHICLE::TOGGLE_VEHICLE_MOD(*iParam0, iVar1, (*uParam1)[iVar0] > 0);
  		}
  		else if (iVar1 == 22)
  		{
  			if ((*uParam1)[iVar0] > 0)
  			{
  				VEHICLE::TOGGLE_VEHICLE_MOD(*iParam0, iVar1, true);
  				if ((*uParam1)[iVar0] == 1)
  				{
  					VEHICLE::_SET_VEHICLE_XENON_LIGHTS_COLOR(*iParam0, 255);
  				}
  				else
  				{
  					VEHICLE::_SET_VEHICLE_XENON_LIGHTS_COLOR(*iParam0, ((*uParam1)[iVar0] - 2));
  				}
  			}
  			else
  			{
  				VEHICLE::TOGGLE_VEHICLE_MOD(*iParam0, iVar1, false);
  			}
  		}
  		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_209(ENTITY::GET_ENTITY_MODEL(*iParam0), 1) && VEHICLE::GET_VEHICLE_MOD(*iParam0, 24) != func_208(*iParam0, ((*uParam1)[38] - 1)))
  	{
  		VEHICLE::SET_VEHICLE_MOD(*iParam0, 24, func_208(*iParam0, ((*uParam1)[38] - 1)), false);
  	}
  	func_207(iParam0);
  	if (func_206(*iParam0))
  	{
  		VEHICLE::SET_VEHICLE_STRONG(*iParam0, true);
  		VEHICLE::SET_VEHICLE_HAS_STRONG_AXLES(*iParam0, true);
  	}
  	return 1;
  }
  
  int func_206(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	int iVar2;
  	char cVar3[32];
  	
  	if ((ENTITY::DOES_ENTITY_EXIST(iParam0) && VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false)) && 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)), 32);
  				iVar2 = MISC::GET_HASH_KEY(&cVar3);
  				if (iVar2 != 0)
  				{
  					if (iVar2 == MISC::GET_HASH_KEY("MNU_CAGE") || iVar2 == MISC::GET_HASH_KEY("SABRE_CAG"))
  					{
  						return 1;
  					}
  				}
  			}
  			iVar0++;
  		}
  	}
  	return 0;
  }
  
  void func_207(var uParam0)
  {
  	switch (ENTITY::GET_ENTITY_MODEL(*uParam0))
  	{
  		case joaat("starling"):
  			if (VEHICLE::GET_VEHICLE_MOD(*uParam0, 4) == 0)
  			{
  				VEHICLE::SET_VEHICLE_MOD(*uParam0, 13, 0, false);
  			}
  			else
  			{
  				VEHICLE::REMOVE_VEHICLE_MOD(*uParam0, 13);
  			}
  			break;
  		
  		case joaat("slamtruck"):
  			VEHICLE::SET_VEHICLE_MOD(*uParam0, 24, 3, false);
  			break;
  	}
  }
  
  int func_208(int iParam0, int iParam1)
  {
  	int iVar0;
  	int iVar1;
  	float fVar2;
  	int iVar3;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(iParam0) && VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		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;
  }
  
  int func_209(int iParam0, int iParam1)
  {
  	switch (iParam0)
  	{
  		case joaat("faction2"):
  		case joaat("buccaneer2"):
  		case joaat("chino2"):
  		case joaat("moonbeam2"):
  		case joaat("primo2"):
  		case joaat("voodoo"):
  			return 1;
  			break;
  		
  		case joaat("sabregt2"):
  			if (!Global_262145.f_14397)
  			{
  				return 0;
  			}
  			else
  			{
  				return 1;
  			}
  			break;
  		
  		case joaat("tornado5"):
  			if (!Global_262145.f_14398)
  			{
  				return 0;
  			}
  			else
  			{
  				return 1;
  			}
  			break;
  		
  		case joaat("virgo2"):
  			if (!Global_262145.f_14396)
  			{
  				return 0;
  			}
  			else
  			{
  				return 1;
  			}
  			break;
  		
  		case joaat("minivan2"):
  			if (!Global_262145.f_14399)
  			{
  				return 0;
  			}
  			else
  			{
  				return 1;
  			}
  			break;
  		
  		case joaat("slamvan3"):
  			if (!Global_262145.f_14401)
  			{
  				return 0;
  			}
  			else
  			{
  				return 1;
  			}
  			break;
  		
  		case joaat("faction3"):
  			if (!Global_262145.f_14400)
  			{
  				return 0;
  			}
  			else
  			{
  				return 1;
  			}
  			break;
  		
  		case joaat("sultanrs"):
  		case joaat("banshee2"):
  			if (iParam1 & 1 != 0)
  			{
  				return 0;
  			}
  			return 1;
  			break;
  		
  		case joaat("comet3"):
  			if (Global_262145.f_18848)
  			{
  				if (iParam1 & 1 != 0)
  				{
  					return 0;
  				}
  				return 1;
  			}
  			return 0;
  			break;
  		
  		case joaat("diablous2"):
  			if (Global_262145.f_18850)
  			{
  				if (iParam1 & 1 != 0)
  				{
  					return 0;
  				}
  				return 1;
  			}
  			return 0;
  			break;
  		
  		case joaat("fcr2"):
  			if (Global_262145.f_18854)
  			{
  				if (iParam1 & 1 != 0)
  				{
  					return 0;
  				}
  				return 1;
  			}
  			return 0;
  			break;
  		
  		case joaat("elegy"):
  			if (Global_262145.f_18851)
  			{
  				if (iParam1 & 1 != 0)
  				{
  					return 0;
  				}
  				return 1;
  			}
  			return 0;
  			break;
  		
  		case joaat("nero2"):
  			if (Global_262145.f_18858)
  			{
  				if (iParam1 & 1 != 0)
  				{
  					return 0;
  				}
  				return 1;
  			}
  			return 0;
  			break;
  		
  		case joaat("italigtb2"):
  			if (Global_262145.f_18856)
  			{
  				if (iParam1 & 1 != 0)
  				{
  					return 0;
  				}
  				return 1;
  			}
  			return 0;
  			break;
  		
  		case joaat("specter2"):
  			if (Global_262145.f_18861)
  			{
  				if (iParam1 & 1 != 0)
  				{
  					return 0;
  				}
  				return 1;
  			}
  			return 0;
  			break;
  		
  		case joaat("technical3"):
  			if (Global_262145.f_20806)
  			{
  				if (iParam1 & 1 != 0)
  				{
  					return 0;
  				}
  				return 1;
  			}
  			return 0;
  			break;
  		
  		case joaat("insurgent3"):
  			if (Global_262145.f_20807)
  			{
  				if (iParam1 & 1 != 0)
  				{
  					return 0;
  				}
  				return 1;
  			}
  			return 0;
  			break;
  		
  		case joaat("slamvan4"):
  		case joaat("slamvan5"):
  		case joaat("slamvan6"):
  			if (iParam1 & 1 != 0)
  			{
  				return 0;
  			}
  			return 1;
  			break;
  		
  		case joaat("issi4"):
  		case joaat("issi5"):
  		case joaat("issi6"):
  			if (iParam1 & 1 != 0)
  			{
  				return 0;
  			}
  			return 1;
  			break;
  		
  		case joaat("impaler2"):
  		case joaat("impaler3"):
  		case joaat("impaler4"):
  			if (iParam1 & 1 != 0)
  			{
  				return 0;
  			}
  			return 1;
  			break;
  		
  		case joaat("deathbike"):
  		case joaat("deathbike2"):
  		case joaat("deathbike3"):
  			if (iParam1 & 1 != 0)
  			{
  				return 0;
  			}
  			return 1;
  			break;
  		
  		case joaat("monster3"):
  		case joaat("monster4"):
  		case joaat("monster5"):
  			if (iParam1 & 1 != 0)
  			{
  				return 0;
  			}
  			return 1;
  			break;
  		
  		case joaat("dominator4"):
  		case joaat("dominator5"):
  		case joaat("dominator6"):
  			if (iParam1 & 1 != 0)
  			{
  				return 0;
  			}
  			return 1;
  			break;
  		
  		case joaat("bruiser"):
  		case joaat("bruiser2"):
  		case joaat("bruiser3"):
  			if (iParam1 & 1 != 0)
  			{
  				return 0;
  			}
  			return 1;
  			break;
  		
  		case joaat("youga3"):
  		case joaat("gauntlet5"):
  		case joaat("yosemite3"):
  			if (iParam1 & 1 != 0)
  			{
  				return 0;
  			}
  			return 1;
  			break;
  		
  		case joaat("manana2"):
  		case joaat("peyote3"):
  		case joaat("glendale2"):
  			return 1;
  			break;
  	}
  	return 0;
  }
  
  void func_210(int iParam0, int iParam1)
  {
  	int iVar0;
  	bool bVar1;
  	
  	if (VEHICLE::GET_NUM_MOD_KITS(iParam0) > 0)
  	{
  		VEHICLE::SET_VEHICLE_MOD_KIT(iParam0, 0);
  		iVar0 = VEHICLE::GET_VEHICLE_MOD(iParam0, 24);
  		bVar1 = VEHICLE::GET_VEHICLE_MOD_VARIATION(iParam0, 24);
  		VEHICLE::SET_VEHICLE_WHEEL_TYPE(iParam0, iParam1);
  		if (ENTITY::GET_ENTITY_MODEL(iParam0) == joaat("tornado6") || ENTITY::GET_ENTITY_MODEL(iParam0) == joaat("peyote2"))
  		{
  			return;
  		}
  		if (iVar0 == -1)
  		{
  			VEHICLE::REMOVE_VEHICLE_MOD(iParam0, 24);
  		}
  		else
  		{
  			VEHICLE::SET_VEHICLE_MOD(iParam0, 24, iVar0, bVar1 == 1);
  		}
  	}
  }
  
  bool func_211()
  {
  	return DLC::IS_DLC_PRESENT(-1691188696);
  }
  
  int func_212(int iParam0)
  {
  	int iVar0;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(iParam0))
  	{
  		if (VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  		{
  			if (DECORATOR::DECOR_IS_REGISTERED_AS_TYPE("MPBitset", 3))
  			{
  				if (DECORATOR::DECOR_EXIST_ON(iParam0, "MPBitset"))
  				{
  					iVar0 = DECORATOR::DECOR_GET_INT(iParam0, "MPBitset");
  				}
  				return MISC::IS_BIT_SET(iVar0, 4);
  			}
  		}
  	}
  	return 0;
  }
  
  int func_213(int iParam0)
  {
  	if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), false))
  	{
  		if (!func_219(PLAYER::PLAYER_ID(), -1))
  		{
  			iParam0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), false);
  		}
  	}
  	if (!ENTITY::DOES_ENTITY_EXIST(iParam0))
  	{
  		return 0;
  	}
  	if (ENTITY::IS_ENTITY_DEAD(iParam0, false))
  	{
  		return 0;
  	}
  	if (!VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  	{
  		return 0;
  	}
  	if (func_215(PLAYER::PLAYER_ID()) == 3)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(iParam0) && VEHICLE::IS_VEHICLE_DRIVEABLE(iParam0, false))
  		{
  			if (func_214(iParam0) != -1)
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_214(int iParam0)
  {
  	if (DECORATOR::DECOR_IS_REGISTERED_AS_TYPE("FMDeliverableID", 3))
  	{
  		if (DECORATOR::DECOR_EXIST_ON(iParam0, "FMDeliverableID"))
  		{
  			return DECORATOR::DECOR_GET_INT(iParam0, "FMDeliverableID");
  		}
  	}
  	return -1;
  }
  
  int func_215(int iParam0)
  {
  	if (func_218(iParam0) == 233)
  	{
  		return func_216(iParam0);
  	}
  	return -1;
  }
  
  int func_216(int iParam0)
  {
  	if (func_217(iParam0, 0))
  	{
  		return Global_1630816[iParam0 /*597*/].f_11.f_182;
  	}
  	return -1;
  }
  
  int func_217(int iParam0, int iParam1)
  {
  	if (Global_1630816[iParam0 /*597*/].f_11.f_33 != -1 || (iParam1 && Global_1630816[iParam0 /*597*/].f_11.f_32 != -1))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_218(int iParam0)
  {
  	if (func_217(iParam0, 0))
  	{
  		return Global_1630816[iParam0 /*597*/].f_11.f_33;
  	}
  	return -1;
  }
  
  int func_219(int iParam0, int iParam1)
  {
  	int iVar0;
  	
  	if (func_220(iParam0, 1, 1))
  	{
  		if (PED::IS_PED_IN_ANY_VEHICLE(PLAYER::GET_PLAYER_PED(iParam0), false))
  		{
  			iVar0 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::GET_PLAYER_PED(iParam0), false);
  			if (VEHICLE::IS_VEHICLE_DRIVEABLE(iVar0, false))
  			{
  				if (PLAYER::PLAYER_PED_ID() == VEHICLE::GET_PED_IN_VEHICLE_SEAT(iVar0, iParam1, false))
  				{
  					return 1;
  				}
  			}
  		}
  	}
  	return 0;
  }
  
  int func_220(int iParam0, bool bParam1, bool bParam2)
  {
  	int iVar0;
  	
  	iVar0 = iParam0;
  	if (iVar0 != -1)
  	{
  		if (NETWORK::NETWORK_IS_PLAYER_ACTIVE(iParam0))
  		{
  			if (bParam1)
  			{
  				if (!PLAYER::IS_PLAYER_PLAYING(iParam0))
  				{
  					return 0;
  				}
  			}
  			if (bParam2)
  			{
  				if (!Global_2441237.f_3[iVar0])
  				{
  					return 0;
  				}
  			}
  			return 1;
  		}
  	}
  	return 0;
  }
  
  void func_221(struct<3> Param0, float fParam3, bool bParam4)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 68)
  	{
  		if (func_143(&(Global_76066.f_555[0 /*21*/]), iVar0))
  		{
  			if (MISC::GET_DISTANCE_BETWEEN_COORDS(Param0, Global_76066.f_555[0 /*21*/], bParam4) <= fParam3)
  			{
  				func_196(iVar0);
  			}
  		}
  		iVar0++;
  	}
  }
  
  int func_222(var uParam0)
  {
  	if (func_223(uParam0))
  	{
  		if (STREAMING::HAS_MODEL_LOADED(uParam0->f_12.f_66))
  		{
  			return 1;
  		}
  		else
  		{
  			return 0;
  		}
  		return 1;
  	}
  	else
  	{
  		return 0;
  	}
  	return 1;
  }
  
  int func_223(var uParam0)
  {
  	if (uParam0->f_12.f_66 == 0)
  	{
  		return 0;
  	}
  	if (!func_117(uParam0->f_12.f_66, 0))
  	{
  		return 0;
  	}
  	if (uParam0->f_12.f_66 == joaat("stunt") && func_65(*uParam0, 1694.62f, 3276.27f, 41.31f, 1056964608, 0))
  	{
  		return 0;
  	}
  	return 1;
  }
  
  bool func_224()
  {
  	return func_222(&(Global_105842.f_2890));
  }
  
  int func_225(var uParam0)
  {
  	if (func_236(uParam0))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_226()
  {
  	return Global_105842.f_2890.f_12.f_66;
  }
  
  int func_227()
  {
  	return func_223(&(Global_105842.f_2890));
  }
  
  int func_228(var uParam0, int iParam1)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (!INTERIOR::IS_VALID_INTERIOR(iParam1))
  	{
  		return 0;
  	}
  	iVar1 = -1;
  	iVar0 = 0;
  	while (iVar0 < uParam0->f_763)
  	{
  		if (uParam0->f_763[iVar0 /*5*/])
  		{
  			if (uParam0->f_763[iVar0 /*5*/].f_4 == iParam1)
  			{
  				uParam0->f_763[iVar0 /*5*/].f_2 = 0;
  				if (!uParam0->f_763[iVar0 /*5*/].f_1)
  				{
  					uParam0->f_1007 = 1;
  					return 1;
  				}
  				else
  				{
  					return 1;
  				}
  			}
  		}
  		else if (iVar1 == -1)
  		{
  			iVar1 = iVar0;
  		}
  		iVar0++;
  	}
  	if (iVar1 >= 0)
  	{
  		INTERIOR::PIN_INTERIOR_IN_MEMORY(iParam1);
  		uParam0->f_763[iVar1 /*5*/] = 1;
  		uParam0->f_763[iVar1 /*5*/].f_3 = MISC::GET_GAME_TIMER();
  		uParam0->f_763[iVar1 /*5*/].f_4 = iParam1;
  		uParam0->f_1007 = 1;
  		return 1;
  	}
  	return 0;
  }
  
  int func_229(var uParam0, char* sParam1)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (MISC::IS_STRING_NULL_OR_EMPTY(sParam1))
  	{
  		return 0;
  	}
  	iVar1 = -1;
  	iVar0 = 0;
  	while (iVar0 < uParam0->f_273)
  	{
  		if (uParam0->f_273[iVar0 /*5*/])
  		{
  			if (MISC::ARE_STRINGS_EQUAL(uParam0->f_273[iVar0 /*5*/].f_4, sParam1))
  			{
  				uParam0->f_273[iVar0 /*5*/].f_2 = 0;
  				if (!uParam0->f_273[iVar0 /*5*/].f_1)
  				{
  					uParam0->f_1007 = 1;
  					return 1;
  				}
  				else
  				{
  					return 1;
  				}
  			}
  		}
  		else if (iVar1 == -1)
  		{
  			iVar1 = iVar0;
  		}
  		iVar0++;
  	}
  	if (iVar1 >= 0)
  	{
  		STREAMING::REQUEST_ANIM_DICT(sParam1);
  		uParam0->f_273[iVar1 /*5*/] = 1;
  		uParam0->f_273[iVar1 /*5*/].f_3 = MISC::GET_GAME_TIMER();
  		uParam0->f_273[iVar1 /*5*/].f_4 = sParam1;
  		uParam0->f_1007 = 1;
  		return 1;
  	}
  	return 0;
  }
  
  int func_230(var uParam0, char* sParam1)
  {
  	int iVar0;
  	int iVar1;
  	
  	if (MISC::IS_STRING_NULL_OR_EMPTY(sParam1))
  	{
  		return 0;
  	}
  	iVar1 = -1;
  	iVar0 = 0;
  	while (iVar0 < uParam0->f_374)
  	{
  		if (uParam0->f_374[iVar0 /*5*/])
  		{
  			if (MISC::ARE_STRINGS_EQUAL(uParam0->f_374[iVar0 /*5*/].f_4, sParam1))
  			{
  				uParam0->f_374[iVar0 /*5*/].f_2 = 0;
  				if (!uParam0->f_374[iVar0 /*5*/].f_1)
  				{
  					uParam0->f_1007 = 1;
  					return 1;
  				}
  				else
  				{
  					return 1;
  				}
  			}
  		}
  		else if (iVar1 == -1)
  		{
  			iVar1 = iVar0;
  		}
  		iVar0++;
  	}
  	if (iVar1 >= 0)
  	{
  		TASK::REQUEST_WAYPOINT_RECORDING(sParam1);
  		uParam0->f_374[iVar1 /*5*/] = 1;
  		uParam0->f_374[iVar1 /*5*/].f_3 = MISC::GET_GAME_TIMER();
  		uParam0->f_374[iVar1 /*5*/].f_4 = sParam1;
  		uParam0->f_1007 = 1;
  		return 1;
  	}
  	return 0;
  }
  
  void func_231(var uParam0)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < 30)
  	{
  		if ((*uParam0)[iVar0 /*5*/])
  		{
  			(uParam0[iVar0 /*5*/])->f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 10)
  	{
  		if (uParam0->f_151[iVar0 /*5*/])
  		{
  			uParam0->f_151[iVar0 /*5*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 10)
  	{
  		if (uParam0->f_202[iVar0 /*7*/])
  		{
  			uParam0->f_202[iVar0 /*7*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 20)
  	{
  		if (uParam0->f_273[iVar0 /*5*/])
  		{
  			uParam0->f_273[iVar0 /*5*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 20)
  	{
  		if (uParam0->f_374[iVar0 /*5*/])
  		{
  			uParam0->f_374[iVar0 /*5*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 30)
  	{
  		if (uParam0->f_475[iVar0 /*6*/])
  		{
  			uParam0->f_475[iVar0 /*6*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 5)
  	{
  		if (uParam0->f_656[iVar0 /*6*/])
  		{
  			uParam0->f_656[iVar0 /*6*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 7)
  	{
  		if (uParam0->f_687[iVar0 /*7*/])
  		{
  			uParam0->f_687[iVar0 /*7*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 5)
  	{
  		if (uParam0->f_737[iVar0 /*5*/])
  		{
  			uParam0->f_737[iVar0 /*5*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 3)
  	{
  		if (uParam0->f_763[iVar0 /*5*/])
  		{
  			uParam0->f_763[iVar0 /*5*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 10)
  	{
  		if (uParam0->f_904[iVar0 /*5*/])
  		{
  			uParam0->f_904[iVar0 /*5*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 5)
  	{
  		if (uParam0->f_955[iVar0 /*5*/])
  		{
  			uParam0->f_955[iVar0 /*5*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	iVar0 = 0;
  	while (iVar0 < 21)
  	{
  		if (uParam0->f_779[iVar0 /*5*/])
  		{
  			uParam0->f_779[iVar0 /*5*/].f_2 = 1;
  		}
  		iVar0++;
  	}
  	if (uParam0->f_893)
  	{
  		uParam0->f_893.f_2 = 1;
  	}
  	if (uParam0->f_885)
  	{
  		uParam0->f_885.f_2 = 1;
  	}
  	if (uParam0->f_889)
  	{
  		uParam0->f_889.f_2 = 1;
  	}
  }
  
  int func_232(var uParam0, struct<3> Param1, float fParam4, int iParam5)
  {
  	if (func_233(Param1) || fParam4 <= 0f)
  	{
  		return 0;
  	}
  	if (uParam0->f_893)
  	{
  		if (func_154(uParam0->f_893.f_4, Param1, 0) && uParam0->f_893.f_10 == fParam4)
  		{
  			uParam0->f_893.f_2 = 0;
  			if (!uParam0->f_893.f_1)
  			{
  				uParam0->f_1007 = 1;
  				return 1;
  			}
  			else
  			{
  				return 1;
  			}
  		}
  	}
  	STREAMING::NEW_LOAD_SCENE_START_SPHERE(Param1, fParam4, iParam5);
  	uParam0->f_893 = 1;
  	uParam0->f_893.f_3 = MISC::GET_GAME_TIMER();
  	uParam0->f_893.f_4 = { Param1 };
  	uParam0->f_893.f_7 = { 0f, 0f, 0f };
  	uParam0->f_893.f_10 = fParam4;
  	uParam0->f_1007 = 1;
  	return 1;
  }
  
  int func_233(struct<3> Param0)
  {
  	if ((Param0.x == 0f && Param0.f_1 == 0f) && Param0.f_2 == 0f)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_234(int iParam0, var uParam1, var uParam2)
  {
  	switch (iParam0)
  	{
  		case 0:
  			*uParam1 = { 183.533f, -2946.199f, 5.5113f };
  			*uParam2 = 177.8164f;
  			break;
  		
  		case 1:
  			*uParam1 = { 692.067f, -1004.812f, 21.9059f };
  			*uParam2 = 359.5735f;
  			break;
  	}
  }
  
  bool func_235()
  {
  	return MISC::IS_BIT_SET(Global_99370.f_20, 13);
  }
  
  int func_236(var uParam0)
  {
  	bool bVar0;
  	int iVar1;
  	int iVar2;
  	
  	if (uParam0->f_1007)
  	{
  		bVar0 = true;
  		iVar1 = 0;
  		while (iVar1 < 30)
  		{
  			if ((*uParam0)[iVar1 /*5*/])
  			{
  				if (!(uParam0[iVar1 /*5*/])->f_1)
  				{
  					if (STREAMING::HAS_MODEL_LOADED((uParam0[iVar1 /*5*/])->f_4))
  					{
  						(uParam0[iVar1 /*5*/])->f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if ((uParam0[iVar1 /*5*/])->f_2)
  				{
  					if ((uParam0[iVar1 /*5*/])->f_1)
  					{
  						STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED((uParam0[iVar1 /*5*/])->f_4);
  						func_238(uParam0[iVar1 /*5*/]);
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < 20)
  		{
  			if (uParam0->f_273[iVar1 /*5*/])
  			{
  				if (!uParam0->f_273[iVar1 /*5*/].f_1)
  				{
  					if (STREAMING::HAS_ANIM_DICT_LOADED(uParam0->f_273[iVar1 /*5*/].f_4))
  					{
  						uParam0->f_273[iVar1 /*5*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_273[iVar1 /*5*/].f_2)
  				{
  					if (uParam0->f_273[iVar1 /*5*/].f_1)
  					{
  						STREAMING::REMOVE_ANIM_DICT(uParam0->f_273[iVar1 /*5*/].f_4);
  						func_238(&(uParam0->f_273[iVar1 /*5*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < 20)
  		{
  			if (uParam0->f_374[iVar1 /*5*/])
  			{
  				if (!uParam0->f_374[iVar1 /*5*/].f_1)
  				{
  					if (TASK::GET_IS_WAYPOINT_RECORDING_LOADED(uParam0->f_374[iVar1 /*5*/].f_4))
  					{
  						uParam0->f_374[iVar1 /*5*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_374[iVar1 /*5*/].f_2)
  				{
  					if (uParam0->f_374[iVar1 /*5*/].f_1)
  					{
  						TASK::REMOVE_WAYPOINT_RECORDING(uParam0->f_374[iVar1 /*5*/].f_4);
  						func_238(&(uParam0->f_374[iVar1 /*5*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < 5)
  		{
  			if (uParam0->f_656[iVar1 /*6*/])
  			{
  				if (!uParam0->f_656[iVar1 /*6*/].f_1)
  				{
  					if (GRAPHICS::HAS_SCALEFORM_MOVIE_LOADED(uParam0->f_656[iVar1 /*6*/].f_5))
  					{
  						uParam0->f_656[iVar1 /*6*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_656[iVar1 /*6*/].f_2)
  				{
  					if (uParam0->f_656[iVar1 /*6*/].f_1)
  					{
  						GRAPHICS::SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED(&(uParam0->f_656[iVar1 /*6*/].f_5));
  						func_238(&(uParam0->f_656[iVar1 /*6*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < 30)
  		{
  			if (uParam0->f_475[iVar1 /*6*/])
  			{
  				if (!uParam0->f_475[iVar1 /*6*/].f_1)
  				{
  					if (VEHICLE::HAS_VEHICLE_RECORDING_BEEN_LOADED(uParam0->f_475[iVar1 /*6*/].f_5, uParam0->f_475[iVar1 /*6*/].f_4))
  					{
  						uParam0->f_475[iVar1 /*6*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_475[iVar1 /*6*/].f_2)
  				{
  					if (uParam0->f_475[iVar1 /*6*/].f_1)
  					{
  						VEHICLE::REMOVE_VEHICLE_RECORDING(uParam0->f_475[iVar1 /*6*/].f_5, uParam0->f_475[iVar1 /*6*/].f_4);
  						func_238(&(uParam0->f_475[iVar1 /*6*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < 10)
  		{
  			if (uParam0->f_202[iVar1 /*7*/])
  			{
  				if (!uParam0->f_202[iVar1 /*7*/].f_1)
  				{
  					if (WEAPON::HAS_WEAPON_ASSET_LOADED(uParam0->f_202[iVar1 /*7*/].f_4))
  					{
  						uParam0->f_202[iVar1 /*7*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_202[iVar1 /*7*/].f_2)
  				{
  					if (uParam0->f_202[iVar1 /*7*/].f_1)
  					{
  						WEAPON::REMOVE_WEAPON_ASSET(uParam0->f_202[iVar1 /*7*/].f_4);
  						func_238(&(uParam0->f_202[iVar1 /*7*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < 10)
  		{
  			if (uParam0->f_151[iVar1 /*5*/])
  			{
  				if (!uParam0->f_151[iVar1 /*5*/].f_1)
  				{
  					if (VEHICLE::HAS_VEHICLE_ASSET_LOADED(uParam0->f_151[iVar1 /*5*/].f_4))
  					{
  						uParam0->f_151[iVar1 /*5*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_151[iVar1 /*5*/].f_2)
  				{
  					if (uParam0->f_151[iVar1 /*5*/].f_1)
  					{
  						VEHICLE::REMOVE_VEHICLE_ASSET(uParam0->f_151[iVar1 /*5*/].f_4);
  						func_238(&(uParam0->f_151[iVar1 /*5*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < 5)
  		{
  			if (uParam0->f_737[iVar1 /*5*/])
  			{
  				if (!uParam0->f_737[iVar1 /*5*/].f_1)
  				{
  					if (AUDIO::REQUEST_SCRIPT_AUDIO_BANK(uParam0->f_737[iVar1 /*5*/].f_4, false, -1))
  					{
  						uParam0->f_737[iVar1 /*5*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_737[iVar1 /*5*/].f_2)
  				{
  					if (uParam0->f_737[iVar1 /*5*/].f_1)
  					{
  						AUDIO::RELEASE_NAMED_SCRIPT_AUDIO_BANK(uParam0->f_737[iVar1 /*5*/].f_4);
  						func_238(&(uParam0->f_737[iVar1 /*5*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < 3)
  		{
  			if (uParam0->f_763[iVar1 /*5*/])
  			{
  				if (!uParam0->f_763[iVar1 /*5*/].f_1)
  				{
  					if (INTERIOR::IS_INTERIOR_READY(uParam0->f_763[iVar1 /*5*/].f_4))
  					{
  						uParam0->f_763[iVar1 /*5*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_763[iVar1 /*5*/].f_2)
  				{
  					if (uParam0->f_763[iVar1 /*5*/].f_1)
  					{
  						INTERIOR::UNPIN_INTERIOR(uParam0->f_763[iVar1 /*5*/].f_4);
  						func_238(&(uParam0->f_763[iVar1 /*5*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < 7)
  		{
  			if (!MISC::IS_STRING_NULL_OR_EMPTY(uParam0->f_687[iVar1 /*7*/].f_4))
  			{
  				if (uParam0->f_687[iVar1 /*7*/])
  				{
  					iVar2 = GRAPHICS::QUERY_MOVIE_MESH_SET_STATE(uParam0->f_687[iVar1 /*7*/].f_5);
  					if (!uParam0->f_687[iVar1 /*7*/].f_1)
  					{
  						switch (iVar2)
  						{
  							case 1:
  							case 2:
  								uParam0->f_687[iVar1 /*7*/].f_1 = 1;
  								break;
  							
  							case 0:
  								uParam0->f_687[iVar1 /*7*/].f_1 = 0;
  								bVar0 = false;
  								break;
  							
  							case 3:
  								uParam0->f_687[iVar1 /*7*/].f_1 = 0;
  								func_238(&(uParam0->f_687[iVar1 /*7*/]));
  								break;
  							
  							case -1:
  								uParam0->f_687[iVar1 /*7*/].f_1 = 0;
  								GRAPHICS::RELEASE_MOVIE_MESH_SET(uParam0->f_687[iVar1 /*7*/].f_5);
  								uParam0->f_687[iVar1 /*7*/] = 0;
  								bVar0 = false;
  								break;
  							}
  					}
  				}
  				else if (INTERIOR::IS_INTERIOR_READY(uParam0->f_687[iVar1 /*7*/].f_6))
  				{
  					uParam0->f_687[iVar1 /*7*/].f_5 = GRAPHICS::LOAD_MOVIE_MESH_SET(uParam0->f_687[iVar1 /*7*/].f_4);
  					uParam0->f_687[iVar1 /*7*/].f_3 = MISC::GET_GAME_TIMER();
  					uParam0->f_687[iVar1 /*7*/] = 1;
  				}
  				else
  				{
  					bVar0 = false;
  				}
  				if (uParam0->f_687[iVar1 /*7*/].f_2)
  				{
  					if (uParam0->f_687[iVar1 /*7*/])
  					{
  						if (uParam0->f_687[iVar1 /*7*/].f_1)
  						{
  							GRAPHICS::RELEASE_MOVIE_MESH_SET(uParam0->f_687[iVar1 /*7*/].f_5);
  							func_238(&(uParam0->f_687[iVar1 /*7*/]));
  							uParam0->f_687[iVar1 /*7*/].f_4 = "";
  						}
  						else
  						{
  							bVar0 = false;
  						}
  					}
  					else
  					{
  						func_238(&(uParam0->f_687[iVar1 /*7*/]));
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < 10)
  		{
  			if (uParam0->f_904[iVar1 /*5*/])
  			{
  				if (!uParam0->f_904[iVar1 /*5*/].f_1)
  				{
  					if (TASK::ASSISTED_MOVEMENT_IS_ROUTE_LOADED(uParam0->f_904[iVar1 /*5*/].f_4))
  					{
  						uParam0->f_904[iVar1 /*5*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_904[iVar1 /*5*/].f_2)
  				{
  					if (uParam0->f_904[iVar1 /*5*/].f_1)
  					{
  						TASK::ASSISTED_MOVEMENT_REMOVE_ROUTE(uParam0->f_904[iVar1 /*5*/].f_4);
  						func_238(&(uParam0->f_904[iVar1 /*5*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < 5)
  		{
  			if (uParam0->f_955[iVar1 /*5*/])
  			{
  				if (!uParam0->f_955[iVar1 /*5*/].f_1)
  				{
  					if (AUDIO::PREPARE_ALARM(uParam0->f_955[iVar1 /*5*/].f_4))
  					{
  						uParam0->f_955[iVar1 /*5*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_955[iVar1 /*5*/].f_2)
  				{
  					if (uParam0->f_955[iVar1 /*5*/].f_1)
  					{
  						func_238(&(uParam0->f_955[iVar1 /*5*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		iVar1 = 0;
  		while (iVar1 < uParam0->f_779)
  		{
  			if (uParam0->f_779[iVar1 /*5*/])
  			{
  				if (!uParam0->f_779[iVar1 /*5*/].f_1)
  				{
  					if (HUD::HAS_ADDITIONAL_TEXT_LOADED(iVar1))
  					{
  						uParam0->f_779[iVar1 /*5*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_779[iVar1 /*5*/].f_2)
  				{
  					if (uParam0->f_779[iVar1 /*5*/].f_1)
  					{
  						HUD::CLEAR_ADDITIONAL_TEXT(iVar1, true);
  						func_238(&(uParam0->f_779[iVar1 /*5*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		if (uParam0->f_885)
  		{
  			if (!uParam0->f_885.f_1)
  			{
  				if (STREAMING::HAS_PTFX_ASSET_LOADED())
  				{
  					uParam0->f_885.f_1 = 1;
  				}
  				else
  				{
  					bVar0 = false;
  				}
  			}
  			if (uParam0->f_885.f_2)
  			{
  				if (uParam0->f_885.f_1)
  				{
  					STREAMING::REMOVE_PTFX_ASSET();
  					func_238(&(uParam0->f_885));
  				}
  				else
  				{
  					bVar0 = false;
  				}
  			}
  		}
  		if (uParam0->f_889)
  		{
  			if (!uParam0->f_889.f_1)
  			{
  				if (PHYSICS::ROPE_ARE_TEXTURES_LOADED())
  				{
  					uParam0->f_889.f_1 = 1;
  				}
  				else
  				{
  					bVar0 = false;
  				}
  			}
  			if (uParam0->f_889.f_2)
  			{
  				if (uParam0->f_889.f_1)
  				{
  					PHYSICS::ROPE_UNLOAD_TEXTURES();
  					func_238(&(uParam0->f_889));
  				}
  				else
  				{
  					bVar0 = false;
  				}
  			}
  		}
  		if (uParam0->f_893 && STREAMING::IS_NEW_LOAD_SCENE_ACTIVE())
  		{
  			if (!uParam0->f_893.f_1)
  			{
  				if (STREAMING::IS_NEW_LOAD_SCENE_LOADED())
  				{
  					uParam0->f_893.f_1 = 1;
  					if (uParam0->f_1008)
  					{
  						ENTITY::FREEZE_ENTITY_POSITION(PLAYER::PLAYER_PED_ID(), false);
  						func_237(uParam0);
  						uParam0->f_1008 = 0;
  					}
  				}
  				else
  				{
  					bVar0 = false;
  				}
  			}
  			if (uParam0->f_893.f_2)
  			{
  				STREAMING::NEW_LOAD_SCENE_STOP();
  				func_238(&(uParam0->f_893));
  			}
  		}
  		iVar1 = 0;
  		while (iVar1 < 5)
  		{
  			if (uParam0->f_981[iVar1 /*5*/])
  			{
  				if (!uParam0->f_981[iVar1 /*5*/].f_1)
  				{
  					if (GRAPHICS::HAS_STREAMED_TEXTURE_DICT_LOADED(uParam0->f_981[iVar1 /*5*/].f_4))
  					{
  						uParam0->f_981[iVar1 /*5*/].f_1 = 1;
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  				if (uParam0->f_981[iVar1 /*5*/].f_2)
  				{
  					if (uParam0->f_981[iVar1 /*5*/].f_1)
  					{
  						func_238(&(uParam0->f_981[iVar1 /*5*/]));
  					}
  					else
  					{
  						bVar0 = false;
  					}
  				}
  			}
  			iVar1++;
  		}
  		if (bVar0)
  		{
  			uParam0->f_1007 = 0;
  			return 1;
  		}
  		else
  		{
  			return 0;
  		}
  	}
  	return 1;
  }
  
  void func_237(var uParam0)
  {
  	if (STREAMING::IS_NEW_LOAD_SCENE_ACTIVE())
  	{
  		STREAMING::NEW_LOAD_SCENE_STOP();
  		func_238(&(uParam0->f_893));
  	}
  }
  
  void func_238(var uParam0)
  {
  	*uParam0 = 0;
  	uParam0->f_1 = 0;
  	uParam0->f_2 = 0;
  	uParam0->f_3 = -1;
  }
  
  void func_239()
  {
  	if (func_240())
  	{
  		func_8(1);
  		SCRIPT::TERMINATE_THIS_THREAD();
  	}
  }
  
  int func_240()
  {
  	if (Global_3)
  	{
  		return 1;
  	}
  	if (Global_99370 == 7 || Global_99370 == 8)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_241()
  {
  	func_259(&(Local_1693[1 /*8*/]), 67159, "AI Controller");
  	func_259(&(Local_1693[0 /*8*/]), 65523, "Dialogue");
  	func_259(&(Local_1693[3 /*8*/]), 64550, "Alarms & Wanted Level");
  	func_259(&(Local_1693[4 /*8*/]), 63998, "Music Manager");
  }
  
  void func_242(var uParam0)
  {
  	if (!func_245(uParam0))
  	{
  		if (uParam0->f_1 <= 4)
  		{
  			if ((AUDIO::IS_ALARM_PLAYING(&cLocal_626) || PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0)) || func_22(&(Local_1693[3 /*8*/])))
  			{
  				AUDIO::TRIGGER_MUSIC_EVENT("JHP1A_ATTACK");
  				func_244(uParam0, 5, 0);
  			}
  		}
  		switch (uParam0->f_1)
  		{
  			case 1:
  				if (func_108(PLAYER::PLAYER_PED_ID(), 137.7f, -3092.81f, 4.9f, 1) < 60f)
  				{
  					AUDIO::TRIGGER_MUSIC_EVENT("JHP1A_START");
  					func_244(uParam0, 2, 0);
  				}
  				break;
  			
  			case 2:
  				if (iLocal_2598 == 3 || iLocal_2598 == 2)
  				{
  					AUDIO::TRIGGER_MUSIC_EVENT("JHP1A_WAREHOUSE");
  					func_244(uParam0, 3, 0);
  				}
  				break;
  			
  			case 3:
  				if (iLocal_2598 == 6 || iLocal_2598 == 9)
  				{
  					AUDIO::TRIGGER_MUSIC_EVENT("JHP1A_VAN");
  					func_244(uParam0, 4, 0);
  				}
  				break;
  			
  			case 4:
  				if (!PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0))
  				{
  					if (iLocal_2598 == 9 && func_108(PLAYER::PLAYER_PED_ID(), 137.7f, -3092.81f, 4.9f, 1) >= 500f)
  					{
  						if (AUDIO::PREPARE_MUSIC_EVENT("JHP1A_RADIO_1"))
  						{
  							AUDIO::TRIGGER_MUSIC_EVENT("JHP1A_RADIO_1");
  							func_243(uParam0);
  						}
  					}
  				}
  				break;
  			
  			case 5:
  				if ((AUDIO::IS_ALARM_PLAYING(&cLocal_626) && PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0)) && iLocal_2594)
  				{
  					func_244(uParam0, 6, 0);
  				}
  				break;
  			
  			case 6:
  				if (!PLAYER::IS_PLAYER_WANTED_LEVEL_GREATER(PLAYER::PLAYER_ID(), 0))
  				{
  					if (AUDIO::PREPARE_MUSIC_EVENT("JHP1A_RADIO_2"))
  					{
  						AUDIO::TRIGGER_MUSIC_EVENT("JHP1A_RADIO_2");
  						func_244(uParam0, 6, 0);
  						func_243(uParam0);
  					}
  				}
  				break;
  			}
  	}
  	if (func_245(uParam0))
  	{
  		PLAYER::SET_WANTED_LEVEL_MULTIPLIER(1f);
  	}
  }
  
  void func_243(var uParam0)
  {
  	if (*uParam0 != 4)
  	{
  		*uParam0 = 4;
  		uParam0->f_4 = MISC::GET_GAME_TIMER();
  		uParam0->f_6 = 0;
  		uParam0->f_1 = -1;
  	}
  }
  
  void func_244(var uParam0, int iParam1, int iParam2)
  {
  	if (iParam2 > 0)
  	{
  		*uParam0 = 2;
  		uParam0->f_5 = MISC::GET_GAME_TIMER();
  		uParam0->f_6 = iParam2;
  	}
  	uParam0->f_1 = iParam1;
  }
  
  int func_245(var uParam0)
  {
  	if (*uParam0 == 4)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_246(var uParam0)
  {
  	if (!func_245(uParam0))
  	{
  		switch (uParam0->f_1)
  		{
  			case 1:
  				func_244(uParam0, 2, 2000);
  				break;
  			
  			case 2:
  				if (AUDIO::PREPARE_ALARM(&cLocal_626))
  				{
  					AUDIO::START_ALARM(&cLocal_626, false);
  					func_249(&cLocal_2375, Local_642, 30f, -1, 500, 1, 0);
  					StringCopy(&cLocal_2375, "", 32);
  					func_244(uParam0, 3, 5000);
  				}
  				break;
  			
  			case 3:
  				func_247(&Local_469, 3, 1, "ALARM EVENT SET IT", 1, 0);
  				PLAYER::SET_PLAYER_WANTED_LEVEL_NO_DROP(PLAYER::PLAYER_ID(), 2, false);
  				PLAYER::SET_PLAYER_WANTED_LEVEL_NOW(PLAYER::PLAYER_ID(), false);
  				PLAYER::SET_MAX_WANTED_LEVEL(2);
  				PLAYER::SET_DISPATCH_COPS_FOR_PLAYER(PLAYER::PLAYER_ID(), false);
  				PED::SET_CREATE_RANDOM_COPS(false);
  				PLAYER::_0xBC9490CA15AEA8FB(PLAYER::PLAYER_ID());
  				PLAYER::REPORT_POLICE_SPOTTED_PLAYER(PLAYER::PLAYER_ID());
  				uParam0->f_2 = MISC::GET_GAME_TIMER() + 15000;
  				func_244(uParam0, 4, 0);
  				break;
  			
  			case 4:
  				if (MISC::GET_GAME_TIMER() > uParam0->f_2)
  				{
  					PLAYER::SET_DISPATCH_COPS_FOR_PLAYER(PLAYER::PLAYER_ID(), true);
  					PED::SET_CREATE_RANDOM_COPS(true);
  					PLAYER::SET_MAX_WANTED_LEVEL(5);
  					iLocal_2594 = 1;
  					func_243(uParam0);
  				}
  				PLAYER::_0xBC9490CA15AEA8FB(PLAYER::PLAYER_ID());
  				PLAYER::REPORT_POLICE_SPOTTED_PLAYER(PLAYER::PLAYER_ID());
  				break;
  			}
  	}
  }
  
  int func_247(int iParam0, int iParam1, bool bParam2, char* sParam3, int iParam4, bool bParam5)
  {
  	return func_248(iParam0, iParam1, sParam3, 0f, 0f, 0f, 0, bParam2, iParam4, bParam5);
  }
  
  int func_248(var uParam0, int iParam1, char* sParam2, struct<3> Param3, int iParam6, bool bParam7, var uParam8, bool bParam9)
  {
  	if (func_179(*uParam0))
  	{
  		if (!bParam7 || iParam1 >= uParam0->f_5)
  		{
  			uParam0->f_38 = MISC::GET_GAME_TIMER();
  			if (iParam1 != uParam0->f_5 || !MISC::ARE_STRINGS_EQUAL(&(uParam0->f_9), sParam2))
  			{
  				uParam0->f_6 = uParam0->f_5;
  				uParam0->f_5 = iParam1;
  				uParam0->f_17 = { uParam0->f_9 };
  				StringCopy(&(uParam0->f_9), sParam2, 32);
  				if (bParam9)
  				{
  					uParam0->f_36 = 1;
  					uParam0->f_35 = 0;
  				}
  				else
  				{
  					uParam0->f_36 = 0;
  					uParam0->f_35 = uParam8;
  				}
  				uParam0->f_47 = 0;
  				uParam0->f_46 = 0;
  				uParam0->f_48 = 0;
  				uParam0->f_37 = MISC::GET_GAME_TIMER();
  				if (!func_233(Param3))
  				{
  					uParam0->f_88 = { Param3 };
  				}
  				if (iParam6 != 0 && ENTITY::DOES_ENTITY_EXIST(iParam6))
  				{
  					uParam0->f_91 = iParam6;
  				}
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  void func_249(char* sParam0, struct<3> Param1, float fParam4, int iParam5, int iParam6, int iParam7, int iParam8)
  {
  	struct<32> Var0;
  	
  	Var0 = -1;
  	StringCopy(&(Var0.f_1), sParam0, 64);
  	StringCopy(&(Var0.f_17), "", 24);
  	Var0.f_28 = iParam5;
  	Var0.f_26 = fParam4;
  	Var0.f_29 = iParam6;
  	Var0.f_30 = iParam7;
  	Var0.f_31 = iParam8;
  	Var0.f_23 = { Param1 };
  	func_250(&Var0, 0);
  }
  
  int func_250(var uParam0, char* sParam1)
  {
  	int iVar0;
  	int iVar1;
  	
  	if ((MISC::IS_STRING_NULL_OR_EMPTY(&(uParam0->f_1)) && *uParam0 != -1) && (!ENTITY::DOES_ENTITY_EXIST(Local_28[*uParam0 /*110*/]) || PED::IS_PED_INJURED(Local_28[*uParam0 /*110*/])))
  	{
  		return 0;
  	}
  	while (iVar0 != -1 && !MISC::IS_STRING_NULL_OR_EMPTY(&(Local_1734[iVar0 /*32*/].f_1)))
  	{
  		iVar0++;
  		if (iVar0 > (Local_1734 - 1))
  		{
  			iVar0 = -1;
  		}
  	}
  	if (iVar0 != -1)
  	{
  		if (*uParam0 == -1 || (MISC::IS_STRING_NULL_OR_EMPTY(sParam1) || MISC::ARE_STRINGS_EQUAL(sParam1, &(uParam0->f_17))))
  		{
  			Local_1734[iVar0 /*32*/] = *uParam0;
  			Local_1734[iVar0 /*32*/].f_1 = { uParam0->f_1 };
  			if (*uParam0 != -1)
  			{
  				Local_1734[iVar0 /*32*/].f_23 = { ENTITY::GET_ENTITY_COORDS(Local_28[*uParam0 /*110*/], true) };
  			}
  			else
  			{
  				Local_1734[iVar0 /*32*/].f_23 = { uParam0->f_23 };
  			}
  			Local_1734[iVar0 /*32*/].f_26 = uParam0->f_26;
  			Local_1734[iVar0 /*32*/].f_28 = uParam0->f_28;
  			Local_1734[iVar0 /*32*/].f_29 = uParam0->f_29;
  			Local_1734[iVar0 /*32*/].f_27 = MISC::GET_GAME_TIMER();
  			Local_1734[iVar0 /*32*/].f_30 = uParam0->f_30;
  			Local_1734[iVar0 /*32*/].f_31 = uParam0->f_31;
  			iVar1 = 1;
  		}
  		else
  		{
  			iVar1 = 0;
  		}
  		*uParam0 = -1;
  		StringCopy(&(uParam0->f_1), "", 64);
  		uParam0->f_23 = { 0f, 0f, 0f };
  		uParam0->f_26 = 0f;
  		uParam0->f_28 = 0;
  		uParam0->f_29 = 0;
  		uParam0->f_27 = 0;
  		uParam0->f_30 = 0;
  		uParam0->f_31 = 0;
  		return iVar1;
  	}
  	return 0;
  }
  
  void func_251(var uParam0)
  {
  	char cVar0[24];
  	bool bVar6;
  	struct<3> Var7;
  	
  	if (!func_245(uParam0))
  	{
  		if (func_49())
  		{
  			iLocal_2549 = -1;
  		}
  		else if (iLocal_2549 == -1)
  		{
  			iLocal_2549 = MISC::GET_GAME_TIMER();
  			iLocal_2575 = -1;
  			iLocal_2576 = 1;
  		}
  		if (iLocal_2553 != -1 && !MISC::IS_STRING_NULL_OR_EMPTY(&cLocal_2555))
  		{
  			if (((Local_28[iLocal_2553 /*110*/] != 0 && ENTITY::DOES_ENTITY_EXIST(Local_28[iLocal_2553 /*110*/])) && !PED::IS_PED_INJURED(Local_28[iLocal_2553 /*110*/])) && !PED::IS_CONVERSATION_PED_DEAD(Local_28[iLocal_2553 /*110*/]))
  			{
  				if (!PED::IS_PED_RAGDOLL(Local_28[iLocal_2553 /*110*/]))
  				{
  					if (func_49())
  					{
  						if (iLocal_2565 && (iLocal_2576 || iLocal_2554 > iLocal_2575))
  						{
  							if (bLocal_2577)
  							{
  								iLocal_2580 = iLocal_2570;
  								iLocal_2581 = iLocal_2575;
  								MemCopy(&Local_2582, {func_258()}, 4);
  								MemCopy(&Local_2586, {func_257()}, 4);
  								iLocal_2590 = iLocal_2576;
  								bLocal_2591 = iLocal_2578;
  							}
  							if (iLocal_2566)
  							{
  								func_11();
  							}
  							else
  							{
  								func_46();
  							}
  						}
  					}
  					if (func_48())
  					{
  						if ((MISC::GET_GAME_TIMER() - iLocal_2549) > iLocal_2563)
  						{
  							if (func_256(iLocal_2553))
  							{
  								MemCopy(&cVar0, {Local_622}, 6);
  							}
  							else
  							{
  								StringCopy(&cVar0, "SOL1AUD", 24);
  							}
  							switch (iLocal_2553)
  							{
  								case 0:
  									func_45(&uLocal_2383, 4, Local_28[0 /*110*/], "JHP1A_FOREMAN", 0, 1);
  									break;
  								
  								case 1:
  									func_45(&uLocal_2383, 5, Local_28[1 /*110*/], "JHP1A_FOREMAN2", 0, 1);
  									break;
  								
  								case 2:
  									func_45(&uLocal_2383, 4, Local_28[2 /*110*/], "CONSTRUCTION1", 0, 1);
  									break;
  								
  								case 3:
  									func_45(&uLocal_2383, 3, Local_28[3 /*110*/], "CONSTRUCTION2", 0, 1);
  									break;
  							}
  							if (MISC::IS_STRING_NULL_OR_EMPTY(&cLocal_2559))
  							{
  								if (func_255(&uLocal_2383, &cVar0, &cLocal_2555, 8, 0, 0, 0))
  								{
  									bVar6 = true;
  								}
  							}
  							else if (func_254(&uLocal_2383, &cVar0, &cLocal_2555, &cLocal_2559, 8, 0, 0))
  							{
  								bVar6 = true;
  							}
  							if (bVar6)
  							{
  								func_250(&(Local_28[iLocal_2553 /*110*/].f_50), &cLocal_2555);
  								iLocal_2575 = iLocal_2554;
  								iLocal_2576 = iLocal_2567;
  								bLocal_2577 = iLocal_2569;
  								iLocal_2578 = iLocal_2568;
  								iLocal_2553 = -1;
  								iLocal_2554 = -1;
  								StringCopy(&cLocal_2555, "", 16);
  								iLocal_2563 = 0;
  								fLocal_2564 = 9999999f;
  								iLocal_2565 = 0;
  								iLocal_2566 = 0;
  								iLocal_2567 = 1;
  								iLocal_2569 = 0;
  								iLocal_2568 = 0;
  							}
  						}
  					}
  				}
  			}
  			else
  			{
  				iLocal_2553 = -1;
  				iLocal_2554 = -1;
  				StringCopy(&cLocal_2555, "", 16);
  				iLocal_2563 = 0;
  				fLocal_2564 = 9999999f;
  				iLocal_2565 = 0;
  				iLocal_2566 = 0;
  				iLocal_2567 = 1;
  				iLocal_2568 = 0;
  			}
  		}
  		if (((func_49() && iLocal_2570 != -1) && iLocal_2578) && !MISC::IS_STRING_NULL_OR_EMPTY(&cLocal_2571))
  		{
  			Var7 = { ENTITY::GET_ENTITY_COORDS(Local_28[iLocal_2570 /*110*/], true) };
  			if (func_108(PLAYER::PLAYER_PED_ID(), Var7, 1) >= 25f)
  			{
  				iLocal_2580 = iLocal_2570;
  				iLocal_2581 = iLocal_2575;
  				MemCopy(&Local_2582, {func_258()}, 4);
  				MemCopy(&Local_2586, {func_257()}, 4);
  				iLocal_2590 = iLocal_2576;
  				bLocal_2591 = iLocal_2578;
  				func_11();
  				iLocal_2570 = -1;
  				iLocal_2575 = -1;
  				StringCopy(&cLocal_2571, "", 16);
  				iLocal_2576 = 0;
  				iLocal_2578 = 0;
  			}
  		}
  		if (iLocal_2580 != -1 && !MISC::IS_STRING_NULL_OR_EMPTY(&Local_2582))
  		{
  			if (Local_28[iLocal_2580 /*110*/].f_5 > iLocal_2581)
  			{
  				iLocal_2580 = -1;
  				iLocal_2581 = -1;
  				StringCopy(&Local_2582, "", 16);
  				StringCopy(&Local_2586, "", 16);
  				iLocal_2590 = 1;
  			}
  		}
  		if (iLocal_2553 == -1 && MISC::IS_STRING_NULL_OR_EMPTY(&cLocal_2555))
  		{
  			if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 10000)
  			{
  				if (iLocal_2580 != -1 && !MISC::IS_STRING_NULL_OR_EMPTY(&Local_2582))
  				{
  					func_253(iLocal_2580, &Local_2582, iLocal_2581, 0, 0, iLocal_2590, 0, 1, &Local_2586, bLocal_2591);
  					iLocal_2580 = -1;
  					iLocal_2581 = -1;
  					StringCopy(&Local_2582, "", 16);
  					StringCopy(&Local_2586, "", 16);
  					iLocal_2590 = 1;
  				}
  			}
  		}
  	}
  	func_252(bLocal_2591);
  }
  
  void func_252(bool bParam0)
  {
  	if (bParam0)
  	{
  	}
  }
  
  int func_253(int iParam0, char* sParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7, char* sParam8, int iParam9)
  {
  	float fVar0;
  	bool bVar1;
  	
  	fVar0 = func_107(Local_28[iParam0 /*110*/], PLAYER::PLAYER_PED_ID(), 1);
  	if ((iParam2 > iLocal_2554 || iParam2 == 4) || ((iParam2 == iLocal_2554 && (fVar0 < fLocal_2564 || (func_256(iParam0) && !func_256(iLocal_2553)))) && iParam2 != 5))
  	{
  		switch (iParam2)
  		{
  			case 0:
  				if (fVar0 < 20f)
  				{
  					bVar1 = true;
  				}
  				break;
  			
  			default:
  				if (fVar0 < 40f)
  				{
  					bVar1 = true;
  				}
  				break;
  		}
  		if (bVar1)
  		{
  			iLocal_2553 = iParam0;
  			iLocal_2554 = iParam2;
  			StringCopy(&cLocal_2555, sParam1, 16);
  			StringCopy(&cLocal_2559, sParam8, 16);
  			fLocal_2564 = fVar0;
  			iLocal_2565 = iParam3;
  			iLocal_2566 = iParam4;
  			iLocal_2563 = iParam6;
  			iLocal_2567 = iParam5;
  			iLocal_2569 = iParam7;
  			iLocal_2568 = iParam9;
  			return 1;
  		}
  	}
  	return 0;
  }
  
  bool func_254(var uParam0, char* sParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6)
  {
  	func_44(uParam0, 145, sParam1, iParam5, iParam6, 0);
  	if (iParam4 > 7)
  	{
  		if (iParam4 < 12)
  		{
  			iParam4 = 7;
  		}
  	}
  	Global_21132 = 0;
  	Global_21139 = 0;
  	Global_21134 = 0;
  	Global_22116 = 0;
  	Global_22118 = 0;
  	Global_22122 = 1;
  	StringCopy(&Global_22129, sParam3, 24);
  	Global_2621441 = 0;
  	return func_29(sParam2, iParam4, 0);
  }
  
  bool func_255(var uParam0, char* sParam1, char* sParam2, int iParam3, int iParam4, int iParam5, int iParam6)
  {
  	func_44(uParam0, 145, sParam1, iParam4, iParam5, iParam6);
  	if (iParam3 > 7)
  	{
  		if (iParam3 < 12)
  		{
  			iParam3 = 7;
  		}
  	}
  	Global_21132 = 0;
  	Global_21134 = 0;
  	Global_21139 = 0;
  	Global_22116 = 0;
  	Global_22118 = 0;
  	Global_22122 = 0;
  	Global_2621441 = 0;
  	return func_29(sParam2, iParam3, 0);
  }
  
  int func_256(int iParam0)
  {
  	if (iParam0 == 0 || iParam0 == 1)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  struct<6> func_257()
  {
  	struct<6> Var0;
  	int iVar6;
  	int iVar7;
  	int iVar8;
  	
  	StringCopy(&Var0, "NULL", 24);
  	if (Global_21125 == 4)
  	{
  		iVar6 = AUDIO::GET_CURRENT_SCRIPTED_CONVERSATION_LINE();
  		iVar6 = (iVar6 + Global_22135);
  		iVar7 = iVar6 + 1;
  		if (iVar7 > -1 && iVar6 > -1)
  		{
  			if (HUD::DOES_TEXT_LABEL_EXIST(&(Global_19993[iVar7 /*6*/])))
  			{
  				return Global_19993[iVar7 /*6*/];
  			}
  			else
  			{
  				iVar8 = iVar7;
  				while (iVar8 < 70)
  				{
  					if (HUD::DOES_TEXT_LABEL_EXIST(&(Global_19993[iVar8 /*6*/])))
  					{
  						return Global_19993[iVar8 /*6*/];
  						iVar8 = 70;
  					}
  					iVar8++;
  				}
  				return Var0;
  			}
  			return Global_19993[iVar6 /*6*/];
  		}
  		else
  		{
  			return Var0;
  		}
  	}
  	return Var0;
  }
  
  struct<6> func_258()
  {
  	struct<6> Var0;
  	
  	StringCopy(&Var0, "NULL", 24);
  	if (Global_21125 == 4)
  	{
  		return Global_20744;
  	}
  	return Var0;
  }
  
  int func_259(var uParam0, int iParam1, char* sParam2)
  {
  	if (*uParam0 != -1)
  	{
  		return 0;
  	}
  	*uParam0 = 0;
  	uParam0->f_3 = sParam2;
  	uParam0->f_7 = iParam1;
  	return 1;
  }
  
  void func_260(var uParam0)
  {
  	int iVar0;
  	int iVar1;
  	struct<3> Var2;
  	bool bVar5;
  	bool bVar6;
  	
  	if (!func_245(uParam0))
  	{
  		bLocal_2595 = true;
  		if (!iLocal_2593)
  		{
  			if (func_181())
  			{
  				iLocal_2593 = 1;
  				iLocal_2596 = MISC::GET_GAME_TIMER();
  			}
  		}
  		else if ((MISC::GET_GAME_TIMER() - iLocal_2596) > 3000)
  		{
  			iLocal_2593 = 0;
  			iLocal_2596 = -1;
  		}
  		iVar0 = 0;
  		while (iVar0 < Local_28)
  		{
  			if (func_179(Local_28[iVar0 /*110*/]))
  			{
  				func_280(&(Local_28[iVar0 /*110*/]));
  			}
  			iVar0++;
  		}
  		if (func_179(Local_469))
  		{
  			func_280(&Local_469);
  		}
  		iVar1 = 0;
  		while (iVar1 < Local_1734)
  		{
  			if (!MISC::IS_STRING_NULL_OR_EMPTY(&(Local_1734[iVar1 /*32*/].f_1)) && Local_1734[iVar1 /*32*/].f_27 != -1)
  			{
  				if (Local_1734[iVar1 /*32*/].f_28 == -1 || (MISC::GET_GAME_TIMER() - Local_1734[iVar1 /*32*/].f_27) < Local_1734[iVar1 /*32*/].f_28)
  				{
  					if (Local_1734[iVar1 /*32*/].f_29 <= 0 || (MISC::GET_GAME_TIMER() - Local_1734[iVar1 /*32*/].f_27) > Local_1734[iVar1 /*32*/].f_29)
  					{
  						if (Local_1734[iVar1 /*32*/] != -1 && func_179(Local_28[Local_1734[iVar1 /*32*/] /*110*/]))
  						{
  							Var2 = { ENTITY::GET_ENTITY_COORDS(Local_28[Local_1734[iVar1 /*32*/] /*110*/], true) };
  							Local_1734[iVar1 /*32*/].f_23 = { Var2 };
  						}
  						else
  						{
  							Var2 = { Local_1734[iVar1 /*32*/].f_23 };
  						}
  						if (!func_22(&(Local_1693[3 /*8*/])))
  						{
  							if (Local_1734[iVar1 /*32*/].f_31 && MISC::GET_DISTANCE_BETWEEN_COORDS(Var2, Local_642, true) < 35f)
  							{
  								func_170(&(Local_1693[3 /*8*/]), 0, 0, 1);
  							}
  						}
  						iVar0 = 0;
  						while (iVar0 < Local_28)
  						{
  							if (Local_1734[iVar1 /*32*/] == -1 || (iVar0 != Local_1734[iVar1 /*32*/] && Local_28[Local_1734[iVar1 /*32*/] /*110*/].f_5 >= Local_28[iVar0 /*110*/].f_5))
  							{
  								if (ENTITY::DOES_ENTITY_EXIST(Local_28[iVar0 /*110*/]) && !PED::IS_PED_INJURED(Local_28[iVar0 /*110*/]))
  								{
  									if (func_108(Local_28[iVar0 /*110*/], Var2, 1) < (Local_1734[iVar1 /*32*/].f_26 + Local_28[iVar0 /*110*/].f_42))
  									{
  										Local_28[iVar0 /*110*/].f_34 = iVar1;
  										if (Local_1734[iVar1 /*32*/].f_30)
  										{
  											if (!func_22(&(Local_1693[3 /*8*/])))
  											{
  												func_170(&(Local_1693[3 /*8*/]), 0, 0, 1);
  												MemCopy(&cLocal_2375, {Local_1734[iVar1 /*32*/].f_1}, 8);
  											}
  										}
  									}
  								}
  							}
  							iVar0++;
  						}
  					}
  				}
  				else if ((MISC::GET_GAME_TIMER() - Local_1734[iVar1 /*32*/].f_27) > Local_1734[iVar1 /*32*/].f_28 + 2000)
  				{
  					StringCopy(&(Local_1734[iVar1 /*32*/].f_1), "", 64);
  					Local_1734[iVar1 /*32*/] = -1;
  					Local_1734[iVar1 /*32*/].f_23 = { 0f, 0f, 0f };
  					Local_1734[iVar1 /*32*/].f_26 = 0f;
  					Local_1734[iVar1 /*32*/].f_27 = -1;
  					Local_1734[iVar1 /*32*/].f_28 = -1;
  					Local_1734[iVar1 /*32*/].f_29 = -1;
  				}
  			}
  			iVar1++;
  		}
  		iVar0 = 0;
  		while (iVar0 < Local_28)
  		{
  			if (func_179(Local_28[iVar0 /*110*/]))
  			{
  				func_274(&(Local_28[iVar0 /*110*/]));
  			}
  			iVar0++;
  		}
  		if (func_179(Local_469))
  		{
  			func_265(&Local_469);
  		}
  		iVar0 = 0;
  		while (iVar0 < Local_28)
  		{
  			if (func_179(Local_28[iVar0 /*110*/]))
  			{
  				func_264(&(Local_28[iVar0 /*110*/]));
  			}
  			iVar0++;
  		}
  		if (func_179(Local_469))
  		{
  			func_262(&Local_469);
  		}
  		iVar0 = 0;
  		while (iVar0 < Local_28)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Local_28[iVar0 /*110*/].f_105))
  			{
  				if (((!ENTITY::DOES_ENTITY_EXIST(Local_28[iVar0 /*110*/]) || PED::IS_PED_INJURED(Local_28[iVar0 /*110*/])) || PED::IS_PED_RUNNING_RAGDOLL_TASK(Local_28[iVar0 /*110*/])) || (Local_28[iVar0 /*110*/].f_108 && Local_28[iVar0 /*110*/].f_5 != 0))
  				{
  					bVar5 = true;
  				}
  				else if (Local_28[iVar0 /*110*/].f_5 != 0)
  				{
  					bVar6 = true;
  				}
  				if (bVar5 || bVar6)
  				{
  					if (ENTITY::IS_ENTITY_ATTACHED_TO_ENTITY(Local_28[iVar0 /*110*/].f_105, Local_28[iVar0 /*110*/]))
  					{
  						ENTITY::DETACH_ENTITY(Local_28[iVar0 /*110*/].f_105, true, true);
  					}
  					if (bVar5)
  					{
  						ENTITY::SET_OBJECT_AS_NO_LONGER_NEEDED(&(Local_28[iVar0 /*110*/].f_105));
  					}
  					else if (bVar6)
  					{
  						OBJECT::DELETE_OBJECT(&(Local_28[iVar0 /*110*/].f_105));
  					}
  					Local_28[iVar0 /*110*/].f_109 = 0;
  				}
  			}
  			else if (Local_28[iVar0 /*110*/].f_107 != 0 && Local_28[iVar0 /*110*/].f_106 != -1)
  			{
  				if (Local_28[iVar0 /*110*/].f_109 && STREAMING::HAS_MODEL_LOADED(Local_28[iVar0 /*110*/].f_107))
  				{
  					Local_28[iVar0 /*110*/].f_105 = OBJECT::CREATE_OBJECT(Local_28[iVar0 /*110*/].f_107, PED::GET_PED_BONE_COORDS(Local_28[iVar0 /*110*/], Local_28[iVar0 /*110*/].f_106, 0f, 0f, 0f), true, true, false);
  					ENTITY::ATTACH_ENTITY_TO_ENTITY(Local_28[iVar0 /*110*/].f_105, Local_28[iVar0 /*110*/], PED::GET_PED_BONE_INDEX(Local_28[iVar0 /*110*/], Local_28[iVar0 /*110*/].f_106), 0f, 0f, 0f, 0f, 0f, 0f, true, true, true, false, 2, true);
  					Local_28[iVar0 /*110*/].f_109 = 0;
  				}
  			}
  			iVar0++;
  		}
  		iVar1 = 0;
  		while (iVar1 < Local_28)
  		{
  			if (ENTITY::DOES_ENTITY_EXIST(Local_28[iVar1 /*110*/]) && !PED::IS_PED_INJURED(Local_28[iVar1 /*110*/]))
  			{
  				ENTITY::CLEAR_ENTITY_LAST_DAMAGE_ENTITY(Local_28[iVar1 /*110*/]);
  				WEAPON::CLEAR_ENTITY_LAST_WEAPON_DAMAGE(Local_28[iVar1 /*110*/]);
  			}
  			iVar1++;
  		}
  		func_261();
  	}
  	if (func_245(uParam0))
  	{
  	}
  }
  
  void func_261()
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 <= 2)
  	{
  		if (func_179(Local_579[iVar0 /*8*/]))
  		{
  			ENTITY::CLEAR_ENTITY_LAST_DAMAGE_ENTITY(Local_579[iVar0 /*8*/]);
  		}
  		iVar0++;
  	}
  }
  
  void func_262(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	PED::SET_PED_SHOULD_PLAY_IMMEDIATE_SCENARIO_EXIT(*iParam0);
  	if (func_263(*iParam0))
  	{
  		Local_469.f_46 = 0;
  	}
  	switch (iParam0->f_5)
  	{
  		case 0:
  			if (CLOCK::GET_CLOCK_HOURS() >= 5 && CLOCK::GET_CLOCK_HOURS() < 21)
  			{
  				if ((!func_189(*iParam0, 1647992574, 1) && !func_189(*iParam0, 242628503, 1)) || iLocal_2602)
  				{
  					if (TASK::DOES_SCENARIO_EXIST_IN_AREA(203.68f, -3132.46f, 4.79f, 1f, true))
  					{
  						TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD(*iParam0, 203.68f, -3132.46f, 4.79f, 1f, 0);
  						iLocal_2602 = 0;
  					}
  				}
  			}
  			else if (!func_189(*iParam0, -1680762137, 1) || !iLocal_2602)
  			{
  				if (TASK::DOES_SCENARIO_EXIST_IN_AREA(162.69f, -3115.67f, 4.95f, 1f, true))
  				{
  					TASK::TASK_USE_NEAREST_SCENARIO_CHAIN_TO_COORD(*iParam0, 162.69f, -3115.67f, 4.95f, 1f, 0);
  					iLocal_2602 = 1;
  				}
  			}
  			break;
  		
  		case 3:
  			PED::SET_PED_USING_ACTION_MODE(*iParam0, true, -1, "DEFAULT_ACTION");
  			switch (MISC::GET_HASH_KEY(&(iParam0->f_9)))
  			{
  				case 1376342146:
  				case 1681313069:
  				case 1156217463:
  					if (WEAPON::HAS_PED_GOT_WEAPON(*iParam0, joaat("weapon_pistol"), false))
  					{
  						WEAPON::REMOVE_WEAPON_FROM_PED(*iParam0, joaat("weapon_pistol"));
  					}
  					if (!WEAPON::HAS_PED_GOT_WEAPON(*iParam0, joaat("weapon_nightstick"), false))
  					{
  						WEAPON::GIVE_WEAPON_TO_PED(*iParam0, joaat("weapon_nightstick"), -1, true, true);
  					}
  					if (WEAPON::GET_CURRENT_PED_WEAPON(*iParam0, &iVar0, true))
  					{
  						if (iVar0 != joaat("weapon_nightstick"))
  						{
  							WEAPON::SET_CURRENT_PED_WEAPON(*iParam0, joaat("weapon_nightstick"), false);
  						}
  					}
  					break;
  				
  				case 953441746:
  				case 1518302817:
  				case -1298712083:
  				case 185995093:
  				case -1645534839:
  				case 880647822:
  				case 152436526:
  				case 1921975061:
  				case 1682434916:
  				case -924218668:
  				case 600040296:
  					if (WEAPON::HAS_PED_GOT_WEAPON(*iParam0, joaat("weapon_nightstick"), false))
  					{
  						WEAPON::REMOVE_WEAPON_FROM_PED(*iParam0, joaat("weapon_nightstick"));
  					}
  					if (!WEAPON::HAS_PED_GOT_WEAPON(*iParam0, joaat("weapon_pistol"), false))
  					{
  						WEAPON::GIVE_WEAPON_TO_PED(*iParam0, joaat("weapon_pistol"), -1, true, true);
  					}
  					if (WEAPON::GET_CURRENT_PED_WEAPON(*iParam0, &iVar0, true))
  					{
  						if (iVar0 != joaat("weapon_pistol"))
  						{
  							WEAPON::SET_CURRENT_PED_WEAPON(*iParam0, joaat("weapon_pistol"), false);
  						}
  					}
  					break;
  			}
  			if (!func_189(*iParam0, 780511057, 1) || func_263(*iParam0))
  			{
  				TASK::TASK_COMBAT_PED(*iParam0, PLAYER::PLAYER_PED_ID(), 0, 16);
  				TASK::TASK_LOOK_AT_ENTITY(*iParam0, PLAYER::PLAYER_PED_ID(), -1, 2048, 2);
  			}
  			break;
  		
  		case 1:
  			switch (MISC::GET_HASH_KEY(&(iParam0->f_9)))
  			{
  				case 686645495:
  					if (ENTITY::DOES_ENTITY_EXIST(iParam0->f_91))
  					{
  						if (!PED::IS_PED_HEADING_TOWARDS_POSITION(*iParam0, ENTITY::GET_ENTITY_COORDS(iParam0->f_91, true), 180f) && (MISC::GET_GAME_TIMER() - iParam0->f_37) < 5000)
  						{
  							if (!func_189(*iParam0, -875674219, 1) || func_263(*iParam0))
  							{
  								TASK::TASK_TURN_PED_TO_FACE_ENTITY(*iParam0, iParam0->f_91, -1);
  								TASK::TASK_LOOK_AT_ENTITY(*iParam0, iParam0->f_91, -1, 2048, 2);
  							}
  						}
  						else if (!func_189(*iParam0, -2015108952, 1) || func_263(*iParam0))
  						{
  							TASK::TASK_GOTO_ENTITY_OFFSET_XY(*iParam0, iParam0->f_91, -1, 2f, -1f, 2.5f, 1f, true);
  						}
  					}
  					break;
  				
  				case -1225951737:
  					if (iParam0->f_41 && !func_65(iParam0->f_88, iParam0->f_43, 1f, 0))
  					{
  						iParam0->f_88 = { iParam0->f_43 };
  						iVar1 = 1;
  					}
  					if (!func_233(iParam0->f_88))
  					{
  						if (!PED::IS_PED_HEADING_TOWARDS_POSITION(*iParam0, iParam0->f_88, 90f) && (MISC::GET_GAME_TIMER() - iParam0->f_37) < 5000)
  						{
  							if ((!func_189(*iParam0, 1464580341, 1) || func_263(*iParam0)) || iVar1)
  							{
  								TASK::TASK_TURN_PED_TO_FACE_COORD(*iParam0, iParam0->f_88, 0);
  								TASK::TASK_LOOK_AT_COORD(*iParam0, iParam0->f_88, -1, 2048, 2);
  							}
  						}
  						else if ((!func_189(*iParam0, 713668775, 1) || func_263(*iParam0)) || iVar1)
  						{
  							TASK::TASK_FOLLOW_NAV_MESH_TO_COORD(*iParam0, iParam0->f_43, 1f, -1, 3f, false, 40000f);
  						}
  					}
  					break;
  				
  				case -1940555668:
  					break;
  				
  				case -927541383:
  					if (!func_233(iParam0->f_88))
  					{
  						if (!func_189(*iParam0, 1464580341, 1) || func_263(*iParam0))
  						{
  							TASK::TASK_TURN_PED_TO_FACE_COORD(*iParam0, iParam0->f_88, -1);
  							TASK::TASK_LOOK_AT_COORD(*iParam0, iParam0->f_88, -1, 2048, 2);
  						}
  					}
  					else
  					{
  						TASK::TASK_STAND_STILL(*iParam0, -1);
  					}
  					break;
  				
  				case 58299323:
  					if (ENTITY::DOES_ENTITY_EXIST(iParam0->f_91))
  					{
  						if (!func_189(*iParam0, -875674219, 1) || func_263(*iParam0))
  						{
  							TASK::TASK_TURN_PED_TO_FACE_ENTITY(*iParam0, iParam0->f_91, -1);
  							TASK::TASK_LOOK_AT_ENTITY(*iParam0, iParam0->f_91, -1, 2048, 2);
  						}
  					}
  					else
  					{
  						TASK::TASK_STAND_STILL(*iParam0, -1);
  					}
  					break;
  			}
  			break;
  	}
  }
  
  int func_263(struct<26> Param0, 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, var uParam39, var uParam40, var uParam41, var uParam42, var uParam43, var uParam44, var uParam45, var uParam46, var uParam47, var uParam48, var uParam49, var uParam50, var uParam51, var uParam52, var uParam53, var uParam54, var uParam55, var uParam56, var uParam57, var uParam58, var uParam59, var uParam60, var uParam61, var uParam62, var uParam63, var uParam64, var uParam65, var uParam66, var uParam67, var uParam68, var uParam69, var uParam70, var uParam71, var uParam72, var uParam73, var uParam74, var uParam75, var uParam76, var uParam77, var uParam78, var uParam79, var uParam80, var uParam81, var uParam82, var uParam83, var uParam84, var uParam85, var uParam86, var uParam87, var uParam88, var uParam89, var uParam90, var uParam91, var uParam92, var uParam93, var uParam94, var uParam95, var uParam96, var uParam97, var uParam98, var uParam99, var uParam100, var uParam101, var uParam102, var uParam103, var uParam104, var uParam105, var uParam106, var uParam107, var uParam108, var uParam109)
  {
  	if (Param0.f_5 != Param0.f_7 || !MISC::ARE_STRINGS_EQUAL(&(Param0.f_9), &(Param0.f_25)))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_264(var uParam0)
  {
  	int iVar0;
  	int iVar1;
  	char cVar2[24];
  	int iVar8;
  	int iVar9;
  	float fVar10;
  	float fVar11;
  	float fVar12;
  	float fVar13;
  	int iVar14;
  	
  	PED::SET_PED_SHOULD_PLAY_IMMEDIATE_SCENARIO_EXIT(*uParam0);
  	if (func_263(*uParam0))
  	{
  		uParam0->f_46 = 0;
  	}
  	switch (uParam0->f_5)
  	{
  		case 0:
  			iVar1 = 0;
  			while (iVar1 < Local_28)
  			{
  				if (Local_28[iVar1 /*110*/] == *uParam0)
  				{
  					iVar0 = iVar1;
  				}
  				iVar1++;
  			}
  			if (iVar0 != -1)
  			{
  				switch (iVar0)
  				{
  					case 0:
  						if (!func_189(*uParam0, 1647992574, 1))
  						{
  							if (TASK::DOES_SCENARIO_EXIST_IN_AREA(155.74f, -3098.89f, 4.93f, 0.5f, true))
  							{
  								TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD(*uParam0, 155.74f, -3098.89f, 4.93f, 0.5f, -1);
  							}
  						}
  						break;
  					
  					case 1:
  						if ((!func_189(*uParam0, 242628503, 1) || func_263(*uParam0)) && STREAMING::HAS_ANIM_DICT_LOADED("misslsdhsclipboard@base"))
  						{
  							if (!ENTITY::IS_ENTITY_PLAYING_ANIM(*uParam0, "misslsdhsclipboard@base", "base", 3))
  							{
  								TASK::OPEN_SEQUENCE_TASK(&iLocal_2551);
  								if (!func_65(ENTITY::GET_ENTITY_COORDS(*uParam0, true), 126.8496f, -3089.249f, 4.9141f, 0.75f, 0))
  								{
  									TASK::TASK_FOLLOW_NAV_MESH_TO_COORD(0, 126.8496f, -3089.249f, 4.9141f, 1f, -1, 0.5f, false, 264.2812f);
  								}
  								TASK::TASK_ACHIEVE_HEADING(0, 264.2812f, 0);
  								TASK::TASK_PLAY_ANIM(0, "misslsdhsclipboard@base", "base", 8f, -8f, -1, 1, 0f, false, false, false);
  								TASK::CLOSE_SEQUENCE_TASK(iLocal_2551);
  								TASK::TASK_PERFORM_SEQUENCE(*uParam0, iLocal_2551);
  								TASK::CLEAR_SEQUENCE_TASK(&iLocal_2551);
  							}
  							if (ENTITY::DOES_ENTITY_EXIST(Local_579[2 /*8*/]))
  							{
  								TASK::TASK_LOOK_AT_COORD(*uParam0, ENTITY::GET_WORLD_POSITION_OF_ENTITY_BONE(Local_579[2 /*8*/], ENTITY::GET_ENTITY_BONE_INDEX_BY_NAME(Local_579[2 /*8*/], "engine")), -1, 0, 2);
  							}
  							uParam0->f_46 = 0;
  						}
  						else if (STREAMING::HAS_ANIM_DICT_LOADED("misslsdhsclipboard@idle_a"))
  						{
  							switch (uParam0->f_46)
  							{
  								case 0:
  								case 2:
  									if (uParam0->f_46 == 0 && TASK::GET_SEQUENCE_PROGRESS(*uParam0) == 2)
  									{
  										uParam0->f_109 = 1;
  									}
  									if (((uParam0->f_46 == 0 && TASK::GET_SEQUENCE_PROGRESS(*uParam0) == 2) || uParam0->f_46 == 2) && MISC::GET_GAME_TIMER() > uParam0->f_37)
  									{
  										TASK::OPEN_SEQUENCE_TASK(&iLocal_2551);
  										switch (MISC::GET_RANDOM_INT_IN_RANGE(0, 3))
  										{
  											case 0:
  												StringCopy(&cVar2, "idle_a", 24);
  												break;
  											
  											case 1:
  												StringCopy(&cVar2, "idle_b", 24);
  												break;
  											
  											case 2:
  												StringCopy(&cVar2, "idle_c", 24);
  												break;
  										}
  										TASK::TASK_PLAY_ANIM(0, "misslsdhsclipboard@idle_a", &cVar2, 8f, -8f, -1, 0, 0f, false, false, false);
  										TASK::TASK_PLAY_ANIM(0, "misslsdhsclipboard@base", "base", 8f, -8f, -1, 1, 0f, false, false, false);
  										TASK::CLOSE_SEQUENCE_TASK(iLocal_2551);
  										TASK::TASK_PERFORM_SEQUENCE(*uParam0, iLocal_2551);
  										TASK::CLEAR_SEQUENCE_TASK(&iLocal_2551);
  										uParam0->f_46 = 1;
  									}
  									break;
  								
  								case 1:
  									if (TASK::GET_SEQUENCE_PROGRESS(*uParam0) == 1)
  									{
  										uParam0->f_46++;
  									}
  									break;
  								}
  						}
  						break;
  					
  					case 2:
  					case 3:
  						if (!func_189(*uParam0, 1647992574, 1))
  						{
  							if (TASK::DOES_SCENARIO_EXIST_IN_AREA(159.82f, -3085.93f, 5f, 0.1f, true))
  							{
  								TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD(*uParam0, 159.82f, -3085.93f, 5f, 0.1f, -1);
  							}
  							else if (TASK::DOES_SCENARIO_EXIST_IN_AREA(160.15f, -3084.79f, 4.99f, 0.1f, true))
  							{
  								TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD(*uParam0, 160.15f, -3084.79f, 4.99f, 0.1f, -1);
  							}
  							else if (TASK::DOES_SCENARIO_EXIST_IN_AREA(159.09f, -3085.02f, 5.01f, 0.1f, true))
  							{
  								TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD(*uParam0, 159.09f, -3085.02f, 5.01f, 0.1f, -1);
  							}
  						}
  						break;
  					}
  			}
  			break;
  		
  		case 1:
  			switch (MISC::GET_HASH_KEY(&(uParam0->f_9)))
  			{
  				case 2074432461:
  				case 356486511:
  				case -414594135:
  				case 1260350710:
  					if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_91))
  					{
  						if (!PED::IS_PED_HEADING_TOWARDS_POSITION(*uParam0, ENTITY::GET_ENTITY_COORDS(uParam0->f_91, true), 180f) && (MISC::GET_GAME_TIMER() - uParam0->f_37) < 5000)
  						{
  							if (!func_189(*uParam0, -875674219, 1) || func_263(*uParam0))
  							{
  								TASK::TASK_TURN_PED_TO_FACE_ENTITY(*uParam0, uParam0->f_91, -1);
  								TASK::TASK_LOOK_AT_ENTITY(*uParam0, uParam0->f_91, -1, 2048, 2);
  							}
  						}
  						else if (!func_189(*uParam0, -2015108952, 1) || func_263(*uParam0))
  						{
  							TASK::TASK_GOTO_ENTITY_OFFSET_XY(*uParam0, uParam0->f_91, -1, 2f, -1f, 2.5f, 1f, true);
  						}
  					}
  					break;
  				
  				case -1225951737:
  					if (uParam0->f_41 && !func_65(uParam0->f_88, uParam0->f_43, 1f, 0))
  					{
  						uParam0->f_88 = { uParam0->f_43 };
  						iVar8 = 1;
  					}
  					if (!func_233(uParam0->f_88))
  					{
  						if (!PED::IS_PED_HEADING_TOWARDS_POSITION(*uParam0, uParam0->f_88, 90f) && (MISC::GET_GAME_TIMER() - uParam0->f_37) < 5000)
  						{
  							if ((!func_189(*uParam0, 1464580341, 1) || func_263(*uParam0)) || iVar8)
  							{
  								TASK::TASK_TURN_PED_TO_FACE_COORD(*uParam0, uParam0->f_88, 0);
  								TASK::TASK_LOOK_AT_COORD(*uParam0, uParam0->f_88, -1, 2048, 2);
  							}
  						}
  						else if ((!func_189(*uParam0, 713668775, 1) || func_263(*uParam0)) || iVar8)
  						{
  							TASK::TASK_FOLLOW_NAV_MESH_TO_COORD(*uParam0, uParam0->f_43, 1f, -1, 3f, false, 40000f);
  						}
  					}
  					break;
  				
  				case -1940555668:
  					break;
  				
  				case -927541383:
  					if (!func_233(uParam0->f_88))
  					{
  						if (!func_189(*uParam0, 1464580341, 1) || func_263(*uParam0))
  						{
  							TASK::TASK_TURN_PED_TO_FACE_COORD(*uParam0, uParam0->f_88, -1);
  							TASK::TASK_LOOK_AT_COORD(*uParam0, uParam0->f_88, -1, 2048, 2);
  						}
  					}
  					else
  					{
  						TASK::TASK_STAND_STILL(*uParam0, -1);
  					}
  					break;
  				
  				case 58299323:
  					if (ENTITY::DOES_ENTITY_EXIST(uParam0->f_91))
  					{
  						if (!func_189(*uParam0, -875674219, 1) || func_263(*uParam0))
  						{
  							TASK::TASK_TURN_PED_TO_FACE_ENTITY(*uParam0, uParam0->f_91, -1);
  							TASK::TASK_LOOK_AT_ENTITY(*uParam0, uParam0->f_91, -1, 2048, 2);
  						}
  					}
  					else
  					{
  						TASK::TASK_STAND_STILL(*uParam0, -1);
  					}
  					break;
  			}
  			break;
  		
  		case 2:
  			if (((MISC::ARE_STRINGS_EQUAL(&(uParam0->f_9), "ENT_FOOT_LEAVE") || MISC::ARE_STRINGS_EQUAL(&(uParam0->f_9), "ENT_VEH_LEAVE")) || MISC::ARE_STRINGS_EQUAL(&(uParam0->f_9), "WH_FOOT_LEAVE")) || MISC::ARE_STRINGS_EQUAL(&(uParam0->f_9), "WH_VEH_LEAVE"))
  			{
  				if ((!func_189(*uParam0, 242628503, 1) || !PED::IS_PED_FACING_PED(*uParam0, PLAYER::PLAYER_PED_ID(), 90f)) || func_263(*uParam0))
  				{
  					TASK::OPEN_SEQUENCE_TASK(&iLocal_2551);
  					TASK::TASK_TURN_PED_TO_FACE_ENTITY(0, PLAYER::PLAYER_PED_ID(), 0);
  					TASK::TASK_STAND_STILL(0, 2000);
  					TASK::SET_SEQUENCE_TO_REPEAT(iLocal_2551, true);
  					TASK::CLOSE_SEQUENCE_TASK(iLocal_2551);
  					TASK::TASK_PERFORM_SEQUENCE(*uParam0, iLocal_2551);
  					TASK::CLEAR_SEQUENCE_TASK(&iLocal_2551);
  					TASK::TASK_LOOK_AT_ENTITY(*uParam0, PLAYER::PLAYER_PED_ID(), -1, 2048, 2);
  				}
  			}
  			else
  			{
  				if (ENTITY::DOES_ENTITY_EXIST(iLocal_2601) && VEHICLE::IS_VEHICLE_DRIVEABLE(iLocal_2601, false))
  				{
  					fVar11 = func_107(PLAYER::PLAYER_PED_ID(), iLocal_2601, 1);
  				}
  				if ((iLocal_2598 == 3 || iLocal_2598 == 2) || iLocal_2598 == 8)
  				{
  					iVar9 = PLAYER::PLAYER_PED_ID();
  					fVar12 = 2f;
  				}
  				else if (iLocal_2598 == 0 || iLocal_2598 == 1)
  				{
  					iVar9 = PLAYER::PLAYER_PED_ID();
  					fVar12 = 1f;
  				}
  				else if (iLocal_2598 == 5 && ENTITY::DOES_ENTITY_EXIST(iLocal_2601))
  				{
  					if (fVar11 > 10f)
  					{
  						iVar9 = PLAYER::PLAYER_PED_ID();
  						fVar12 = 2f;
  					}
  					else
  					{
  						iVar9 = iLocal_2601;
  						fVar12 = 2f;
  					}
  				}
  				else if (iLocal_2598 == 4 && ENTITY::DOES_ENTITY_EXIST(iLocal_2601))
  				{
  					iVar9 = iLocal_2601;
  					fVar12 = 1f;
  				}
  				if (ENTITY::DOES_ENTITY_EXIST(iVar9))
  				{
  					fVar10 = func_107(*uParam0, iVar9, 1);
  				}
  				if (fVar10 <= 7.5f)
  				{
  					if (((!func_189(*uParam0, 242628503, 1) && !func_189(*uParam0, 1227113341, 1)) || !PED::IS_PED_FACING_PED(*uParam0, PLAYER::PLAYER_PED_ID(), 90f)) || func_263(*uParam0))
  					{
  						TASK::OPEN_SEQUENCE_TASK(&iLocal_2551);
  						TASK::TASK_TURN_PED_TO_FACE_ENTITY(0, PLAYER::PLAYER_PED_ID(), 0);
  						TASK::TASK_STAND_STILL(0, 2000);
  						TASK::SET_SEQUENCE_TO_REPEAT(iLocal_2551, true);
  						TASK::CLOSE_SEQUENCE_TASK(iLocal_2551);
  						TASK::TASK_PERFORM_SEQUENCE(*uParam0, iLocal_2551);
  						TASK::CLEAR_SEQUENCE_TASK(&iLocal_2551);
  						TASK::TASK_LOOK_AT_ENTITY(*uParam0, PLAYER::PLAYER_PED_ID(), -1, 2048, 2);
  					}
  				}
  				else if (!func_189(*uParam0, 1227113341, 1) || func_263(*uParam0))
  				{
  					if (fVar12 > 1f)
  					{
  						fVar13 = 6f;
  					}
  					else
  					{
  						fVar13 = 3f;
  					}
  					TASK::TASK_GO_TO_ENTITY(*uParam0, iVar9, -1, fVar13, fVar12, 2f, 0);
  					TASK::TASK_LOOK_AT_ENTITY(*uParam0, PLAYER::PLAYER_PED_ID(), -1, 2048, 2);
  				}
  			}
  			break;
  		
  		case 3:
  			switch (MISC::GET_HASH_KEY(&(uParam0->f_9)))
  			{
  				case 1376342146:
  				case 1681313069:
  				case 1156217463:
  				case 1568162790:
  				case 1682434916:
  				case -924218668:
  				case 2056033185:
  				case 185995093:
  					if (WEAPON::GET_CURRENT_PED_WEAPON(*uParam0, &iVar14, true))
  					{
  						if (iVar14 != joaat("weapon_unarmed"))
  						{
  							WEAPON::SET_CURRENT_PED_WEAPON(*uParam0, joaat("weapon_unarmed"), false);
  						}
  					}
  					if (!func_189(*uParam0, 780511057, 1))
  					{
  						TASK::TASK_COMBAT_PED(*uParam0, PLAYER::PLAYER_PED_ID(), 0, 16);
  					}
  					break;
  				
  				case 1093888274:
  					if ((!func_189(*uParam0, 242628503, 1) || !PED::IS_PED_FACING_PED(*uParam0, PLAYER::PLAYER_PED_ID(), 90f)) || func_263(*uParam0))
  					{
  						TASK::OPEN_SEQUENCE_TASK(&iLocal_2551);
  						TASK::TASK_TURN_PED_TO_FACE_ENTITY(0, PLAYER::PLAYER_PED_ID(), 0);
  						TASK::TASK_STAND_STILL(0, 2000);
  						TASK::SET_SEQUENCE_TO_REPEAT(iLocal_2551, true);
  						TASK::CLOSE_SEQUENCE_TASK(iLocal_2551);
  						TASK::TASK_PERFORM_SEQUENCE(*uParam0, iLocal_2551);
  						TASK::CLEAR_SEQUENCE_TASK(&iLocal_2551);
  						TASK::TASK_LOOK_AT_ENTITY(*uParam0, PLAYER::PLAYER_PED_ID(), -1, 2048, 2);
  					}
  					break;
  			}
  			break;
  		
  		case 5:
  			if (func_108(*uParam0, 177.7484f, -3240.897f, 4.6079f, 1) < 15f)
  			{
  				if (!func_189(*uParam0, 1805844857, 1))
  				{
  					TASK::TASK_SMART_FLEE_PED(*uParam0, PLAYER::PLAYER_PED_ID(), 1000f, -1, false, false);
  				}
  			}
  			else if ((!func_189(*uParam0, 1805844857, 1) && !func_189(*uParam0, 713668775, 1)) || func_263(*uParam0))
  			{
  				TASK::TASK_FOLLOW_NAV_MESH_TO_COORD(*uParam0, 177.7484f, -3240.897f, 4.6079f, 3f, -1, 0.25f, true, 40000f);
  			}
  			break;
  		
  		case 4:
  			switch (MISC::GET_HASH_KEY(&(uParam0->f_9)))
  			{
  				case -1645534839:
  					if (!func_189(*uParam0, -1519143300, 1) || func_263(*uParam0))
  					{
  						TASK::TASK_HANDS_UP(*uParam0, -1, PLAYER::PLAYER_PED_ID(), 0, true);
  					}
  					break;
  			}
  			break;
  	}
  }
  
  void func_265(int iParam0)
  {
  	var uVar0;
  	float fVar1;
  	int iVar2;
  	int iVar3;
  	var uVar4;
  	var uVar5;
  	bool bVar6;
  	bool bVar7;
  	bool bVar8;
  	
  	WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), &uVar0, true);
  	fVar1 = func_107(PLAYER::PLAYER_PED_ID(), *iParam0, 1);
  	if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ANY_VEHICLE(*iParam0))
  	{
  		iVar3 = 1;
  	}
  	if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(*iParam0, PLAYER::PLAYER_PED_ID(), true))
  	{
  		if (WEAPON::HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON(*iParam0, joaat("weapon_unarmed"), 0))
  		{
  			iVar2 = 1;
  		}
  	}
  	uVar4 = func_272(*iParam0, &uVar5, &bVar6, &bVar7);
  	if ((uVar4 && uVar5) && !bVar7)
  	{
  		if (bVar6)
  		{
  			func_247(iParam0, 3, 1, "PLAYER_KILLED", 1, 0);
  		}
  		else
  		{
  			func_247(iParam0, 3, 1, "KILLED", 1, 0);
  		}
  	}
  	else if (((((PED::HAS_PED_RECEIVED_EVENT(*iParam0, 124) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 125)) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 126)) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 22)) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 23)) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 88))
  	{
  		func_247(iParam0, 3, 1, "GUNSHOT", 1, 0);
  	}
  	else if (iParam0->f_39 && func_271(4))
  	{
  		func_247(iParam0, 3, 1, "GUN_AIMED", 1, 0);
  	}
  	else if (iParam0->f_39 && func_270(*iParam0, 2))
  	{
  		func_247(iParam0, 3, 1, "PROJ_AIMED", 1, 0);
  	}
  	else if (((iParam0->f_39 && fVar1 < 8f) && !PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true)) && WEAPON::IS_PED_ARMED(PLAYER::PLAYER_PED_ID(), 5))
  	{
  		func_247(iParam0, 3, 1, "SEEN_WEAPON", 1, 0);
  	}
  	else if ((iParam0->f_39 || iParam0->f_41) && iLocal_2598 == 11)
  	{
  		if (iParam0->f_39)
  		{
  			func_247(iParam0, 3, 1, "STEALING_SEC_CAR", 1, 0);
  		}
  		else if (iParam0->f_41)
  		{
  			func_269(iParam0, 1, "HEARD_SEC_CAR", Local_579[3 /*8*/], 1, 1, 0);
  		}
  	}
  	else if ((iParam0->f_39 || iParam0->f_41) && iLocal_2598 == 6)
  	{
  		if (iParam0->f_39)
  		{
  			func_247(iParam0, 3, 1, "GET_IN_VAN", 1, 0);
  		}
  		else if (iParam0->f_41)
  		{
  			func_269(iParam0, 1, "HEARD_VAN", Local_579[func_102() /*8*/], 1, 1, 0);
  		}
  	}
  	else if ((iParam0->f_39 || iParam0->f_41) && iLocal_2598 == 10)
  	{
  		if (iParam0->f_39)
  		{
  			func_269(iParam0, 3, "STEALING_VAN", Local_579[func_54() /*8*/], 1, 1, 0);
  		}
  		else if (iParam0->f_41)
  		{
  			func_269(iParam0, 1, "HEARD_VAN", Local_579[func_54() /*8*/], 1, 1, 0);
  		}
  	}
  	else if (((iVar2 || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 42)) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 114)) || func_267(*iParam0, 0))
  	{
  		func_247(iParam0, 3, 1, "FIGHT", 1, 0);
  	}
  	else if ((iVar3 || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 103)) || func_267(*iParam0, 1))
  	{
  		func_247(iParam0, 3, 1, "RAN_OVER", 1, 0);
  	}
  	else if (((iParam0->f_5 != 3 && iParam0->f_84) && (iParam0->f_39 || iParam0->f_41)) && (fVar1 < 8f || func_108(PLAYER::PLAYER_PED_ID(), Local_642, 1) < 40f))
  	{
  		if (iParam0->f_39)
  		{
  			func_247(iParam0, 3, 1, "FIGHT_RETURN", 1, 0);
  		}
  		else if (iParam0->f_41)
  		{
  			func_266(iParam0, 1, "HEARD_PLAYER", ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), 1, 1, 0);
  		}
  	}
  	else if (iParam0->f_5 != 5 && uVar4)
  	{
  		if ((uVar5 && bVar6) && bVar7)
  		{
  			func_247(iParam0, 3, 1, "PLAYER_KO", 1, 0);
  		}
  		else if (!bVar6)
  		{
  			func_247(iParam0, 3, 1, "DEAD_BODY", 1, 0);
  		}
  	}
  	if (iParam0->f_34 > -1 && iParam0->f_34 < (Local_1734 - 1))
  	{
  		bVar8 = Local_1734[iParam0->f_34 /*32*/].f_30;
  		switch (MISC::GET_HASH_KEY(&(Local_1734[iParam0->f_34 /*32*/].f_1)))
  		{
  			case 953441746:
  			case 1518302817:
  			case -1298712083:
  			case 185995093:
  			case -1645534839:
  			case 880647822:
  			case 1921975061:
  			case 1376342146:
  			case 1681313069:
  			case 1156217463:
  			case 1682434916:
  			case -924218668:
  			case 152436526:
  			case 600040296:
  				func_247(iParam0, 3, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar8);
  				break;
  			
  			case -1225951737:
  				func_266(iParam0, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), 1, 0, bVar8);
  				break;
  			
  			case 2074432461:
  			case 686645495:
  				func_269(iParam0, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), Local_579[func_102() /*8*/], 1, 0, bVar8);
  				break;
  			}
  	}
  	iParam0->f_34 = -1;
  	if (iParam0->f_7 != iParam0->f_5)
  	{
  		iParam0->f_8 = 1;
  	}
  	else
  	{
  		iParam0->f_8 = 0;
  	}
  	iParam0->f_7 = iParam0->f_5;
  	if (!MISC::ARE_STRINGS_EQUAL(&(iParam0->f_25), &(iParam0->f_9)))
  	{
  		iParam0->f_33 = 1;
  	}
  	else
  	{
  		iParam0->f_33 = 0;
  	}
  	iParam0->f_25 = { iParam0->f_9 };
  	switch (iParam0->f_5)
  	{
  		case 0:
  			break;
  		
  		case 1:
  			switch (MISC::GET_HASH_KEY(&(iParam0->f_9)))
  			{
  				case 58299323:
  					if ((MISC::GET_GAME_TIMER() - iParam0->f_37) > 3000)
  					{
  						func_247(iParam0, 0, 0, "BACK_TO_WORK", 1, 0);
  					}
  					break;
  				
  				case -1225951737:
  					if (((MISC::GET_GAME_TIMER() - iParam0->f_37) > 4000 && func_108(*iParam0, iParam0->f_88, 1) < 3f) && TASK::IS_PED_STILL(*iParam0))
  					{
  						func_247(iParam0, 1, 0, "SOUND_LOST", 1, 0);
  					}
  					break;
  				
  				case -927541383:
  					if ((MISC::GET_GAME_TIMER() - iParam0->f_37) > 4000 && !AUDIO::IS_PED_IN_CURRENT_CONVERSATION(*iParam0))
  					{
  						func_247(iParam0, 0, 0, "BACK_TO_WORK", 1, 0);
  					}
  					break;
  			}
  			break;
  		
  		case 3:
  			switch (MISC::GET_HASH_KEY(&(iParam0->f_9)))
  			{
  				case 1376342146:
  				case 1681313069:
  				case 1156217463:
  					if ((((MISC::GET_GAME_TIMER() - iParam0->f_38) > 8000 && func_108(PLAYER::PLAYER_PED_ID(), Local_642, 1) > 65f) && (func_107(PLAYER::PLAYER_PED_ID(), *iParam0, 1) > 10f || (MISC::GET_GAME_TIMER() - iParam0->f_38) > 16000)) && !AUDIO::IS_PED_IN_CURRENT_CONVERSATION(*iParam0))
  					{
  						func_247(iParam0, 3, 0, "FIGHT_ESC", 1, 0);
  					}
  					break;
  				
  				case 953441746:
  				case 1518302817:
  				case -1298712083:
  				case 185995093:
  				case -1645534839:
  				case 880647822:
  				case 152436526:
  				case 1921975061:
  				case 1682434916:
  				case -924218668:
  				case 600040296:
  					if (func_108(PLAYER::PLAYER_PED_ID(), Local_642, 1) > 300f && func_107(PLAYER::PLAYER_PED_ID(), *iParam0, 1) > 150f)
  					{
  						func_247(iParam0, 3, 0, "FIGHT_ESC", 1, 0);
  					}
  					break;
  			}
  			break;
  	}
  }
  
  int func_266(int iParam0, int iParam1, char* sParam2, struct<3> Param3, bool bParam6, int iParam7, bool bParam8)
  {
  	return func_248(iParam0, iParam1, sParam2, Param3, 0, bParam6, iParam7, bParam8);
  }
  
  int func_267(struct<110> Param0, bool bParam110)
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 < Local_28)
  	{
  		if (func_268(Param0, Local_28[iVar0 /*110*/], bParam110))
  		{
  			return 1;
  		}
  		iVar0++;
  	}
  	return 0;
  }
  
  int func_268(int iParam0, var uParam1, var uParam2, var uParam3, var uParam4, var uParam5, var uParam6, var uParam7, var uParam8, var uParam9, var uParam10, var uParam11, var uParam12, var uParam13, var uParam14, var uParam15, var uParam16, var uParam17, var uParam18, var uParam19, var uParam20, var uParam21, var uParam22, var uParam23, var uParam24, 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, var uParam39, var uParam40, var uParam41, var uParam42, var uParam43, var uParam44, var uParam45, var uParam46, var uParam47, var uParam48, var uParam49, var uParam50, var uParam51, var uParam52, var uParam53, var uParam54, var uParam55, var uParam56, var uParam57, var uParam58, var uParam59, var uParam60, var uParam61, var uParam62, var uParam63, var uParam64, var uParam65, var uParam66, var uParam67, var uParam68, var uParam69, var uParam70, var uParam71, var uParam72, var uParam73, var uParam74, var uParam75, var uParam76, var uParam77, var uParam78, var uParam79, var uParam80, var uParam81, var uParam82, var uParam83, var uParam84, var uParam85, var uParam86, var uParam87, var uParam88, var uParam89, var uParam90, var uParam91, var uParam92, var uParam93, var uParam94, var uParam95, var uParam96, var uParam97, var uParam98, var uParam99, var uParam100, var uParam101, var uParam102, var uParam103, var uParam104, var uParam105, var uParam106, var uParam107, var uParam108, var uParam109, int iParam110, var uParam111, var uParam112, var uParam113, var uParam114, var uParam115, var uParam116, var uParam117, var uParam118, var uParam119, var uParam120, var uParam121, var uParam122, var uParam123, var uParam124, var uParam125, var uParam126, var uParam127, var uParam128, var uParam129, var uParam130, var uParam131, var uParam132, var uParam133, var uParam134, var uParam135, var uParam136, var uParam137, var uParam138, var uParam139, var uParam140, var uParam141, var uParam142, var uParam143, var uParam144, var uParam145, var uParam146, var uParam147, var uParam148, var uParam149, var uParam150, var uParam151, var uParam152, var uParam153, var uParam154, var uParam155, var uParam156, var uParam157, var uParam158, var uParam159, var uParam160, var uParam161, var uParam162, var uParam163, var uParam164, var uParam165, var uParam166, var uParam167, var uParam168, var uParam169, var uParam170, var uParam171, var uParam172, var uParam173, var uParam174, var uParam175, var uParam176, var uParam177, var uParam178, var uParam179, var uParam180, var uParam181, var uParam182, var uParam183, var uParam184, var uParam185, var uParam186, var uParam187, var uParam188, var uParam189, var uParam190, var uParam191, var uParam192, var uParam193, var uParam194, var uParam195, var uParam196, var uParam197, var uParam198, var uParam199, var uParam200, var uParam201, var uParam202, var uParam203, var uParam204, var uParam205, var uParam206, var uParam207, var uParam208, var uParam209, var uParam210, var uParam211, var uParam212, var uParam213, var uParam214, var uParam215, var uParam216, var uParam217, var uParam218, var uParam219, bool bParam220)
  {
  	if (ENTITY::DOES_ENTITY_EXIST(iParam110) && ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(iParam110, PLAYER::PLAYER_PED_ID(), bParam220))
  	{
  		if (func_107(iParam0, iParam110, 1) < 15f)
  		{
  			if (ENTITY::HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT(iParam0, iParam110))
  			{
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  int func_269(int iParam0, int iParam1, char* sParam2, int iParam3, bool bParam4, int iParam5, bool bParam6)
  {
  	return func_248(iParam0, iParam1, sParam2, 0f, 0f, 0f, iParam3, bParam4, iParam5, bParam6);
  }
  
  int func_270(int iParam0, var uParam1, var uParam2, var uParam3, var uParam4, var uParam5, var uParam6, var uParam7, var uParam8, var uParam9, var uParam10, var uParam11, var uParam12, var uParam13, var uParam14, var uParam15, var uParam16, var uParam17, var uParam18, var uParam19, var uParam20, var uParam21, var uParam22, var uParam23, var uParam24, 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, var uParam39, var uParam40, var uParam41, var uParam42, var uParam43, var uParam44, var uParam45, var uParam46, var uParam47, var uParam48, var uParam49, var uParam50, var uParam51, var uParam52, var uParam53, var uParam54, var uParam55, var uParam56, var uParam57, var uParam58, var uParam59, var uParam60, var uParam61, var uParam62, var uParam63, var uParam64, var uParam65, var uParam66, var uParam67, var uParam68, var uParam69, var uParam70, var uParam71, var uParam72, var uParam73, var uParam74, var uParam75, var uParam76, var uParam77, var uParam78, var uParam79, var uParam80, var uParam81, var uParam82, var uParam83, var uParam84, var uParam85, var uParam86, var uParam87, var uParam88, var uParam89, var uParam90, var uParam91, var uParam92, var uParam93, var uParam94, var uParam95, var uParam96, var uParam97, var uParam98, var uParam99, var uParam100, var uParam101, var uParam102, var uParam103, var uParam104, var uParam105, var uParam106, var uParam107, var uParam108, var uParam109, int iParam110)
  {
  	if ((iParam0 != 0 && ENTITY::DOES_ENTITY_EXIST(iParam0)) && !PED::IS_PED_INJURED(iParam0))
  	{
  		if (WEAPON::IS_PED_ARMED(PLAYER::PLAYER_PED_ID(), iParam110) && (PLAYER::IS_PLAYER_FREE_AIMING_AT_ENTITY(PLAYER::PLAYER_ID(), iParam0) || PLAYER::IS_PLAYER_TARGETTING_ENTITY(PLAYER::PLAYER_ID(), iParam0)))
  		{
  			return 1;
  		}
  	}
  	return 0;
  }
  
  int func_271(int iParam0)
  {
  	if (WEAPON::IS_PED_ARMED(PLAYER::PLAYER_PED_ID(), iParam0) && (PLAYER::IS_PLAYER_FREE_AIMING(PLAYER::PLAYER_ID()) || PLAYER::IS_PLAYER_TARGETTING_ANYTHING(PLAYER::PLAYER_ID())))
  	{
  		return 1;
  	}
  	return 0;
  }
  
  int func_272(struct<110> Param0, var uParam110, var uParam111, var uParam112)
  {
  	int iVar0;
  	bool bVar1;
  	bool bVar2;
  	bool bVar3;
  	bool bVar4;
  	
  	iVar0 = 0;
  	while (iVar0 < Local_28)
  	{
  		if (func_273(Param0, Local_28[iVar0 /*110*/], &bVar2, &bVar3, &bVar4))
  		{
  			if (bVar2 && bVar4)
  			{
  				Local_28[iVar0 /*110*/].f_85 = 1;
  			}
  			if (!bVar1)
  			{
  				bVar1 = true;
  				*uParam110 = bVar2;
  				*uParam111 = bVar3;
  				*uParam112 = bVar4;
  			}
  			else
  			{
  				if (bVar2)
  				{
  					*uParam110 = 1;
  				}
  				if (bVar3)
  				{
  					*uParam111 = 1;
  				}
  				if (bVar4)
  				{
  					*uParam112 = 1;
  				}
  			}
  			if (Local_28[iVar0 /*110*/].f_85)
  			{
  				*uParam111 = 1;
  			}
  		}
  		iVar0++;
  	}
  	if (bVar1)
  	{
  		return 1;
  	}
  	*uParam110 = 0;
  	*uParam111 = 0;
  	*uParam112 = 0;
  	return 0;
  }
  
  int func_273(struct<40> Param0, var uParam40, var uParam41, var uParam42, var uParam43, var uParam44, var uParam45, var uParam46, var uParam47, var uParam48, var uParam49, var uParam50, var uParam51, var uParam52, var uParam53, var uParam54, var uParam55, var uParam56, var uParam57, var uParam58, var uParam59, var uParam60, var uParam61, var uParam62, var uParam63, var uParam64, var uParam65, var uParam66, var uParam67, var uParam68, var uParam69, var uParam70, var uParam71, var uParam72, var uParam73, var uParam74, var uParam75, var uParam76, var uParam77, var uParam78, var uParam79, var uParam80, var uParam81, var uParam82, var uParam83, var uParam84, var uParam85, var uParam86, var uParam87, var uParam88, var uParam89, var uParam90, var uParam91, var uParam92, var uParam93, var uParam94, var uParam95, var uParam96, var uParam97, var uParam98, var uParam99, var uParam100, var uParam101, var uParam102, var uParam103, var uParam104, var uParam105, var uParam106, var uParam107, var uParam108, var uParam109, struct<104> Param110, var uParam214, var uParam215, var uParam216, var uParam217, var uParam218, var uParam219, var uParam220, var uParam221, var uParam222)
  {
  	struct<3> Var0;
  	int iVar3;
  	int iVar4;
  	int iVar5;
  	
  	if (ENTITY::DOES_ENTITY_EXIST(Param110) && PED::IS_PED_INJURED(Param110))
  	{
  		Var0 = { ENTITY::GET_ENTITY_COORDS(Param110, false) };
  		if (MISC::GET_DISTANCE_BETWEEN_COORDS(ENTITY::GET_ENTITY_COORDS(Param0, true), Var0, true) < 10f)
  		{
  			if (ENTITY::HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT(Param0, Param110))
  			{
  				if ((MISC::GET_GAME_TIMER() - Param110.f_103) < 3000)
  				{
  					*uParam220 = 1;
  				}
  				else
  				{
  					*uParam220 = 0;
  				}
  				if (*uParam220)
  				{
  					iVar3 = PED::GET_PED_SOURCE_OF_DEATH(Param110);
  					if (ENTITY::IS_ENTITY_A_PED(iVar3))
  					{
  						iVar4 = ENTITY::GET_PED_INDEX_FROM_ENTITY_INDEX(iVar3);
  						if ((iVar4 == PLAYER::PLAYER_PED_ID() && !PED::IS_PED_INJURED(iVar4)) && Param0.f_39)
  						{
  							*uParam221 = 1;
  						}
  						else
  						{
  							*uParam221 = 0;
  						}
  					}
  					else
  					{
  						*uParam221 = 0;
  					}
  				}
  				else
  				{
  					*uParam221 = 0;
  				}
  				iVar5 = PED::GET_PED_CAUSE_OF_DEATH(Param110);
  				if (iVar5 == joaat("weapon_unarmed") || (iVar5 != joaat("weapon_unarmed") && WEAPON::GET_WEAPON_DAMAGE_TYPE(iVar5) == 2))
  				{
  					*uParam222 = 1;
  				}
  				return 1;
  			}
  		}
  	}
  	return 0;
  }
  
  void func_274(int iParam0)
  {
  	var uVar0;
  	float fVar1;
  	int iVar2;
  	int iVar3;
  	struct<8> Var4;
  	var uVar20;
  	var uVar21;
  	bool bVar22;
  	bool bVar23;
  	bool bVar24;
  	int iVar25;
  	int iVar26;
  	struct<6> Var27;
  	bool bVar33;
  	float fVar34;
  	float fVar35;
  	struct<3> Var36;
  	struct<3> Var39;
  	struct<4> Var42;
  	
  	WEAPON::GET_CURRENT_PED_WEAPON(PLAYER::PLAYER_PED_ID(), &uVar0, true);
  	fVar1 = func_107(PLAYER::PLAYER_PED_ID(), *iParam0, 1);
  	if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ANY_VEHICLE(*iParam0))
  	{
  		iVar3 = 1;
  	}
  	if (ENTITY::HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(*iParam0, PLAYER::PLAYER_PED_ID(), true))
  	{
  		if (WEAPON::HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON(*iParam0, joaat("weapon_unarmed"), 0))
  		{
  			iVar2 = 1;
  		}
  	}
  	uVar20 = func_272(*iParam0, &uVar21, &bVar22, &bVar23);
  	if (((iParam0->f_5 != 5 && uVar20) && uVar21) && !bVar23)
  	{
  		if (bVar22)
  		{
  			func_247(iParam0, 5, 1, "PLAYER_KILLED", 1, 0);
  		}
  		else
  		{
  			func_247(iParam0, 5, 1, "KILLED", 1, 0);
  		}
  	}
  	else if (((((PED::HAS_PED_RECEIVED_EVENT(*iParam0, 124) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 125)) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 126)) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 22)) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 23)) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 88))
  	{
  		func_247(iParam0, 5, 1, "GUNSHOT", 1, 0);
  	}
  	else if ((iParam0->f_39 && iParam0->f_5 != 4) && func_271(4))
  	{
  		func_247(iParam0, 4, 1, "GUN_AIMED", 1, 0);
  	}
  	else if (iParam0->f_39 && func_270(*iParam0, 2))
  	{
  		func_247(iParam0, 5, 1, "PROJ_AIMED", 1, 0);
  	}
  	else if ((((iParam0->f_39 && fVar1 < 8f) && iParam0->f_5 != 4) && !PED::IS_PED_IN_ANY_VEHICLE(PLAYER::PLAYER_PED_ID(), true)) && WEAPON::IS_PED_ARMED(PLAYER::PLAYER_PED_ID(), 5))
  	{
  		func_247(iParam0, 5, 1, "SEEN_WEAPON", 1, 0);
  	}
  	else if ((iParam0->f_39 || iParam0->f_41) && iLocal_2598 == 7)
  	{
  		if (iParam0->f_39)
  		{
  			func_247(iParam0, 3, 1, "EXIT_VAN", 1, 0);
  		}
  		else if (iParam0->f_41)
  		{
  			func_266(iParam0, 1, "HEARD_PLAYER", ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), 1, 1, 0);
  		}
  	}
  	else if ((iParam0->f_39 || iParam0->f_41) && iLocal_2598 == 6)
  	{
  		if (iParam0->f_39)
  		{
  			func_247(iParam0, 3, 1, "GET_IN_VAN", 1, 0);
  		}
  		else if (iParam0->f_41)
  		{
  			func_266(iParam0, 1, "HEARD_PLAYER", ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), 1, 1, 0);
  		}
  	}
  	else if ((iParam0->f_39 || iParam0->f_41) && iLocal_2598 == 10)
  	{
  		if (iParam0->f_39)
  		{
  			func_269(iParam0, 3, "STEALING_VAN", Local_579[func_54() /*8*/], 1, 1, 0);
  		}
  		else if (iParam0->f_41)
  		{
  			func_269(iParam0, 1, "HEARD_VAN", Local_579[func_54() /*8*/], 1, 1, 0);
  		}
  	}
  	else if (((iVar2 || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 42)) || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 114)) || func_267(*iParam0, 0))
  	{
  		func_247(iParam0, 3, 1, "FIGHT", 1, 0);
  	}
  	else if ((iVar3 || PED::HAS_PED_RECEIVED_EVENT(*iParam0, 103)) || func_267(*iParam0, 1))
  	{
  		func_247(iParam0, 3, 1, "RAN_OVER", 1, 0);
  	}
  	else if (((iParam0->f_5 != 3 && iParam0->f_84) && (iParam0->f_39 || iParam0->f_41)) && (fVar1 < 8f || func_108(PLAYER::PLAYER_PED_ID(), Local_642, 1) < 40f))
  	{
  		if (iParam0->f_39)
  		{
  			func_247(iParam0, 3, 1, "FIGHT_RETURN", 1, 0);
  		}
  		else if (iParam0->f_41)
  		{
  			func_266(iParam0, 1, "HEARD_PLAYER", ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), 1, 1, 0);
  		}
  	}
  	else if (iParam0->f_5 != 5 && uVar20)
  	{
  		if ((uVar21 && bVar22) && bVar23)
  		{
  			func_247(iParam0, 3, 1, "PLAYER_KO", 1, 0);
  		}
  		else if (!bVar22)
  		{
  			func_247(iParam0, 5, 1, "DEAD_BODY", 1, 0);
  		}
  	}
  	else if (((((((iParam0->f_39 || iParam0->f_41) && (iParam0->f_86 || iParam0->f_87)) && iLocal_2598 == 9) && !MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "SEE_VAN_LEAVING")) && !MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "SEE_VAN_LEAVING_1")) && !MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "CHECK_DRIVER")) && func_108(PLAYER::PLAYER_PED_ID(), Local_642, 1) < 15f)
  	{
  		if (iParam0->f_39)
  		{
  			func_269(iParam0, 1, "SEE_VAN_LEAVING", Local_579[func_102() /*8*/], 1, 1, 0);
  		}
  		else if (iParam0->f_41)
  		{
  			func_269(iParam0, 1, "HEARD_VAN", Local_579[func_102() /*8*/], 1, 1, 0);
  		}
  	}
  	else if (iLocal_2598 != 9)
  	{
  		if ((iParam0->f_86 && (((iLocal_2598 == 0 || iLocal_2598 == 1) || iLocal_2598 == 4) || iParam0->f_5 == 1)) || (iParam0->f_87 && ((iLocal_2598 == 3 || iLocal_2598 == 2) || iLocal_2598 == 5)))
  		{
  			if ((iLocal_2598 == 5 || iLocal_2598 == 4) && ENTITY::HAS_ENTITY_CLEAR_LOS_TO_ENTITY(*iParam0, iLocal_2601, 19))
  			{
  				switch (iLocal_2598)
  				{
  					case 5:
  						StringCopy(&Var4, "WH_DITCH_VEH", 64);
  						break;
  					
  					case 4:
  						StringCopy(&Var4, "ENT_DITCH_VEH", 64);
  						break;
  				}
  				func_247(iParam0, 2, 1, &Var4, 1, 0);
  			}
  			else if (iParam0->f_39)
  			{
  				switch (iLocal_2598)
  				{
  					case 0:
  						StringCopy(&Var4, "ENT_FOOT", 64);
  						break;
  					
  					case 1:
  						StringCopy(&Var4, "ENT_VEH", 64);
  						break;
  					
  					case 2:
  						StringCopy(&Var4, "WH_FOOT", 64);
  						break;
  					
  					case 3:
  						StringCopy(&Var4, "WH_VEH", 64);
  						break;
  					
  					case 5:
  						StringCopy(&Var4, "WH_DITCH_VEH", 64);
  						break;
  					
  					case 4:
  						StringCopy(&Var4, "ENT_DITCH_VEH", 64);
  						break;
  					
  					case -1:
  						if (iParam0->f_5 == 1)
  						{
  							StringCopy(&Var4, "ENT_FOOT", 64);
  						}
  						break;
  				}
  				func_247(iParam0, 2, 1, &Var4, 1, 0);
  			}
  			else if (iParam0->f_41)
  			{
  				func_266(iParam0, 1, "HEARD_PLAYER", ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), 1, 1, 0);
  			}
  		}
  	}
  	if (iParam0->f_34 > -1 && iParam0->f_34 < (Local_1734 - 1))
  	{
  		bVar24 = Local_1734[iParam0->f_34 /*32*/].f_30;
  		switch (MISC::GET_HASH_KEY(&(Local_1734[iParam0->f_34 /*32*/].f_1)))
  		{
  			case 953441746:
  			case 1518302817:
  			case -1298712083:
  				if (iParam0->f_5 != 4)
  				{
  					func_247(iParam0, 5, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case 185995093:
  				if (iParam0->f_5 != 4)
  				{
  					func_247(iParam0, 3, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case -1645534839:
  				if (iParam0->f_5 != 4)
  				{
  					if (func_108(*iParam0, Local_1734[iParam0->f_34 /*32*/].f_23, 1) < 5f)
  					{
  						func_247(iParam0, 4, 1, "GUN_AIMED_AT", 0, bVar24);
  					}
  					else
  					{
  						func_247(iParam0, 5, 1, "SEEN_WEAPON", 0, bVar24);
  					}
  				}
  				break;
  			
  			case 880647822:
  				if (iParam0->f_5 != 4)
  				{
  					func_247(iParam0, 5, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case 1921975061:
  				if (iParam0->f_5 != 4)
  				{
  					func_247(iParam0, 5, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case 1376342146:
  			case 1681313069:
  			case 1156217463:
  			case -419867425:
  				if (iParam0->f_5 != 4)
  				{
  					func_247(iParam0, 3, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case 1682434916:
  			case -924218668:
  			case 2056033185:
  				if (((iParam0->f_5 != 4 && !MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "STEALING_VAN")) && !MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "GET_IN_VAN")) && !MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "EXIT_VAN"))
  				{
  					func_247(iParam0, 3, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case 152436526:
  				if (iParam0->f_5 != 4)
  				{
  					func_247(iParam0, 5, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case -426892158:
  				if (iParam0->f_86)
  				{
  					func_247(iParam0, 2, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case -1461435341:
  				if (iParam0->f_86)
  				{
  					func_247(iParam0, 2, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case -972653884:
  				if (iParam0->f_87)
  				{
  					func_247(iParam0, 2, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case -520621538:
  				if (iParam0->f_87)
  				{
  					func_247(iParam0, 2, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case -1349994105:
  				if (iParam0->f_87)
  				{
  					func_247(iParam0, 2, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), 0, bVar24);
  				}
  				break;
  			
  			case -1225951737:
  				if (iParam0->f_87)
  				{
  					func_266(iParam0, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true), 1, 0, bVar24);
  				}
  				break;
  			
  			case 2074432461:
  				if (iParam0->f_87)
  				{
  					func_269(iParam0, 1, &(Local_1734[iParam0->f_34 /*32*/].f_1), Local_579[func_102() /*8*/], 1, 0, bVar24);
  				}
  				break;
  			}
  	}
  	iParam0->f_34 = -1;
  	if (iParam0->f_7 != iParam0->f_5)
  	{
  		iParam0->f_8 = 1;
  	}
  	else
  	{
  		iParam0->f_8 = 0;
  	}
  	iParam0->f_7 = iParam0->f_5;
  	if (!MISC::ARE_STRINGS_EQUAL(&(iParam0->f_25), &(iParam0->f_9)))
  	{
  		iParam0->f_33 = 1;
  	}
  	else
  	{
  		iParam0->f_33 = 0;
  	}
  	iParam0->f_25 = { iParam0->f_9 };
  	iVar25 = 0;
  	while (iVar25 < Local_28)
  	{
  		if (Local_28[iVar25 /*110*/] == *iParam0)
  		{
  			iVar26 = iVar25;
  		}
  		iVar25++;
  	}
  	switch (iParam0->f_5)
  	{
  		case 5:
  			switch (MISC::GET_HASH_KEY(&(iParam0->f_9)))
  			{
  				case 152436526:
  				case 1921975061:
  				case 880647822:
  				case 953441746:
  				case 1518302817:
  				case -1298712083:
  					if ((func_279(*iParam0) || (iParam0->f_48 % 2) == 0) || !func_179(Local_469))
  					{
  						if ((MISC::GET_HASH_KEY(&(iParam0->f_9)) == 152436526 || MISC::GET_HASH_KEY(&(iParam0->f_9)) == 1921975061) || MISC::GET_HASH_KEY(&(iParam0->f_9)) == 880647822)
  						{
  							if (func_256(iVar26))
  							{
  								Var27 = { func_278(iVar26, "JS_GUN1") };
  								if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 1000, 0, 0, 0))
  								{
  									func_277(iParam0, &(iParam0->f_9), &Var27, 15f, 3000, 250, 0, 1, 0);
  								}
  								else if (iParam0->f_48 == 0)
  								{
  									func_277(iParam0, &(iParam0->f_9), "", 15f, 3000, 250, 1, 1, 0);
  								}
  							}
  							else
  							{
  								switch (iVar26)
  								{
  									case 2:
  										StringCopy(&Var27, "SOL1_ARM1", 24);
  										break;
  									
  									case 3:
  										StringCopy(&Var27, "SOL1_ARM2", 24);
  										break;
  								}
  								if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 1000, 0, 0, 0))
  								{
  									func_277(iParam0, &(iParam0->f_9), &Var27, 15f, 3000, 250, 0, 1, 0);
  								}
  								else if (iParam0->f_48 == 0)
  								{
  									func_277(iParam0, &(iParam0->f_9), "", 15f, 3000, 250, 1, 1, 0);
  								}
  							}
  						}
  						else if ((MISC::GET_HASH_KEY(&(iParam0->f_9)) == 953441746 || MISC::GET_HASH_KEY(&(iParam0->f_9)) == 1518302817) || MISC::GET_HASH_KEY(&(iParam0->f_9)) == -1298712083)
  						{
  							if (func_256(iVar26))
  							{
  								Var27 = { func_278(iVar26, "JS_KILL") };
  								if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 2000, 0, 0, 0))
  								{
  									func_277(iParam0, &(iParam0->f_9), &Var27, 15f, 3000, 250, 0, 1, 0);
  								}
  								else if (iParam0->f_48 == 0)
  								{
  									func_277(iParam0, &(iParam0->f_9), "", 15f, 3000, 250, 1, 1, 0);
  								}
  							}
  							else if (iParam0->f_48 == 0)
  							{
  								func_277(iParam0, &(iParam0->f_9), "", 15f, 3000, 250, 1, 1, 0);
  							}
  						}
  						iParam0->f_48++;
  					}
  					else
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_GETSEC") };
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 2000, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 15f, 3000, 250, 0, 1, 1);
  							}
  							else if (iParam0->f_48 == 0)
  							{
  								func_277(iParam0, &(iParam0->f_9), "", 15f, 3000, 250, 1, 1, 1);
  							}
  						}
  						else
  						{
  							switch (iVar26)
  							{
  								case 2:
  									StringCopy(&Var27, "SOL1_SECIN1", 24);
  									break;
  								
  								case 3:
  									StringCopy(&Var27, "SOL1_SECIN2", 24);
  									break;
  							}
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 2000, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 15f, 3000, 250, 0, 1, 1);
  							}
  							else if (iParam0->f_48 == 0)
  							{
  								func_277(iParam0, &(iParam0->f_9), "", 15f, 3000, 250, 1, 1, 1);
  							}
  						}
  						iParam0->f_48++;
  					}
  					break;
  			}
  			break;
  		
  		case 4:
  			switch (MISC::GET_HASH_KEY(&(iParam0->f_9)))
  			{
  				case 1224761252:
  					if (func_270(*iParam0, 4))
  					{
  						func_247(iParam0, 4, 0, "GUN_AIMED_AT", 1, 0);
  					}
  					else if ((MISC::GET_GAME_TIMER() - iParam0->f_37) > 1000)
  					{
  						func_247(iParam0, 5, 1, "SEEN_WEAPON", 1, 0);
  					}
  					break;
  				
  				case -1645534839:
  					if (func_270(*iParam0, 4))
  					{
  						func_247(iParam0, 4, 1, "GUN_AIMED_AT", 1, 0);
  					}
  					if (((MISC::GET_GAME_TIMER() - iParam0->f_37) > 15000 || (MISC::GET_GAME_TIMER() - iParam0->f_38) > 3000) && !AUDIO::IS_PED_IN_CURRENT_CONVERSATION(*iParam0))
  					{
  						func_247(iParam0, 5, 1, "SEEN_WEAPON", 1, 0);
  					}
  					else if (func_279(*iParam0) || iParam0->f_48 == 0)
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_HND1") };
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 500, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 5f, 3000, 500, 0, 1, 0);
  							}
  							else if (iParam0->f_48 == 0)
  							{
  								func_277(iParam0, &(iParam0->f_9), "", 5f, 3000, 500, 1, 1, 0);
  							}
  						}
  						else
  						{
  							switch (iVar26)
  							{
  								case 2:
  									StringCopy(&Var27, "SOL1_SCAR1", 24);
  									break;
  								
  								case 3:
  									StringCopy(&Var27, "SOL1_SCAR2", 24);
  									break;
  							}
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 500, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 5f, 3000, 500, 0, 1, 0);
  							}
  							else if (iParam0->f_48 == 0)
  							{
  								func_277(iParam0, &(iParam0->f_9), "", 5f, 3000, 500, 1, 1, 0);
  							}
  						}
  						iParam0->f_48++;
  					}
  					else
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_HND1") };
  							if (func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 2000, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 5f, 3000, 500, 0, 1, 0);
  							}
  							else if (iParam0->f_48 == 0)
  							{
  								func_277(iParam0, &(iParam0->f_9), "", 5f, 3000, 500, 1, 1, 0);
  							}
  						}
  						else
  						{
  							switch (iVar26)
  							{
  								case 2:
  									StringCopy(&Var27, "SOL1_SCAR1", 24);
  									break;
  								
  								case 3:
  									StringCopy(&Var27, "SOL1_SCAR2", 24);
  									break;
  							}
  							if (func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 2000, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 5f, 3000, 500, 0, 1, 0);
  							}
  							else if (iParam0->f_48 == 0)
  							{
  								func_277(iParam0, &(iParam0->f_9), "", 5f, 3000, 500, 1, 1, 0);
  							}
  						}
  						iParam0->f_48++;
  					}
  					break;
  			}
  			break;
  		
  		case 0:
  			switch (iVar26)
  			{
  				case 1:
  					if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 5000)
  					{
  						switch (iLocal_2579)
  						{
  							case 0:
  								func_253(iVar26, "JS_STOCK", iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								iLocal_2579++;
  								break;
  							
  							case 1:
  								func_253(iVar26, "JS_STOCKb", iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								iLocal_2579++;
  								break;
  							
  							case 2:
  								func_253(iVar26, "JS_STOCKc", iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								iLocal_2579++;
  								break;
  							
  							case 3:
  								func_253(iVar26, "JS_STOCKd", iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								iLocal_2579++;
  								break;
  							
  							case 4:
  								func_253(iVar26, "JS_STOCKe", iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								iLocal_2579++;
  								break;
  							
  							case 5:
  								func_253(iVar26, "JS_STOCKf", iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								iLocal_2579++;
  								break;
  							
  							case 6:
  								func_253(iVar26, "JS_STOCKg", iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								iLocal_2579++;
  								break;
  							
  							case 7:
  								func_253(iVar26, "JS_STOCKh", iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								iLocal_2579++;
  								break;
  							
  							case 8:
  								func_253(iVar26, "JS_STOCKi", iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								iLocal_2579++;
  								break;
  							
  							case 9:
  								func_253(iVar26, "JS_STOCKj", iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								iLocal_2579++;
  								break;
  							
  							case 10:
  								func_253(iVar26, "JS_STOCKk", iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								iLocal_2579 = 0;
  								break;
  							}
  					}
  					break;
  				
  				case 2:
  					if (!iParam0->f_49)
  					{
  						if (func_253(iVar26, "SOL1_AMB1", iParam0->f_5, 0, 0, 1, 0, 1, 0, 1))
  						{
  							func_45(&uLocal_2383, 4, Local_28[2 /*110*/], "CONSTRUCTION1", 0, 1);
  							func_45(&uLocal_2383, 3, Local_28[3 /*110*/], "CONSTRUCTION2", 0, 1);
  							iParam0->f_49 = 1;
  						}
  					}
  					break;
  			}
  			break;
  		
  		case 1:
  			if (MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "SEE_VAN_LEAVING") || MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "CHECK_DRIVER"))
  			{
  				Var36 = { func_276(ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER::PLAYER_PED_ID(), 0f, 1f, 0f) - ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true)) };
  				Var39 = { func_276(ENTITY::GET_ENTITY_COORDS(Local_28[iVar26 /*110*/], true) - ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true)) };
  				fVar34 = func_275(Var36, Var39);
  				fVar35 = MISC::ACOS(fVar34);
  				if ((fVar35 < 90f && fVar1 < 8f) && ENTITY::GET_ENTITY_SPEED(PLAYER::PLAYER_PED_ID()) < 1f)
  				{
  					bVar33 = true;
  				}
  			}
  			switch (MISC::GET_HASH_KEY(&(iParam0->f_9)))
  			{
  				case -414594135:
  				case 1260350710:
  					if (func_279(*iParam0) && MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "SEE_VAN_LEAVING"))
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_VAN_LVE1") };
  							func_253(iVar26, &Var27, iParam0->f_5, 1, 0, 1, 1000, 0, 0, 0);
  						}
  					}
  					else if (bVar33)
  					{
  						func_269(iParam0, 1, "CHECK_DRIVER", Local_579[func_102() /*8*/], 0, 1, 0);
  					}
  					else if (func_108(PLAYER::PLAYER_PED_ID(), Local_642, 1) >= 20f)
  					{
  						if (fVar1 > 5f)
  						{
  							func_247(iParam0, 1, 0, "VAN_LOST", 1, 0);
  						}
  					}
  					break;
  				
  				case 58299323:
  					if (func_279(*iParam0))
  					{
  						Var27 = { func_278(iVar26, "JS_VAN_LVE2") };
  						func_253(iVar26, &Var27, iParam0->f_5, 1, 0, 1, 0, 0, 0, 0);
  					}
  					else if ((MISC::GET_GAME_TIMER() - iParam0->f_37) > 3000)
  					{
  						func_247(iParam0, 0, 0, "BACK_TO_WORK", 1, 0);
  					}
  					break;
  				
  				case 356486511:
  					if (bVar33)
  					{
  						if ((MISC::GET_GAME_TIMER() - iParam0->f_37) > 2000 && !AUDIO::IS_PED_IN_CURRENT_CONVERSATION(*iParam0))
  						{
  							func_247(iParam0, 3, 1, "STEALING_VAN", 1, 0);
  						}
  					}
  					else
  					{
  						func_269(iParam0, 1, "SEE_VAN_LEAVING_1", Local_579[func_102() /*8*/], 0, 1, 0);
  					}
  					break;
  				
  				case -1225951737:
  					if (((MISC::GET_GAME_TIMER() - iParam0->f_37) > 4000 && func_108(*iParam0, iParam0->f_88, 1) < 3f) && TASK::IS_PED_STILL(*iParam0))
  					{
  						func_247(iParam0, 1, 0, "SOUND_LOST", 1, 0);
  					}
  					else if (func_279(*iParam0))
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_SND_INV") };
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 1, 0, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 3f, 3000, 500, 0, 0, 0);
  							}
  						}
  					}
  					break;
  				
  				case -927541383:
  					if ((MISC::GET_GAME_TIMER() - iParam0->f_37) > 4000 && !AUDIO::IS_PED_IN_CURRENT_CONVERSATION(*iParam0))
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_SNDLOST2") };
  							func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 1000, 0, 0, 0);
  						}
  						func_247(iParam0, 0, 0, "BACK_TO_WORK", 1, 0);
  					}
  					else if (func_279(*iParam0))
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_SNDLOST1") };
  							func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 1000, 0, 0, 0);
  						}
  					}
  					break;
  			}
  			break;
  		
  		case 3:
  			switch (MISC::GET_HASH_KEY(&(iParam0->f_9)))
  			{
  				case 1376342146:
  				case 1681313069:
  				case 1156217463:
  				case -419867425:
  					if ((((MISC::GET_GAME_TIMER() - iParam0->f_38) > 8000 && func_108(PLAYER::PLAYER_PED_ID(), Local_642, 1) > 65f) && (func_107(PLAYER::PLAYER_PED_ID(), *iParam0, 1) > 10f || (MISC::GET_GAME_TIMER() - iParam0->f_38) > 16000)) && !AUDIO::IS_PED_IN_CURRENT_CONVERSATION(*iParam0))
  					{
  						func_247(iParam0, 3, 0, "FIGHT_ESC", 1, 0);
  					}
  					else if (func_279(*iParam0) && iParam0->f_35)
  					{
  						if (!iParam0->f_84)
  						{
  							if (func_256(iVar26))
  							{
  								Var27 = { func_278(iVar26, "JS_MELE_1") };
  								if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 500, 0, 0, 0))
  								{
  									func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 0, 0);
  								}
  							}
  							else
  							{
  								switch (iVar26)
  								{
  									case 2:
  										StringCopy(&Var27, "SOL1_FIGHT1", 24);
  										break;
  									
  									case 3:
  										StringCopy(&Var27, "SOL1_FIGHT2", 24);
  										break;
  								}
  								if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 500, 0, 0, 0))
  								{
  									func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 0, 0);
  								}
  							}
  							iParam0->f_84 = 1;
  						}
  						else if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_MELE_2") };
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 500, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 0, 0);
  							}
  						}
  						else
  						{
  							switch (iVar26)
  							{
  								case 2:
  									StringCopy(&Var27, "SOL1_FIGHT1", 24);
  									break;
  								
  								case 3:
  									StringCopy(&Var27, "SOL1_FIGHT2", 24);
  									break;
  							}
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 500, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 0, 0);
  							}
  						}
  					}
  					break;
  				
  				case 1093888274:
  					if ((MISC::GET_GAME_TIMER() - iParam0->f_37) > 4000)
  					{
  						func_247(iParam0, 0, 0, "BACK_TO_WORK", 1, 0);
  					}
  					if (func_279(*iParam0))
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_MELE_ESC") };
  							func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 500, 0, 0, 0);
  						}
  					}
  					break;
  				
  				case 1682434916:
  					if (((((MISC::GET_GAME_TIMER() - iParam0->f_37) > 2000 && iParam0->f_39) && !AUDIO::IS_PED_IN_CURRENT_CONVERSATION(*iParam0)) && iLocal_2598 != 9) && iLocal_2598 != 10)
  					{
  						func_247(iParam0, 3, 0, "EXIT_VAN", 1, 0);
  					}
  					if (func_279(*iParam0))
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_VAN_IN2") };
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 0, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 1, 0);
  							}
  							else
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 1, 1, 0);
  							}
  						}
  						else
  						{
  							switch (iVar26)
  							{
  								case 2:
  									StringCopy(&Var27, "SOL1_VAN1", 24);
  									break;
  								
  								case 3:
  									StringCopy(&Var27, "SOL1_VAN2", 24);
  									break;
  							}
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 0, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 1, 0);
  							}
  							else
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 1, 1, 0);
  							}
  						}
  					}
  					else if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 2000)
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_VAN_TK") };
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 0, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 1, 0);
  							}
  						}
  					}
  					break;
  				
  				case -924218668:
  					if (func_279(*iParam0))
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_VAN_IN1") };
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 0, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 1, 0);
  							}
  							else
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 1, 1, 0);
  							}
  						}
  						else
  						{
  							switch (iVar26)
  							{
  								case 2:
  									StringCopy(&Var27, "SOL1_VAN1", 24);
  									break;
  								
  								case 3:
  									StringCopy(&Var27, "SOL1_VAN2", 24);
  									break;
  							}
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 0, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 1, 0);
  							}
  							else
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 1, 1, 0);
  							}
  						}
  					}
  					else if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 2000)
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_VAN_TK") };
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 0, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 1, 0);
  							}
  							else
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 1, 1, 0);
  							}
  						}
  					}
  					break;
  				
  				case 2056033185:
  					if (func_279(*iParam0))
  					{
  						if (func_256(iVar26))
  						{
  							Var27 = { func_278(iVar26, "JS_VAN_IN2") };
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 0, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 1, 0);
  							}
  							else
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 1, 1, 0);
  							}
  						}
  						else
  						{
  							switch (iVar26)
  							{
  								case 2:
  									StringCopy(&Var27, "SOL1_VAN1", 24);
  									break;
  								
  								case 3:
  									StringCopy(&Var27, "SOL1_VAN2", 24);
  									break;
  							}
  							if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 0, 0, 0, 0))
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 0, 1, 0);
  							}
  							else
  							{
  								func_277(iParam0, &(iParam0->f_9), &Var27, 25f, 3000, 1000, 1, 1, 0);
  							}
  						}
  					}
  					break;
  			}
  			break;
  		
  		case 2:
  			if ((MISC::GET_GAME_TIMER() - iParam0->f_38) > 5000 && !AUDIO::IS_PED_IN_CURRENT_CONVERSATION(*iParam0))
  			{
  				if (iVar26 == 1)
  				{
  					func_253(iVar26, "JS_STOCK2", 0, 0, 0, 1, 1000, 0, 0, 0);
  					iLocal_2579 = 0;
  				}
  				func_247(iParam0, 0, 0, "BACK_TO_WORK", 1, 0);
  			}
  			else
  			{
  				if (iParam0->f_39)
  				{
  					if ((MISC::GET_GAME_TIMER() - iParam0->f_38) > 1000 && !AUDIO::IS_PED_IN_CURRENT_CONVERSATION(*iParam0))
  					{
  						if (((MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "ENT_FOOT") || MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "ENT_VEH")) || MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "WH_FOOT")) || MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "WH_VEH"))
  						{
  							Var42 = { iParam0->f_9 };
  							StringConCat(&Var42, "_LEAVE", 32);
  							func_247(iParam0, 2, 0, &Var42, 1, 0);
  						}
  					}
  					if ((MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "WH_FOOT") || MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "WH_VEH")) || (MISC::ARE_STRINGS_EQUAL(&(iParam0->f_9), "WH_DITCH_VEH") && !AUDIO::IS_PED_IN_CURRENT_CONVERSATION(*iParam0)))
  					{
  						if (((iParam0->f_104 >= 6 && iLocal_2549 != -1) && (MISC::GET_GAME_TIMER() - iLocal_2549) > 7000) && (MISC::GET_GAME_TIMER() - iParam0->f_38) == 0)
  						{
  							func_247(iParam0, 3, 0, "WH_FAILED_LEAVE", 1, 0);
  						}
  					}
  				}
  				switch (MISC::GET_HASH_KEY(&(iParam0->f_9)))
  				{
  					case -426892158:
  						if (func_279(*iParam0))
  						{
  							if (!iParam0->f_82)
  							{
  								if (func_256(iVar26))
  								{
  									if (!iParam0->f_83)
  									{
  										Var27 = { func_278(iVar26, "JS_ENT_F1") };
  										func_253(iVar26, &Var27, iParam0->f_5, 1, 0, 0, 500, 0, 0, 0);
  									}
  									else
  									{
  										Var27 = { func_278(iVar26, "JS_ENT_F1_P") };
  										func_253(iVar26, &Var27, iParam0->f_5, 1, 0, 0, 500, 0, 0, 0);
  									}
  								}
  							}
  							else if (func_256(iVar26))
  							{
  								if (!iParam0->f_83)
  								{
  									Var27 = { func_278(iVar26, "JS_ENT_F2") };
  									func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 500, 0, 0, 0);
  								}
  								else
  								{
  									Var27 = { func_278(iVar26, "JS_ENT_F2_P") };
  									func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 500, 0, 0, 0);
  								}
  							}
  							iParam0->f_82 = 1;
  						}
  						else if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 5000)
  						{
  							if (func_256(iVar26))
  							{
  								if (!iParam0->f_83)
  								{
  									Var27 = { func_278(iVar26, "JS_ENT_F") };
  									func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								}
  								else
  								{
  									Var27 = { func_278(iVar26, "JS_ENT_F_P") };
  									func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								}
  							}
  						}
  						break;
  					
  					case -1461435341:
  						if (func_279(*iParam0) || iParam0->f_48 == 0)
  						{
  							if (!iParam0->f_82)
  							{
  								if (func_256(iVar26))
  								{
  									Var27 = { func_278(iVar26, "JS_ENT_V1") };
  									if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 500, 0, 0, 0))
  									{
  										iParam0->f_48++;
  									}
  								}
  								iParam0->f_82 = 1;
  							}
  							else if (MISC::ARE_STRINGS_EQUAL(&(iParam0->f_17), "WH_VEH"))
  							{
  								if (func_256(iVar26))
  								{
  									Var27 = { func_278(iVar26, "JS_ENT_V") };
  									if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 1000, 0, 0, 0))
  									{
  										iParam0->f_48++;
  									}
  								}
  							}
  							else if (func_256(iVar26))
  							{
  								Var27 = { func_278(iVar26, "JS_ENT_V3") };
  								if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 0, 1000, 0, 0, 0))
  								{
  									iParam0->f_48++;
  								}
  							}
  						}
  						else if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 5000)
  						{
  							if (func_256(iVar26))
  							{
  								Var27 = { func_278(iVar26, "JS_ENT_V3") };
  								func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  							}
  						}
  						break;
  					
  					case -972653884:
  						if (func_279(*iParam0))
  						{
  							if (iParam0->f_104 == 0)
  							{
  								if (func_256(iVar26))
  								{
  									Var27 = { func_278(iVar26, "JS_WH1") };
  									if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 1, 0, 0, 0, 0))
  									{
  										func_277(iParam0, &(iParam0->f_9), &Var27, 5f, 3000, 500, 0, 0, 0);
  									}
  									else
  									{
  										func_277(iParam0, &(iParam0->f_9), "", 5f, 3000, 500, 1, 0, 0);
  									}
  									iParam0->f_104++;
  								}
  							}
  							else if (iParam0->f_104 > 0)
  							{
  								if (func_256(iVar26))
  								{
  									Var27 = { func_278(iVar26, "JS_WH2") };
  									if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 1, 0, 0, 0, 0))
  									{
  										func_277(iParam0, &(iParam0->f_9), &Var27, 5f, 3000, 500, 0, 0, 0);
  									}
  									else
  									{
  										func_277(iParam0, &(iParam0->f_9), "", 5f, 3000, 500, 1, 0, 0);
  									}
  									iParam0->f_104++;
  								}
  							}
  							iParam0->f_82 = 1;
  						}
  						else if (iParam0->f_104 < 6)
  						{
  							if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 5000)
  							{
  								if (func_256(iVar26))
  								{
  									if (iParam0->f_104 < 5)
  									{
  										Var27 = { func_278(iVar26, "JS_WH") };
  									}
  									else
  									{
  										Var27 = { func_278(iVar26, "JS_WH_F") };
  									}
  									if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 1, 0, 0, 0, 0))
  									{
  										func_277(iParam0, &(iParam0->f_9), &Var27, 10f, 3000, 500, 0, 0, 0);
  									}
  									else
  									{
  										func_277(iParam0, &(iParam0->f_9), "", 10f, 3000, 500, 1, 0, 0);
  									}
  									iParam0->f_104++;
  								}
  							}
  						}
  						break;
  					
  					case -640827668:
  						if (func_279(*iParam0))
  						{
  							if (iParam0->f_104 == 0)
  							{
  								if (func_256(iVar26))
  								{
  									Var27 = { func_278(iVar26, "JS_WH1") };
  									if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 1, 0, 0, 0, 0))
  									{
  										func_277(iParam0, &(iParam0->f_9), &Var27, 5f, 3000, 500, 0, 0, 0);
  									}
  									else
  									{
  										func_277(iParam0, &(iParam0->f_9), "", 5f, 3000, 500, 1, 0, 0);
  									}
  									iParam0->f_104++;
  								}
  							}
  							else if (iParam0->f_104 > 0)
  							{
  								if (func_256(iVar26))
  								{
  									Var27 = { func_278(iVar26, "JS_WH2") };
  									if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 1, 0, 0, 0, 0))
  									{
  										func_277(iParam0, &(iParam0->f_9), &Var27, 5f, 3000, 500, 0, 0, 0);
  									}
  									else
  									{
  										func_277(iParam0, &(iParam0->f_9), "", 5f, 3000, 500, 1, 0, 0);
  									}
  									iParam0->f_104++;
  								}
  							}
  							iParam0->f_82 = 1;
  						}
  						else if (iParam0->f_104 < 6)
  						{
  							if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 5000)
  							{
  								if (func_256(iVar26))
  								{
  									if (iParam0->f_104 < 5)
  									{
  										if (((iParam0->f_104 - 1) % 2) == 0)
  										{
  											Var27 = { func_278(iVar26, "JS_ENT_V4") };
  										}
  										else
  										{
  											Var27 = { func_278(iVar26, "JS_ENT_V3") };
  										}
  									}
  									else
  									{
  										Var27 = { func_278(iVar26, "JS_WH_F") };
  									}
  									if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 1, 0, 0, 0, 0))
  									{
  										func_277(iParam0, &(iParam0->f_9), &Var27, 10f, 3000, 500, 0, 0, 0);
  									}
  									else
  									{
  										func_277(iParam0, &(iParam0->f_9), "", 10f, 3000, 500, 1, 0, 0);
  									}
  									iParam0->f_104++;
  								}
  							}
  						}
  						break;
  					
  					case -520621538:
  						if (func_279(*iParam0))
  						{
  							if (iParam0->f_104 == 0)
  							{
  								if (func_256(iVar26))
  								{
  									Var27 = { func_278(iVar26, "JS_WH1") };
  									if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 1, 0, 0, 0, 0))
  									{
  										func_277(iParam0, &(iParam0->f_9), &Var27, 5f, 3000, 500, 0, 0, 0);
  									}
  									else
  									{
  										func_277(iParam0, &(iParam0->f_9), "", 5f, 3000, 500, 1, 0, 0);
  									}
  									iParam0->f_104++;
  								}
  							}
  							else if (iParam0->f_104 > 0)
  							{
  								if (func_256(iVar26))
  								{
  									Var27 = { func_278(iVar26, "JS_WH2") };
  									if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 1, 0, 0, 0, 0))
  									{
  										func_277(iParam0, &(iParam0->f_9), &Var27, 5f, 3000, 500, 0, 0, 0);
  									}
  									else
  									{
  										func_277(iParam0, &(iParam0->f_9), "", 5f, 3000, 500, 1, 0, 0);
  									}
  									iParam0->f_104++;
  								}
  							}
  							iParam0->f_82 = 1;
  						}
  						else if (iParam0->f_104 < 6)
  						{
  							if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 5000)
  							{
  								if (func_256(iVar26))
  								{
  									if (iParam0->f_104 < 5)
  									{
  										if (((iParam0->f_104 - 1) % 2) == 0)
  										{
  											Var27 = { func_278(iVar26, "JS_ENT_V3") };
  										}
  										else
  										{
  											Var27 = { func_278(iVar26, "JS_WH") };
  										}
  									}
  									else
  									{
  										Var27 = { func_278(iVar26, "JS_WH_F") };
  									}
  									if (func_253(iVar26, &Var27, iParam0->f_5, 1, 1, 1, 0, 0, 0, 0))
  									{
  										func_277(iParam0, &(iParam0->f_9), &Var27, 10f, 3000, 500, 0, 0, 0);
  									}
  									else
  									{
  										func_277(iParam0, &(iParam0->f_9), "", 10f, 3000, 500, 1, 0, 0);
  									}
  									iParam0->f_104++;
  								}
  							}
  						}
  						break;
  					
  					case 778765338:
  						if (iParam0->f_48 == 0)
  						{
  							if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 1000)
  							{
  								if (func_256(iVar26))
  								{
  									Var27 = { func_278(iVar26, "JS_ENT_V4") };
  									func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								}
  								iParam0->f_48++;
  							}
  						}
  						else if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 5000)
  						{
  							if (((iParam0->f_48 - 1) % 3) == 0)
  							{
  								Var27 = { func_278(iVar26, "JS_ENT_V4") };
  							}
  							else
  							{
  								Var27 = { func_278(iVar26, "JS_ENT_V3") };
  							}
  							func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  							iParam0->f_48++;
  						}
  						break;
  					
  					case 1580556320:
  						if (iParam0->f_48 == 0)
  						{
  							if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 1000)
  							{
  								if (func_256(iVar26))
  								{
  									if (!iParam0->f_83)
  									{
  										Var27 = { func_278(iVar26, "JS_ENT_F3") };
  										func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  									}
  									else
  									{
  										Var27 = { func_278(iVar26, "JS_ENT_F3_P") };
  										func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  									}
  								}
  								iParam0->f_48++;
  							}
  						}
  						break;
  					
  					case -1697689838:
  					case -628260985:
  					case -1891358342:
  						if (iParam0->f_48 == 0)
  						{
  							if (func_48() && (MISC::GET_GAME_TIMER() - iLocal_2549) > 1000)
  							{
  								if (func_256(iVar26))
  								{
  									Var27 = { func_278(iVar26, "JS_ENT_V5") };
  									func_253(iVar26, &Var27, iParam0->f_5, 0, 0, 1, 0, 0, 0, 0);
  								}
  								iParam0->f_48++;
  							}
  						}
  						break;
  					}
  			}
  			break;
  	}
  }
  
  float func_275(struct<3> Param0, struct<3> Param3)
  {
  	return (((Param0.x * Param3.x) + (Param0.f_1 * Param3.f_1)) + (Param0.f_2 * Param3.f_2));
  }
  
  Vector3 func_276(struct<3> Param0)
  {
  	float fVar0;
  	float fVar1;
  	
  	fVar0 = SYSTEM::VMAG(Param0);
  	if (fVar0 != 0f)
  	{
  		fVar1 = (1f / fVar0);
  		Param0 = { Param0 * Vector(fVar1, fVar1, fVar1) };
  	}
  	else
  	{
  		Param0.x = 0f;
  		Param0.f_1 = 0f;
  		Param0.f_2 = 0f;
  	}
  	return Param0;
  }
  
  void func_277(int iParam0, char* sParam1, char* sParam2, float fParam3, int iParam4, int iParam5, bool bParam6, int iParam7, int iParam8)
  {
  	int iVar0;
  	int iVar1;
  	
  	iVar0 = 0;
  	while (iVar0 < Local_28)
  	{
  		if (Local_28[iVar0 /*110*/] == *iParam0)
  		{
  			iVar1 = iVar0;
  		}
  		iVar0++;
  	}
  	iParam0->f_50 = iVar1;
  	StringCopy(&(iParam0->f_50.f_1), sParam1, 64);
  	StringCopy(&(iParam0->f_50.f_17), sParam2, 24);
  	iParam0->f_50.f_28 = iParam4;
  	iParam0->f_50.f_26 = fParam3;
  	iParam0->f_50.f_29 = iParam5;
  	iParam0->f_50.f_30 = iParam7;
  	iParam0->f_50.f_31 = iParam8;
  	if (bParam6)
  	{
  		func_250(&(iParam0->f_50), 0);
  	}
  }
  
  struct<6> func_278(int iParam0, char* sParam1)
  {
  	struct<6> Var0;
  	
  	StringCopy(&Var0, sParam1, 24);
  	if (iParam0 == 1)
  	{
  		StringConCat(&Var0, "b", 24);
  	}
  	return Var0;
  }
  
  int func_279(struct<34> Param0, var uParam34, var uParam35, var uParam36, var uParam37, var uParam38, var uParam39, var uParam40, var uParam41, var uParam42, var uParam43, var uParam44, var uParam45, var uParam46, var uParam47, var uParam48, var uParam49, var uParam50, var uParam51, var uParam52, var uParam53, var uParam54, var uParam55, var uParam56, var uParam57, var uParam58, var uParam59, var uParam60, var uParam61, var uParam62, var uParam63, var uParam64, var uParam65, var uParam66, var uParam67, var uParam68, var uParam69, var uParam70, var uParam71, var uParam72, var uParam73, var uParam74, var uParam75, var uParam76, var uParam77, var uParam78, var uParam79, var uParam80, var uParam81, var uParam82, var uParam83, var uParam84, var uParam85, var uParam86, var uParam87, var uParam88, var uParam89, var uParam90, var uParam91, var uParam92, var uParam93, var uParam94, var uParam95, var uParam96, var uParam97, var uParam98, var uParam99, var uParam100, var uParam101, var uParam102, var uParam103, var uParam104, var uParam105, var uParam106, var uParam107, var uParam108, var uParam109)
  {
  	if (Param0.f_8 || Param0.f_33)
  	{
  		return 1;
  	}
  	return 0;
  }
  
  void func_280(int iParam0)
  {
  	if (PED::CAN_PED_SEE_HATED_PED(*iParam0, PLAYER::PLAYER_PED_ID()))
  	{
  		iParam0->f_40 = MISC::GET_GAME_TIMER();
  		iParam0->f_39 = 1;
  	}
  	else if ((MISC::GET_GAME_TIMER() - iParam0->f_40) > 2000 || !PED::IS_PED_FACING_PED(*iParam0, PLAYER::PLAYER_PED_ID(), 90f))
  	{
  		iParam0->f_40 = MISC::GET_GAME_TIMER();
  		iParam0->f_39 = 0;
  	}
  	if (iParam0->f_39)
  	{
  		bLocal_2595 = false;
  	}
  	if (bLocal_2595)
  	{
  		PED::SET_PED_RESET_FLAG(*iParam0, 188, true);
  	}
  	if (!func_281())
  	{
  		iParam0->f_41 = PLAYER::CAN_PED_HEAR_PLAYER(PLAYER::PLAYER_ID(), *iParam0);
  		if (iParam0->f_41)
  		{
  			iParam0->f_43 = { ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true) };
  		}
  	}
  	else
  	{
  		iParam0->f_41 = 0;
  	}
  	switch (iParam0->f_5)
  	{
  		case 5:
  		case 4:
  		case 3:
  			iParam0->f_102 = 1;
  			break;
  		
  		default:
  			iParam0->f_102 = 0;
  			break;
  	}
  }
  
  int func_281()
  {
  	int iVar0;
  	
  	iVar0 = 0;
  	while (iVar0 <= 2)
  	{
  		if (ENTITY::DOES_ENTITY_EXIST(Local_579[iVar0 /*8*/]) && VEHICLE::IS_VEHICLE_DRIVEABLE(Local_579[iVar0 /*8*/], false))
  		{
  			if (VEHICLE::IS_VEHICLE_ALARM_ACTIVATED(Local_579[iVar0 /*8*/]))
  			{
  				return 1;
  			}
  		}
  		iVar0++;
  	}
  	return 0;
  }
  
  void func_282()
  {
  	struct<3> Var0;
  	var uVar3;
  	
  	PED::ADD_RELATIONSHIP_GROUP("BUGSTAR", &iLocal_2550);
  	PED::SET_RELATIONSHIP_BETWEEN_GROUPS(3, 1862763509, iLocal_2550);
  	PED::SET_RELATIONSHIP_BETWEEN_GROUPS(5, iLocal_2550, 1862763509);
  	PED::SET_RELATIONSHIP_BETWEEN_GROUPS(1, joaat("COP"), iLocal_2550);
  	PED::SET_RELATIONSHIP_BETWEEN_GROUPS(1, iLocal_2550, joaat("COP"));
  	VEHICLE::SET_ALL_VEHICLE_GENERATORS_ACTIVE_IN_AREA(Vector(8.64631f, -3092.962f, 139.5795f) - Vector(4.1875f, 24f, 33.3125f), Vector(8.64631f, -3092.962f, 139.5795f) + Vector(4.1875f, 24f, 33.3125f), false, true);
  	VEHICLE::REMOVE_VEHICLES_FROM_GENERATORS_IN_AREA(Vector(7.27131f, -3092.467f, 138.4268f) - Vector(2.375f, 22.75f, 19.4375f), Vector(7.27131f, -3092.467f, 138.4268f) + Vector(2.375f, 22.75f, 19.4375f), 0);
  	MISC::CLEAR_AREA(138.43f, -3092.47f, 4.9f, 28.375f, true, false, false, false);
  	if (func_193() || func_6(0))
  	{
  		iLocal_655 = 0;
  		if (func_193())
  		{
  			if (Global_93547)
  			{
  				iLocal_655++;
  			}
  		}
  		if (func_193())
  		{
  			func_234(iLocal_655, &Var0, &uVar3);
  			func_288(Var0, uVar3, 1, 0);
  		}
  		bLocal_654 = true;
  	}
  	else
  	{
  		while (!func_188(1))
  		{
  			SYSTEM::WAIT(0);
  			func_287(&uLocal_658);
  		}
  	}
  	func_286(&uLocal_658, "JHP1A", 0);
  	func_229(&uLocal_658, "misslsdhsclipboard@base");
  	func_229(&uLocal_658, "misslsdhsclipboard@idle_a");
  	func_229(&uLocal_658, "misstrevor3");
  	func_171(&uLocal_658, joaat("p_amb_clipboard_01"));
  	func_228(&uLocal_658, iLocal_2552);
  	func_230(&uLocal_658, &cLocal_645);
  	PLAYER::SET_PLAYER_NOISE_MULTIPLIER(PLAYER::PLAYER_ID(), 0.15f);
  	func_284(87);
  	func_45(&uLocal_2383, 0, PLAYER::PLAYER_PED_ID(), "MICHAEL", 0, 1);
  	func_45(&uLocal_2383, 3, 0, "LESTER", 0, 1);
  	func_252(bLocal_2548);
  	func_283();
  	iLocal_2552 = INTERIOR::GET_INTERIOR_AT_COORDS_WITH_TYPE(Local_642, "po1_08_warehouseint1");
  	AUDIO::PREPARE_ALARM(&cLocal_626);
  	iLocal_2603 = PED::ADD_SCENARIO_BLOCKING_AREA(713.7754f, -996.4443f, 22.3085f, 715.7624f, -991.7067f, 25.6214f, false, true, true, true);
  	while (!HUD::HAS_ADDITIONAL_TEXT_LOADED(0))
  	{
  		SYSTEM::WAIT(0);
  	}
  }
  
  void func_283()
  {
  	Global_93548 = 1;
  }
  
  void func_284(int iParam0)
  {
  	Global_95225 = 0;
  	switch (iParam0)
  	{
  		case 72:
  			func_285(2);
  			func_285(4);
  			break;
  		
  		case 73:
  			func_285(0);
  			func_285(1);
  			func_285(7);
  			break;
  		
  		case 92:
  			func_285(10);
  			func_285(9);
  			func_285(13);
  			func_285(6);
  			break;
  		
  		case 68:
  			func_285(11);
  			break;
  		
  		case 78:
  			func_285(14);
  			break;
  		
  		case joaat("mpsv_lp0_31"):
  			func_285(3);
  			break;
  		
  		default:
  			break;
  	}
  }
  
  void func_285(int iParam0)
  {
  	MISC::SET_BIT(&Global_95225, iParam0);
  }
  
  int func_286(var uParam0, char* sParam1, int iParam2)
  {
  	if (uParam0->f_779[iParam2 /*5*/].f_1 || uParam0->f_779[iParam2 /*5*/])
  	{
  		if (MISC::ARE_STRINGS_EQUAL(uParam0->f_779[iParam2 /*5*/].f_4, sParam1))
  		{
  			uParam0->f_779[iParam2 /*5*/].f_2 = 0;
  			uParam0->f_1007 = 1;
  			return 1;
  		}
  		else
  		{
  			return 0;
  		}
  	}
  	else
  	{
  		if (iParam2 >= 11)
  		{
  			HUD::REQUEST_ADDITIONAL_TEXT_FOR_DLC(sParam1, iParam2);
  		}
  		else
  		{
  			HUD::REQUEST_ADDITIONAL_TEXT(sParam1, iParam2);
  		}
  		uParam0->f_779[iParam2 /*5*/] = 1;
  		uParam0->f_779[iParam2 /*5*/].f_3 = MISC::GET_GAME_TIMER();
  		uParam0->f_779[iParam2 /*5*/].f_4 = sParam1;
  		uParam0->f_1007 = 1;
  		return 1;
  	}
  	return 0;
  }
  
  void func_287(var uParam0)
  {
  	func_236(uParam0);
  }
  
  void func_288(struct<3> Param0, var uParam3, int iParam4, int iParam5)
  {
  	if (func_193())
  	{
  		MISC::SET_THIS_SCRIPT_CAN_BE_PAUSED(false);
  		MISC::CLEAR_BIT(&(Global_99370.f_20), 2);
  		MISC::SET_GAME_PAUSED(true);
  		if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  		{
  			PLAYER::SET_PLAYER_CONTROL(PLAYER::PLAYER_ID(), false, 0);
  		}
  		Global_99366 = { Param0 };
  		Global_99369 = uParam3;
  		Global_99365 = 1;
  		if (iParam4 == 1)
  		{
  			MISC::SET_BIT(&(Global_99370.f_20), 14);
  		}
  		else
  		{
  			MISC::CLEAR_BIT(&(Global_99370.f_20), 14);
  		}
  		if (iParam5 == 1)
  		{
  			MISC::SET_BIT(&(Global_99370.f_20), 24);
  		}
  		else
  		{
  			MISC::CLEAR_BIT(&(Global_99370.f_20), 24);
  		}
  		func_192(1);
  	}
  }
  
  void func_289(int iParam0)
  {
  	struct<3> Var0;
  	char[] cVar6[8];
  	
  	if (iParam0 == 6)
  	{
  		func_301();
  		func_8(0);
  		AUDIO::TRIGGER_MUSIC_EVENT("JHP1A_FAIL");
  		SCRIPT::TERMINATE_THIS_THREAD();
  	}
  	else if (!bLocal_656)
  	{
  		bLocal_656 = true;
  		iLocal_657 = iParam0;
  		switch (iLocal_657)
  		{
  			case 1:
  				StringCopy(&Var0, "JHP1A_VAN_DEAD", 24);
  				break;
  			
  			case 3:
  				StringCopy(&Var0, "JHP1A_VAN_STUCK", 24);
  				break;
  			
  			case 2:
  				StringCopy(&Var0, "JHP1A_VANS_DEAD", 24);
  				break;
  			
  			case 4:
  				StringCopy(&Var0, "JHP1A_VAN_ABAN", 24);
  				break;
  			
  			case 5:
  				StringCopy(&Var0, "JHP1A_ABAN", 24);
  				break;
  			
  			case 0:
  			default:
  				StringCopy(&Var0, "JHP1A_FF", 24);
  				break;
  		}
  		if (MISC::IS_STRING_NULL_OR_EMPTY(&cVar6))
  		{
  			func_299(&Var0);
  		}
  		else
  		{
  			func_290(&Var0, &cVar6);
  		}
  		AUDIO::TRIGGER_MUSIC_EVENT("JHP1A_FAIL");
  	}
  }
  
  void func_290(char* sParam0, char* sParam1)
  {
  	func_298(sParam0, sParam1);
  	func_291(0);
  }
  
  void func_291(int iParam0)
  {
  	int iVar0;
  	
  	if (Global_112293.f_9083 || func_6(0))
  	{
  		iVar0 = func_4();
  		if (!func_292(iVar0))
  		{
  			return;
  		}
  		MISC::SET_BIT(&(Global_90122[iVar0 /*5*/].f_1), 5);
  		Global_99406 = iParam0;
  	}
  }
  
  int func_292(int iParam0)
  {
  	int iVar0;
  	int iVar1;
  	
  	func_297();
  	if (PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  	{
  		PLAYER::START_FIRING_AMNESTY(5000);
  	}
  	iVar0 = Global_90122[iParam0 /*5*/];
  	iVar1 = Global_77517.f_109[iVar0 /*4*/];
  	func_296(iVar1, 1);
  	PLAYER::SPECIAL_ABILITY_CHARGE_ON_MISSION_FAILED(PLAYER::PLAYER_ID(), 0);
  	PLAYER::SPECIAL_ABILITY_DEACTIVATE(PLAYER::PLAYER_ID(), 0);
  	func_293(&(Global_112293.f_2361.f_539), iVar1);
  	if (Global_93545 == Global_99407)
  	{
  		Global_112293.f_9083.f_330[iVar1 /*6*/].f_1++;
  	}
  	if (!MISC::IS_BIT_SET(Global_90158[iVar1 /*34*/].f_15, 1))
  	{
  		if (!PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  		{
  			MISC::SET_FADE_IN_AFTER_DEATH_ARREST(false);
  		}
  	}
  	Global_112293.f_9083.f_330[iVar1 /*6*/].f_2++;
  	Global_93545 = Global_99407;
  	if (iParam0 == -1)
  	{
  		if (Global_112293.f_9083)
  		{
  		}
  		return 0;
  	}
  	if (MISC::IS_BIT_SET(Global_90122[iParam0 /*5*/].f_1, 4))
  	{
  		return 0;
  	}
  	if (MISC::IS_BIT_SET(Global_90122[iParam0 /*5*/].f_1, 5))
  	{
  		return 0;
  	}
  	return 1;
  }
  
  void func_293(var uParam0, int iParam1)
  {
  	int iVar0;
  	int iVar1;
  	struct<3> Var2;
  	float fVar5;
  	
  	if (iParam1 == 94)
  	{
  		return;
  	}
  	iVar0 = 0;
  	while (iVar0 < 3)
  	{
  		iVar1 = Global_112293.f_18531[iVar0];
  		if ((((iVar1 == 8 || iVar1 == 9) || iVar1 == 10) || (((iVar1 == 11 || iVar1 == 34) || iVar1 == 72) || iVar1 == 73)) && !MISC::IS_BIT_SET(Global_112293.f_9083.f_99.f_219[0], 9))
  		{
  		}
  		else
  		{
  			Var2 = { 0f, 0f, 0f };
  			fVar5 = 0f;
  			if (!func_295(Global_112293.f_18531[iVar0], &Var2, &fVar5))
  			{
  				Global_112293.f_18531[iVar0] = 318;
  				func_294(&(uParam0->f_2296[iVar0]));
  				uParam0->f_2300[iVar0 /*3*/] = { 0f, 0f, 0f };
  				uParam0->f_2310[iVar0] = 0f;
  				uParam0->f_2314[iVar0] = 0;
  				uParam0->f_2318[iVar0 /*3*/] = { 0f, 0f, 0f };
  				uParam0->f_2328[iVar0] = 0;
  				Global_96760[iVar0 /*29*/] = { 0f, 0f, 0f };
  				Global_96760[iVar0 /*29*/].f_9 = 0f;
  				Global_96760[iVar0 /*29*/].f_12 = 0f;
  				Global_96760[iVar0 /*29*/].f_3 = { 0f, 0f, 0f };
  				Global_96760[iVar0 /*29*/].f_10 = 0f;
  				Global_96760[iVar0 /*29*/].f_13 = 0f;
  				Global_96760[iVar0 /*29*/].f_6 = { 0f, 0f, 0f };
  				Global_96760[iVar0 /*29*/].f_11 = 0f;
  				Global_96760[iVar0 /*29*/].f_14 = 0f;
  				Global_96760[iVar0 /*29*/].f_17 = { 0f, 0f, 0f };
  				Global_96760[iVar0 /*29*/].f_26 = 0f;
  				Global_96760[iVar0 /*29*/].f_20 = { 0f, 0f, 0f };
  				Global_96760[iVar0 /*29*/].f_27 = 0f;
  				Global_96760[iVar0 /*29*/].f_23 = { 0f, 0f, 0f };
  				Global_96760[iVar0 /*29*/].f_28 = 0f;
  			}
  		}
  		iVar0++;
  	}
  }
  
  void func_294(var uParam0)
  {
  	*uParam0 = -15;
  }
  
  int func_295(int iParam0, var uParam1, float fParam2)
  {
  	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_295(8, uParam1, fParam2);
  			break;
  		
  		case 10:
  			return func_295(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_296(int iParam0, bool bParam1)
  {
  	if (bParam1)
  	{
  		if ((iParam0 != 88 && iParam0 != 89) && iParam0 != 92)
  		{
  			Global_93355[iParam0 /*2*/] = 1;
  		}
  	}
  	else
  	{
  		Global_93355[iParam0 /*2*/] = 0;
  	}
  }
  
  void func_297()
  {
  	Global_99405 = 1;
  	if (PLAYER::IS_PLAYER_BEING_ARRESTED(PLAYER::PLAYER_ID(), true))
  	{
  		if (MISC::IS_STRING_NULL_OR_EMPTY(&Global_77480))
  		{
  			switch (func_165())
  			{
  				case 0:
  					StringCopy(&Global_77480, "CMN_MARRE", 16);
  					break;
  				
  				case 1:
  					StringCopy(&Global_77480, "CMN_FARRE", 16);
  					break;
  				
  				case 2:
  					StringCopy(&Global_77480, "CMN_TARRE", 16);
  					break;
  			}
  			StringCopy(&Global_77484, "", 16);
  		}
  		Global_99405 = 0;
  	}
  	else if (!PLAYER::IS_PLAYER_PLAYING(PLAYER::PLAYER_ID()))
  	{
  		if (MISC::IS_STRING_NULL_OR_EMPTY(&Global_77480))
  		{
  			switch (func_165())
  			{
  				case 0:
  					StringCopy(&Global_77480, "CMN_MDIED", 16);
  					break;
  				
  				case 1:
  					StringCopy(&Global_77480, "CMN_FDIED", 16);
  					break;
  				
  				case 2:
  					StringCopy(&Global_77480, "CMN_TDIED", 16);
  					break;
  			}
  			StringCopy(&Global_77484, "", 16);
  		}
  		Global_99405 = 0;
  		MISC::SET_BIT(&(Global_99370.f_20), 25);
  	}
  }
  
  void func_298(char* sParam0, char* sParam1)
  {
  	if (!MISC::IS_STRING_NULL_OR_EMPTY(sParam0))
  	{
  		if (HUD::GET_LENGTH_OF_LITERAL_STRING(sParam0) <= 16)
  		{
  			if (HUD::GET_LENGTH_OF_LITERAL_STRING(sParam1) <= 16)
  			{
  				StringCopy(&Global_77480, sParam0, 16);
  				StringCopy(&Global_77484, sParam1, 16);
  			}
  		}
  	}
  }
  
  void func_299(char* sParam0)
  {
  	func_300(sParam0);
  	func_291(0);
  }
  
  void func_300(char* sParam0)
  {
  	if (!MISC::IS_STRING_NULL_OR_EMPTY(sParam0))
  	{
  		if (HUD::GET_LENGTH_OF_LITERAL_STRING(sParam0) <= 16)
  		{
  			StringCopy(&Global_77480, sParam0, 16);
  			StringCopy(&Global_77484, "", 16);
  			if (RECORDING::_IS_RECORDING())
  			{
  				RECORDING::_STOP_RECORDING_AND_SAVE_CLIP();
  			}
  		}
  	}
  }
  
  void func_301()
  {
  	int iVar0;
  	
  	if (SCRIPT::HAS_SCRIPT_LOADED("buddyDeathResponse"))
  	{
  		SYSTEM::START_NEW_SCRIPT("buddyDeathResponse", 1424);
  	}
  	if (Global_112293.f_9083 || func_6(0))
  	{
  		if (!func_302())
  		{
  			iVar0 = func_4();
  			if (iVar0 != -1)
  			{
  				if (!func_292(iVar0))
  				{
  					return;
  				}
  				MISC::SET_BIT(&(Global_90122[iVar0 /*5*/].f_1), 5);
  				return;
  			}
  		}
  		else
  		{
  			func_297();
  		}
  	}
  }
  
  int func_302()
  {
  	if (((Global_99370 == 13 || Global_99370 == 10) || Global_99370 == 11) || Global_99370 == 12)
  	{
  		return 0;
  	}
  	return 1;
  }
  
  