// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread 'HATEP' 
0A95: enable_thread_saving 

:HATEP_D
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
jf @HATEP_D 
Model.Load(#FAM1)
Model.Load(#FAM2)
Model.Load(#FAM3)
Model.Load(#MAVERICK)
Model.Load(#ROCKETLA)
Model.Load(#M4)
Model.Load(#MINIGUN)
Model.Load(#MP5LNG)
038B: load_requested_models 

:HATEP_48
wait 7 
if or
   not Model.Available(#FAM1)
   not Model.Available(#FAM2)
   not Model.Available(#FAM3)
   not Model.Available(#MAVERICK)
   not Model.Available(#ROCKETLA)
   not Model.Available(#M4)
   not Model.Available(#MINIGUN)
   not Model.Available(#MP5LNG)
jf @HATEP_87 
wait 0 
jump @HATEP_48 

:HATEP_87
wait 0 
if 
   Actor.Driving($PLAYER_ACTOR)
jf @HATEP_87 
if 
   Actor.DrivingVehicleType($PLAYER_ACTOR, #MAVERICK)
jf @HATEP_87 
0@ = Actor.CurrentCar($PLAYER_ACTOR)
wait 35000 

:HATEP_BD
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 100.0 100.0 100.0 
04C4: store_coords_to 6@ 7@ 8@ from_actor $PLAYER_ACTOR with_offset -100.0 -100.0 0.0 
0208: 9@ = random_float_in_ranges 1@ 6@ 
0208: 10@ = random_float_in_ranges 2@ 7@ 
0087: 11@ = 3@ // (float) 
if 
00C2:   sphere_onscreen 9@ 10@ 11@ radius 5.0 
jf @HATEP_13B 
wait 0 
jump @HATEP_BD 

:HATEP_13B
5@ = Car.Create(#MAVERICK, 9@, 10@, 11@)
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
Car.SetImmunities(5@, 1, 1, 1, 1, 1)
039F: set_car 5@ race_to 1@ 2@ 
4@ = Actor.CreateAsDriver(Gang1, #FAM1, 5@)
Actor.RemoveFromMissionCleanupList(4@)
Actor.Health(4@) = 100000
Actor.SetImmunities(4@, 1, 1, 1, 1, 1)
Actor.SetMaxHealth(4@, 1000)
0446: set_actor 4@ dismemberment_possible 0 
054A: set_actor 4@ can_be_shot_in_a_car 0 
04D8: set_actor 4@ drowns_in_water 0 
05BC: AS_actor 4@ jump 1 
12@ = Marker.CreateAboveActor(4@)
Marker.SetIconSize(12@, 3)
Marker.SetColor(12@, 1)
07E0: set_marker 12@ type_to 1 
13@ = Actor.Create(Gang1, #FAM2, 9@, 10@, 11@)
Actor.RemoveFromMissionCleanupList(13@)
Actor.Health(13@) = 1000
Actor.SetImmunities(13@, 1, 1, 1, 1, 1)
Actor.SetMaxHealth(13@, 1000)
0446: set_actor 13@ dismemberment_possible 0 
054A: set_actor 13@ can_be_shot_in_a_car 0 
04D8: set_actor 13@ drowns_in_water 0 
05BC: AS_actor 13@ jump 1 
0672: AS_actor 13@ attack_car 0@ 
14@ = Actor.Create(Gang1, #FAM3, 9@, 10@, 11@)
Actor.RemoveFromMissionCleanupList(13@)
Actor.Health(14@) = 1000
Actor.SetImmunities(14@, 1, 1, 1, 1, 1)
Actor.SetMaxHealth(14@, 1000)
0446: set_actor 14@ dismemberment_possible 0 
054A: set_actor 14@ can_be_shot_in_a_car 0 
04D8: set_actor 14@ drowns_in_water 0 
05BC: AS_actor 14@ jump 1 
0672: AS_actor 14@ attack_car 0@ 
15@ = Actor.Create(Gang1, #FAM2, 9@, 10@, 11@)
Actor.RemoveFromMissionCleanupList(13@)
Actor.Health(15@) = 1000
Actor.SetImmunities(15@, 1, 1, 1, 1, 1)
Actor.SetMaxHealth(15@, 1000)
0446: set_actor 15@ dismemberment_possible 0 
054A: set_actor 15@ can_be_shot_in_a_car 0 
04D8: set_actor 15@ drowns_in_water 0 
05BC: AS_actor 15@ jump 1 
0672: AS_actor 15@ attack_car 0@ 
16@ = Actor.Create(Gang1, #FAM3, 9@, 10@, 11@)
Actor.RemoveFromMissionCleanupList(13@)
Actor.Health(16@) = 1000
Actor.SetImmunities(16@, 1, 1, 1, 1, 1)
Actor.SetMaxHealth(16@, 1000)
0446: set_actor 16@ dismemberment_possible 0 
054A: set_actor 16@ can_be_shot_in_a_car 0 
04D8: set_actor 16@ drowns_in_water 0 
05BC: AS_actor 16@ jump 1 
0672: AS_actor 16@ attack_car 0@ 
Actor.GiveWeaponAndAmmo(13@, M4, 9999)
Actor.GiveWeaponAndAmmo(14@, M4, 9999)
Actor.GiveWeaponAndAmmo(15@, M4, 9999)
Actor.GiveWeaponAndAmmo(16@, M4, 9999)
0464: put_actor 13@ into_turret_on_car 5@ at_car_offset 1.4 1.3 -0.1 position 3 shooting_angle_limit 360.0 with_weapon 31 
Actor.WeaponAccuracy(13@) = 90
0464: put_actor 14@ into_turret_on_car 5@ at_car_offset 1.4 -0.8 -0.1 position 3 shooting_angle_limit 360.0 with_weapon 31 
Actor.WeaponAccuracy(14@) = 90
0464: put_actor 15@ into_turret_on_car 5@ at_car_offset -1.4 1.3 -0.1 position 1 shooting_angle_limit 360.0 with_weapon 31 
Actor.WeaponAccuracy(15@) = 90
0464: put_actor 16@ into_turret_on_car 5@ at_car_offset -1.4 -0.8 -0.1 position 1 shooting_angle_limit 360.0 with_weapon 31 
Actor.WeaponAccuracy(16@) = 90
060A: create_decision_maker_type 0 store_to 17@ // decision\allowed\m_.ped files 
060B: set_actor 13@ decision_maker_to 17@ 
060B: set_actor 14@ decision_maker_to 17@ 
060B: set_actor 15@ decision_maker_to 17@ 
060B: set_actor 16@ decision_maker_to 17@ 
077A: set_actor 13@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
077A: set_actor 14@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
077A: set_actor 15@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
077A: set_actor 16@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
05E2: AS_actor 13@ kill_actor $PLAYER_ACTOR 
05E2: AS_actor 14@ kill_actor $PLAYER_ACTOR 
05E2: AS_actor 15@ kill_actor $PLAYER_ACTOR 
05E2: AS_actor 16@ kill_actor $PLAYER_ACTOR 
0672: AS_actor 13@ attack_car 0@ 
0672: AS_actor 14@ attack_car 0@ 
0672: AS_actor 15@ attack_car 0@ 
0672: AS_actor 16@ attack_car 0@ 
0825: set_helicopter 5@ instant_rotor_start 
0726: heli 5@ follow_actor $PLAYER_ACTOR follow_car -1 radius 10.0 
07BB: set_heli 5@ horizontal_thrust_power 6 
06D5: 9@ = create_racing_checkpoint_at 2469.7 -1657.0 12.3 point_to 2469.7 -1657.0 18.3 type 1 radius 8.0 

:HATEP_4DB
wait 6 
if 
8204:   not actor $PLAYER_ACTOR near_car 5@ radius 30.0 30.0 sphere 0 in_car 
jf @HATEP_581 
0208: 21@ = random_float_in_ranges -30.2 43.1 
0208: 22@ = random_float_in_ranges -32.2 -21.1 
0208: 23@ = random_float_in_ranges 14.2 30.1 
04C4: store_coords_to 18@ 19@ 20@ from_actor $PLAYER_ACTOR with_offset 21@ 22@ 23@ 
Car.PutAt(5@, 18@, 19@, 20@)
wait 300 
Car.PutAt(5@, 18@, 19@, 20@)
wait 300 
Car.PutAt(5@, 18@, 19@, 20@)
039F: set_car 5@ race_to 18@ 19@ 

:HATEP_581
wait 10 
if or
  $ONMISSION == 1 
   Actor.Dead($PLAYER_ACTOR)
   Car.Wrecked(0@)
jf @HATEP_5C2 
00BA: show_text_styled GXT 'M_FAIL' time 5000 style 1  // ~r~MISSO FRACASSADA!
Player.Money($PLAYER_CHAR) += -50000
jump @HATEP_64C 

:HATEP_5C2
if 
   Actor.DrivingVehicleType($PLAYER_ACTOR, #MAVERICK)
jf @HATEP_4DB 
if 
00EE:   actor $PLAYER_ACTOR sphere 0 near_point 2469.7 -1657.0 radius 19.0 19.0 in_car 
jf @HATEP_4DB 
03E5: show_text_box 'EHL' 
0395: clear_area 1 at 2469.7 -1657.0 13.5363 radius 8.0 
01E3: show_text_1number_styled GXT 'M_PASS' number 10000 time 5000 style 1  // MISSO CONCLUDA!~n~~w~$~1~
Player.Money($PLAYER_CHAR) += 100000
Player.ClearWantedLevel($PLAYER_CHAR)
Car.RemoveReferences(0@)
jump @HATEP_64C 

:HATEP_64C
wait 0 
if 
   not Actor.Driving($PLAYER_ACTOR)
jf @HATEP_64C 
wait 500 
06D6: disable_racing_checkpoint 9@ 
Actor.RemoveReferences(13@)
Actor.DestroyInstantly(13@)
Actor.RemoveReferences(14@)
Actor.DestroyInstantly(14@)
Actor.RemoveReferences(15@)
Actor.DestroyInstantly(15@)
Actor.RemoveReferences(16@)
Actor.DestroyInstantly(16@)
Car.RemoveReferences(5@)
Car.Destroy(5@)
Car.RemoveReferences(0@)
Car.Destroy(0@)
0AAA: 24@ = thread 'DRUG_WARS' pointer 
if 
  24@ == 0 
jf @HATEP_6EC 
0A92: create_custom_thread "DRUG_WARS_V3\DRUG_WARS.CS"  

:HATEP_6EC
wait 500 
0A93: end_custom_thread 
