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

//-------------MAIN---------------


{$CLEO}

0A95: enable_thread_saving

const
  _A1 = 0@
  _61 = 21@
  _1230 = 22@
  _210000 = 23@
end

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

//-------------MAIN---------------
thread 'WSR' 
0661: NOP "WELCOME MY FANS THIS SCRIPT IS NOT FOR KID'S ONLY FOR ADVANCED USERS" 
0661: NOP "========================================================================" 
0661: NOP "WITAM MOI FANI TEN SKRYPT NIE JEST PRZEZNACZONY DLA DZIECI TYLKO DLA ZAAWANSOWANYCH UYTKOWNIKW" 
0661: NOP "========================================================================" 
0661: NOP "___PRZECZYTAJ LICENCJE_PL__" 
0661: NOP "========================" 
0661: NOP "MOESZ POPRAWIC" 
0661: NOP "MOESZ ULEPSZYC" 
0661: NOP "NIE MOESZ ROZPOWSZECHNIA" 
0661: NOP "NIE MOZESZ DODAWAC NA INNE STRONY Z MODAMI DO GTA" 
0661: NOP "NIE MOESZ UYWA W ADNEJ GRZE SIECIOWEJ" 
0661: NOP "NIE OTRZYMASZ POZWOLENIA" 
0661: NOP "========================" 
0661: NOP "___LICENCE_README_EN__" 
0661: NOP "========================" 
0661: NOP "YOU CAN CORRECT" 
0661: NOP "YOU CAN IMPROVE" 
0661: NOP "YOU CAN NOT RELEASE" 
0661: NOP "YOU CAN NOT ADD TO OTHER PAGE FROM GTA MODS" 
0661: NOP "YOU CAN NOT USE IN ANY NETWORK GAME" 
0661: NOP "YOU_WILL_NOT_GET_PERMISSION" 
0661: NOP "========================" 
26@ = 0 

:WSR_883
wait 9 
if 
   Player.Defined($PLAYER_CHAR)
jf @WSR_883 
wait 50 
0209: 7@ = random_int_in_ranges 1 27 
if 
  7@ == 1 
jf @WSR_949 
8@ = 400 
jump @WSR_1840 

:WSR_949
if 
  7@ == 2 
jf @WSR_982 
8@ = 405 
jump @WSR_1840 

:WSR_982
if 
  7@ == 3 
jf @WSR_1015 
8@ = 409 
jump @WSR_1840 

:WSR_1015
if 
  7@ == 3 
jf @WSR_1048 
8@ = 421 
jump @WSR_1840 

:WSR_1048
if 
  7@ == 4 
jf @WSR_1081 
8@ = 426 
jump @WSR_1840 

:WSR_1081
if 
  7@ == 5 
jf @WSR_1114 
8@ = 445 
jump @WSR_1840 

:WSR_1114
if 
  7@ == 6 
jf @WSR_1147 
8@ = 458 
jump @WSR_1840 

:WSR_1147
if 
  7@ == 7 
jf @WSR_1180 
8@ = 466 
jump @WSR_1840 

:WSR_1180
if 
  7@ == 8 
jf @WSR_1213 
8@ = 467 
jump @WSR_1840 

:WSR_1213
if 
  7@ == 9 
jf @WSR_1246 
8@ = 470 
jump @WSR_1840 

:WSR_1246
if 
  7@ == 10 
jf @WSR_1279 
8@ = 479 
jump @WSR_1840 

:WSR_1279
if 
  7@ == 11 
jf @WSR_1312 
8@ = 490 
jump @WSR_1840 

:WSR_1312
if 
  7@ == 12 
jf @WSR_1345 
8@ = 492 
jump @WSR_1840 

:WSR_1345
if 
  7@ == 13 
jf @WSR_1378 
8@ = 507 
jump @WSR_1840 

:WSR_1378
if 
  7@ == 14 
jf @WSR_1411 
8@ = 516 
jump @WSR_1840 

:WSR_1411
if 
  7@ == 15 
jf @WSR_1444 
8@ = 529 
jump @WSR_1840 

:WSR_1444
if 
  7@ == 16 
jf @WSR_1477 
8@ = 540 
jump @WSR_1840 

:WSR_1477
if 
  7@ == 17 
jf @WSR_1510 
8@ = 546 
jump @WSR_1840 

:WSR_1510
if 
  7@ == 18 
jf @WSR_1543 
8@ = 547 
jump @WSR_1840 

:WSR_1543
if 
  7@ == 19 
jf @WSR_1576 
8@ = 550 
jump @WSR_1840 

:WSR_1576
if 
  7@ == 20 
jf @WSR_1609 
8@ = 551 
jump @WSR_1840 

:WSR_1609
if 
  7@ == 21 
jf @WSR_1642 
8@ = 560 
jump @WSR_1840 

:WSR_1642
if 
  7@ == 22 
jf @WSR_1675 
8@ = 561 
jump @WSR_1840 

:WSR_1675
if 
  7@ == 23 
jf @WSR_1708 
8@ = 566 
jump @WSR_1840 

:WSR_1708
if 
  7@ == 24 
jf @WSR_1741 
8@ = 567 
jump @WSR_1840 

:WSR_1741
if 
  7@ == 25 
jf @WSR_1774 
8@ = 579 
jump @WSR_1840 

:WSR_1774
if 
  7@ == 26 
jf @WSR_1807 
8@ = 580 
jump @WSR_1840 

:WSR_1807
if 
  7@ == 27 
jf @WSR_1840 
8@ = 585 
jump @WSR_1840 

:WSR_1840
if or
8AF0:   not 17@ = get_int_from_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE1" key "KEY" 
8AF0:   not 18@ = get_int_from_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE2" key "KEY" 
8AF0:   not 19@ = get_int_from_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE3" key "KEY" 
8AF0:   not 20@ = get_int_from_ini_file "CLEO\GANG_WARS_V3\WARS_SET.INI" section "MODE4" key "KEY" 
jf @WSR_2086 
17@ = -1 
18@ = -1 
19@ = -1 
00BC: show_text_highpriority GXT 'DRGER' time 10000 flag 1 
0A93: end_custom_thread

:WSR_2086
Model.Load(17@)
Model.Load(18@)
Model.Load(19@)
Model.Load(8@)
Model.Load(#AK47)
Model.Load(#M4)
Model.Load(#MP5LNG)
Model.Load(#COLT45)
Model.Load(#SILENCED)
Model.Load(#DESERT_EAGLE)
Model.Load(#SAWNOFF)
Model.Load(#SHOTGSPA)
Model.Load(#MICRO_UZI)
Model.Load(#TEC9)
Model.Load(#CHROMEGUN)
038B: load_requested_models 

:WSR_2163
wait 5 
if or
   not Model.Available(17@)
   not Model.Available(18@)
   not Model.Available(19@)
   not Model.Available(8@)
jf @WSR_2209 
wait 5 
jump @WSR_2163 

:WSR_2209
wait 5 
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 70.0 70.0 0.0 
04D3: get_nearest_car_path_coords_from 1@ 2@ 3@ type 0 store_to 4@ 5@ 6@ 
9@ = Car.Create(8@, 4@, 5@, 6@)
Car.Angle(9@) = 184.7214
Car.SetMaxSpeed(9@, 253.0)
Car.DoorStatus(9@) = 5
00AE: set_car 9@ traffic_behaviour_to 2 
Car.SetDriverBehaviour(9@, DriveToPlayer)
053F: set_car 9@ tires_vulnerability 0 
Car.Health(9@) = 5000
_A1 = Car.Health(9@)
0587: enable_car 9@ validate_position 0 
_61 = Marker.CreateAboveCar(9@)
Marker.SetColor(_61, 20@)
072F: enable_car 9@ stuck_check_distance 0.5 time 4000 and_restore_if stuck 1 flipped 1 unk_place_on_road_properly 1 to_path 7 // extended 03CC 
0190: add_car 9@ to_flipped_check // 6 max 
10@ = Actor.CreateAsDriver(Gang1, 17@, 9@)
11@ = Actor.CreateAsPassenger(Gang1, 17@, 9@, 0)
12@ = Actor.CreateAsPassenger(Gang1, 18@, 9@, 1)
13@ = Actor.CreateAsPassenger(Gang1, 19@, 9@, 2)
0209: 14@ = random_int_in_ranges 22 32 
0209: 15@ = random_int_in_ranges 22 32 
0209: 16@ = random_int_in_ranges 22 32 
Actor.GiveWeaponAndAmmo(10@, 16@, 9999)
Actor.GiveWeaponAndAmmo(11@, MP5, 9999)
Actor.GiveWeaponAndAmmo(12@, MP5, 9999)
Actor.GiveWeaponAndAmmo(13@, MP5, 9999)
Actor.WeaponAccuracy(10@) = 98
Actor.WeaponAccuracy(11@) = 98
Actor.WeaponAccuracy(12@) = 98
Actor.WeaponAccuracy(13@) = 98
$Y_THE_FOUR_DRAGONS_CASINO_2 = Marker.CreateAboveActor(10@)
Marker.SetColor($Y_THE_FOUR_DRAGONS_CASINO_2, 20@)
$Z_THE_FOUR_DRAGONS_CASINO_2 = Marker.CreateAboveActor(11@)
Marker.SetColor($Z_THE_FOUR_DRAGONS_CASINO_2, 20@)
$X_PRICKLE_PINE_LV = Marker.CreateAboveActor(12@)
Marker.SetColor($X_PRICKLE_PINE_LV, 20@)
$Y_PRICKLE_PINE_LV = Marker.CreateAboveActor(13@)
Marker.SetColor($Y_PRICKLE_PINE_LV, 20@)
0446: set_actor 10@ dismemberment_possible 0 
Actor.SetImmunities(10@, 0, 1, 1, 1, 1)
Actor.Health(10@) = 250
0446: set_actor 11@ dismemberment_possible 0 
Actor.SetImmunities(11@, 0, 1, 1, 1, 1)
Actor.Health(11@) = 250
0446: set_actor 12@ dismemberment_possible 0 
Actor.SetImmunities(12@, 0, 1, 1, 1, 1)
Actor.Health(12@) = 250
0446: set_actor 13@ dismemberment_possible 0 
Actor.SetImmunities(13@, 0, 1, 1, 1, 1)
Actor.Health(13@) = 250
0978: copy_decision_maker 65540 to _1230 
0709: set_decision_maker _1230 on_event 36 taskID 1022 respect 0.0 hate 100.0 like 0.0 dislike 0.0 in_car 1 on_foot 0 // see *.ped files 
0709: set_decision_maker _1230 on_event 37 taskID 1022 respect 0.0 hate 100.0 like 0.0 dislike 0.0 in_car 1 on_foot 0 // see *.ped files 
0709: set_decision_maker _1230 on_event 36 taskID 1024 respect 0.0 hate 50.0 like 0.0 dislike 0.0 in_car 0 on_foot 1 // see *.ped files 
060B: set_actor 10@ decision_maker_to _1230 
060B: set_actor 11@ decision_maker_to _1230 
060B: set_actor 12@ decision_maker_to _1230 
060B: set_actor 13@ decision_maker_to _1230 
077A: set_actor 11@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
077A: set_actor 12@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
077A: set_actor 13@ acquaintance 4 to_actors_pedtype 8 // see ped.dat 
077A: set_actor 11@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
077A: set_actor 12@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
077A: set_actor 13@ acquaintance 4 to_actors_pedtype 6 // see ped.dat 
077A: set_actor 11@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
077A: set_actor 12@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
077A: set_actor 13@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
wait 500 
jump @WSR_3045 
0661: NOP "========================================================================" 

:WSR_3045
wait 0 
if and
   not Actor.Dead(10@)
   not Car.Wrecked(9@)
jf @WSR_3164 
if 
   Actor.InCar(10@, 9@)
jf @WSR_3164 
if 
0202:   actor $PLAYER_ACTOR near_car 9@ radius 30.0 30.0 sphere 0 
jf @WSR_3164 
26@ += 1 
if 
  26@ > 60 
jf @WSR_3164 
26@ = 0 
wait 5000 
Car.SetDriverBehaviour(9@, FollowRoad)

:WSR_3164
26@ += 1 
if 
  26@ > 250 
jf @WSR_3204 
26@ = 0 
Car.SetDriverBehaviour(9@, DriveToPlayer)

:WSR_3204
if 
   Actor.Dead($PLAYER_ACTOR)
jf @WSR_3227 
jump @WSR_3450 

:WSR_3227
if or
   Actor.Dead(10@)
   Actor.Dead(11@)
   Actor.Dead(12@)
   Actor.Dead(13@)
   Car.Wrecked(9@)
  _A1 == 0 
  _A1 > 1000 
jf @WSR_3285 
jump @WSR_3450 

:WSR_3285
wait 0 
0AF0: _210000 = get_int_from_ini_file "CLEO\GANG_WARS_V4\WARS_SET.INI" section "MODE5" key "KEY" 
if 
  _210000 == 3 
jf @WSR_3363 
jump @WSR_3450 

:WSR_3363
wait 50 
jump @WSR_3045 
0661: NOP "========================================================================" 

:WSR_3450
Actor.RemoveReferences(10@)
Actor.RemoveReferences(11@)
Actor.RemoveReferences(12@)
Actor.RemoveReferences(13@)
Car.RemoveReferences(9@)
0A93: end_custom_thread
