Jump to content

Small Edit


Yorpie

Recommended Posts

Hello everyone,

 

I'm not good at modding so thats why I made this topic, can anyone make a small edit for me? The script below makes a few mafia members chase you in an admiral. Its pretty cool but it gets anoying so can anyone put a line in the script wich will make them only appear when you have gained a six star wanted level. I can edit the guys and the car to SWAT dudes myself.

 

 

// This file was decompiled using sascm.ini published by Seemann (http://sannybuilder.com/files/SASCM.rar) on 13.10.2007

 

{$VERSION 3.1.0027}

{$CLEO .cs}

 

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

thread 'DEBT'

0@ = 1

1@ = 3

2@ = 0

3@ = 0

4@ = 0

5@ = 0

6@ = 0

7@ = 0

8@ = 0

 

:DEBT_74

wait 250

if

$ONMISSION == 0

else_jump @DEBT_74

if

0@ == 0

else_jump @DEBT_154

if

Player.Defined($PLAYER_CHAR)

else_jump @DEBT_74

077E: get_active_interior_to 11@

if

11@ == 0

else_jump @DEBT_74

 

:DEBT_154

if

0@ == 1

else_jump @DEBT_464

 

:DEBT_172

if

Player.Defined($PLAYER_CHAR)

else_jump @DEBT_450

Actor.StorePos($PLAYER_ACTOR, 25@, 26@, 23@)

0087: 21@ = 25@ // (float)

21@ -= 200.0

25@ += 200.0

0208: 21@ = random_float_in_ranges 21@ 25@

0087: 22@ = 26@ // (float)

22@ -= 200.0

26@ += 200.0

0208: 22@ = random_float_in_ranges 22@ 26@

03D3: get_route_nearest_for 21@ 22@ 23@ store_to 21@ 22@ 23@ Z_angle_to 24@

Actor.StorePos($PLAYER_ACTOR, 25@, 26@, 27@)

0509: 10@ = distance_between_XY 25@ 26@ and_XY 21@ 22@

if

1.0 > 23@

else_jump @DEBT_366

wait 0

jump @DEBT_172

 

:DEBT_366

if

50.0 > 10@

else_jump @DEBT_398

wait 0

jump @DEBT_172

 

:DEBT_398

if

00C2: sphere_onscreen 21@ 22@ 23@ radius 4.0

else_jump @DEBT_436

wait 0

jump @DEBT_172

 

:DEBT_436

0@ += 1

jump @DEBT_464

 

:DEBT_450

gosub @DEBT_3136

0@ = 0

 

:DEBT_464

if

0@ == 2

else_jump @DEBT_1411

if and

Model.Available(#ADMIRAL)

Model.Available(#VMAFF1)

Model.Available(#VMAFF2)

Model.Available(#VMAFF3)

Model.Available(#VMAFF4)

Model.Available(#MICRO_UZI)

else_jump @DEBT_1223

if

Model.Available(#AK47)

else_jump @DEBT_1188

12@ = Car.Create(#ADMIRAL, 21@, 22@, 23@)

Car.Angle(12@) = 24@

0229: set_car 12@ primary_color_to 0 secondary_color_to 17

Car.Health(12@) = 1500

00AE: set_car 12@ traffic_behaviour_to 2

072F: enable_car 12@ stuck_check_distance 4.0 time 4000 and_restore_if stuck 1 flipped 1 unknown 1 to_path -1 // extended 03CC

if

2@ == 1

else_jump @DEBT_635

Model.Destroy(#ADMIRAL)

2@ = 0

 

:DEBT_635

0129: 13@ = create_actor_pedtype 24 model #VMAFF1 in_car 12@ driverseat

29@ = Marker.CreateAboveActor(13@)

if

3@ == 1

else_jump @DEBT_684

Model.Destroy(#VMAFF1)

3@ = 0

 

:DEBT_684

if

1@ > 0

else_jump @DEBT_904

062F: 17@ = create_group_type 0

0630: put_actor 13@ in_group 17@ as_leader

07E6: copy_group_decision_maker -1 to 18@

0749: reset_group_decision_maker 18@ event 41

06AD: set_group 17@ group_decision_maker_to 18@

01C8: 14@ = create_actor_pedtype 24 model #VMAFF2 in_car 12@ passenger_seat 0

if

4@ == 1

else_jump @DEBT_782

Model.Destroy(#VMAFF2)

4@ = 0

 

:DEBT_782

if

1@ > 1

else_jump @DEBT_843

01C8: 15@ = create_actor_pedtype 24 model #VMAFF3 in_car 12@ passenger_seat 1

if

5@ == 1

else_jump @DEBT_843

Model.Destroy(#VMAFF3)

5@ = 0

 

:DEBT_843

if

1@ > 2

else_jump @DEBT_904

01C8: 16@ = create_actor_pedtype 24 model #VMAFF4 in_car 12@ passenger_seat 2

if

6@ == 1

else_jump @DEBT_904

Model.Destroy(#VMAFF4)

6@ = 0

 

:DEBT_904

07E5: copy_decision_maker -1 to 19@

0708: reset_decision_maker 19@ event 41

30@ = 0

 

:DEBT_925

if

4 > 30@

else_jump @DEBT_1114

if

not Actor.Dead(13@(30@,4i))

else_jump @DEBT_1100

060B: set_actor 13@(30@,4i) decision_maker_to 19@

02A9: set_actor 13@(30@,4i) immune_to_nonplayer 1

077A: set_actor 13@(30@,4i) acquaintance 4 to_actors_pedtype 0 // see ped.dat

03FE: set_actor 13@(30@,4i) money 10000

0961: unknown_actor 13@(30@,4i) flag 1

if or

30@ == 0

30@ == 2

else_jump @DEBT_1061

01B2: give_actor 13@(30@,4i) weapon 28 ammo 9999 // Load the weapon model before using this

 

:DEBT_1061

if or

30@ == 1

30@ == 3

else_jump @DEBT_1100

01B2: give_actor 13@(30@,4i) weapon 30 ammo 9999 // Load the weapon model before using this

 

:DEBT_1100

30@ += 1

jump @DEBT_925

 

:DEBT_1114

if

7@ == 1

else_jump @DEBT_1144

Model.Destroy(#MICRO_UZI)

7@ = 0

 

:DEBT_1144

if

8@ == 1

else_jump @DEBT_1174

Model.Destroy(#AK47)

8@ = 0

 

:DEBT_1174

0@ += 1

jump @DEBT_1216

 

:DEBT_1188

if

not Model.Available(#AK47)

else_jump @DEBT_1216

Model.Load(#AK47)

8@ = 1

 

:DEBT_1216

jump @DEBT_1411

 

:DEBT_1223

if

not Model.Available(#ADMIRAL)

else_jump @DEBT_1251

Model.Load(#ADMIRAL)

2@ = 1

 

:DEBT_1251

if

not Model.Available(#VMAFF1)

else_jump @DEBT_1277

Model.Load(#VMAFF1)

3@ = 1

 

:DEBT_1277

if

not Model.Available(#VMAFF2)

else_jump @DEBT_1303

Model.Load(#VMAFF2)

4@ = 1

 

:DEBT_1303

if

not Model.Available(#VMAFF3)

else_jump @DEBT_1329

Model.Load(#VMAFF3)

5@ = 1

 

:DEBT_1329

if

not Model.Available(#VMAFF4)

else_jump @DEBT_1355

Model.Load(#VMAFF4)

6@ = 1

 

:DEBT_1355

if

not Model.Available(#MICRO_UZI)

else_jump @DEBT_1383

Model.Load(#MICRO_UZI)

7@ = 1

 

:DEBT_1383

if

not Model.Available(#AK47)

else_jump @DEBT_1411

Model.Load(#AK47)

8@ = 1

 

:DEBT_1411

if

0@ == 3

else_jump @DEBT_3113

if

$ONMISSION == 0

else_jump @DEBT_3054

if

Player.Defined($PLAYER_CHAR)

else_jump @DEBT_3033

077E: get_active_interior_to 11@

if

11@ == 0

else_jump @DEBT_2991

if

not Actor.Dead(13@)

else_jump @DEBT_2578

if

00F2: actor $PLAYER_ACTOR near_actor 13@ radius 500.0 500.0 0

else_jump @DEBT_2557

if

0449: actor 13@ in_a_car

else_jump @DEBT_2117

if

not Car.Wrecked(12@)

else_jump @DEBT_2105

if

Actor.Driving($PLAYER_ACTOR)

else_jump @DEBT_1757

0209: 11@ = random_int_in_ranges 0 4

03C0: 9@ = actor $PLAYER_ACTOR car

if

11@ == 0

else_jump @DEBT_1636

06E1: AS_actor 13@ using_car 12@ target_car 9@ with_order 15 max_speed 100.0 traffic_flag 2

 

:DEBT_1636

if

11@ == 1

else_jump @DEBT_1674

06E1: AS_actor 13@ using_car 12@ target_car 9@ with_order 19 max_speed 100.0 traffic_flag 2

 

:DEBT_1674

if

11@ == 2

else_jump @DEBT_1712

06E1: AS_actor 13@ using_car 12@ target_car 9@ with_order 29 max_speed 100.0 traffic_flag 2

 

:DEBT_1712

if

11@ == 3

else_jump @DEBT_1750

06E1: AS_actor 13@ using_car 12@ target_car 9@ with_order 30 max_speed 100.0 traffic_flag 2

 

:DEBT_1750

jump @DEBT_1776

 

:DEBT_1757

06E1: AS_actor 13@ using_car 12@ target_car -1 with_order 2 max_speed 100.0 traffic_flag 2

 

:DEBT_1776

06AC: 10@ = actor $PLAYER_ACTOR movement_speed

if or

044B: actor $PLAYER_ACTOR on_foot

5.0 > 10@

else_jump @DEBT_1985

if

00F2: actor 13@ near_actor $PLAYER_ACTOR radius 15.0 15.0 0

else_jump @DEBT_1985

062E: unknown_get_actor 13@ task 1560 status_store_to 28@ // ret 7 if not found

if

04A4: 28@ == 7 // @ == any

else_jump @DEBT_1985

0615: define_AS_pack_begin 20@

0209: 11@ = random_int_in_ranges 0 2

if

11@ == 0

else_jump @DEBT_1933

06C7: AS_actor -1 driver_of_car 12@ perform_action 7 timelimit 200

06C7: AS_actor -1 driver_of_car 12@ perform_action 4 timelimit 1000

jump @DEBT_1957

 

:DEBT_1933

06C7: AS_actor -1 driver_of_car 12@ perform_action 8 timelimit 200

06C7: AS_actor -1 driver_of_car 12@ perform_action 5 timelimit 1000

 

:DEBT_1957

07A5: AS_actor -1 attack_actor $PLAYER_ACTOR 5000 ms

0616: define_AS_pack_end 20@

0618: assign_actor 13@ to_AS_pack 20@

061B: remove_references_to_AS_pack 20@

 

:DEBT_1985

if and

03CE: car 12@ stuck

15.0 > 10@

else_jump @DEBT_2098

if

0202: actor $PLAYER_ACTOR near_car 12@ radius 30.0 30.0 flag 0

else_jump @DEBT_2098

if

02CA: car 12@ bounding_sphere_visible

else_jump @DEBT_2098

062E: unknown_get_actor 13@ task 1957 status_store_to 28@ // ret 7 if not found

if

04A4: 28@ == 7 // @ == any

else_jump @DEBT_2098

07A5: AS_actor 13@ attack_actor $PLAYER_ACTOR 5000 ms

 

:DEBT_2098

jump @DEBT_2110

 

:DEBT_2105

Car.RemoveReferences(12@)

 

:DEBT_2110

jump @DEBT_2550

 

:DEBT_2117

if

00F2: actor 13@ near_actor $PLAYER_ACTOR radius 30.0 30.0 0

else_jump @DEBT_2195

062E: unknown_get_actor 13@ task 1957 status_store_to 28@ // ret 7 if not found

if

04A4: 28@ == 7 // @ == any

else_jump @DEBT_2188

07A5: AS_actor 13@ attack_actor $PLAYER_ACTOR 5000 ms

 

:DEBT_2188

jump @DEBT_2550

 

:DEBT_2195

if

not Car.Wrecked(12@)

else_jump @DEBT_2296

062E: unknown_get_actor 13@ task 1560 status_store_to 28@ // ret 7 if not found

if

04A4: 28@ == 7 // @ == any

else_jump @DEBT_2289

0615: define_AS_pack_begin 20@

0772: AS_actor -1 run_to_car 12@ 99999 ms stop_at_distance 5.0

05CB: AS_actor -1 enter_car 12@ as_driver -2 ms

0616: define_AS_pack_end 20@

0618: assign_actor 13@ to_AS_pack 20@

061B: remove_references_to_AS_pack 20@

 

:DEBT_2289

jump @DEBT_2550

 

:DEBT_2296

Car.RemoveReferences(12@)

if

80F2: not actor $PLAYER_ACTOR near_actor 13@ radius 60.0 60.0 0

else_jump @DEBT_2510

Actor.StorePos(13@, 21@, 22@, 23@)

03D3: get_route_nearest_for 21@ 22@ 23@ store_to 21@ 22@ 23@ Z_angle_to 24@

if

838A: not any_car_in_cube_cornerA 21@ 22@ 23@ cornerB 4.0 4.0 4.0

else_jump @DEBT_2503

if

80C2: not sphere_onscreen 21@ 22@ 23@ radius 4.0

else_jump @DEBT_2503

12@ = Car.Create(#ADMIRAL, 21@, 22@, 23@)

Car.Angle(12@) = 24@

0229: set_car 12@ primary_color_to 75 secondary_color_to 0

Car.Health(12@) = 1500

00AE: set_car 12@ traffic_behaviour_to 2

072F: enable_car 12@ stuck_check_distance 4.0 time 4000 and_restore_if stuck 1 flipped 1 unknown 1 to_path -1 // extended 03CC

 

:DEBT_2503

jump @DEBT_2550

 

:DEBT_2510

062E: unknown_get_actor 13@ task 1957 status_store_to 28@ // ret 7 if not found

if

04A4: 28@ == 7 // @ == any

else_jump @DEBT_2550

07A5: AS_actor 13@ attack_actor $PLAYER_ACTOR 5000 ms

 

:DEBT_2550

jump @DEBT_2571

 

:DEBT_2557

gosub @DEBT_3136

0@ = 0

 

:DEBT_2571

jump @DEBT_2743

 

:DEBT_2578

Actor.RemoveReferences(13@)

30@ = 1

 

:DEBT_2590

if

4 > 30@

else_jump @DEBT_2743

if

not Actor.Dead(13@(30@,4i))

else_jump @DEBT_2720

if

07FD: group 17@ alive

else_jump @DEBT_2713

if

06EE: actor 13@(30@,4i) in_group 17@

else_jump @DEBT_2713

if

06EF: actor 13@(30@,4i) leading_group 17@

else_jump @DEBT_2713

0085: 13@ = 13@(30@,4i) // (int)

13@(30@,4i) = -1

 

:DEBT_2713

jump @DEBT_2729

 

:DEBT_2720

Actor.RemoveReferences(13@(30@,4i))

 

:DEBT_2729

30@ += 1

jump @DEBT_2590

 

:DEBT_2743

30@ = 1

 

:DEBT_2750

if

4 > 30@

else_jump @DEBT_2984

if

not Actor.Dead(13@)

else_jump @DEBT_2970

if

not Actor.Dead(13@(30@,4i))

else_jump @DEBT_2961

if

07FD: group 17@ alive

else_jump @DEBT_2954

if

86EE: not actor 13@(30@,4i) in_group 17@

else_jump @DEBT_2954

if

00F2: actor 13@(30@,4i) near_actor 13@ radius 30.0 30.0 0

else_jump @DEBT_2897

0631: put_actor 13@(30@,4i) in_group 17@

jump @DEBT_2954

 

:DEBT_2897

062E: unknown_get_actor 13@(30@,4i) task 1957 status_store_to 28@ // ret 7 if not found

if

04A4: 28@ == 7 // @ == any

else_jump @DEBT_2954

Actor.RemoveReferences(13@(30@,4i))

07A5: AS_actor 13@(30@,4i) attack_actor $PLAYER_ACTOR 5000 ms

 

:DEBT_2954

jump @DEBT_2970

 

:DEBT_2961

Actor.RemoveReferences(13@(30@,4i))

 

:DEBT_2970

30@ += 1

jump @DEBT_2750

 

:DEBT_2984

jump @DEBT_3005

 

:DEBT_2991

gosub @DEBT_3136

0@ = 1

 

:DEBT_3005

jump @DEBT_3026

gosub @DEBT_3136

jump @DEBT_74

 

:DEBT_3026

jump @DEBT_3047

 

:DEBT_3033

gosub @DEBT_3136

0@ = 1

 

:DEBT_3047

jump @DEBT_3068

 

:DEBT_3054

gosub @DEBT_3136

0@ = 1

 

:DEBT_3068

if and

Actor.Dead(13@)

Actor.Dead(14@)

Actor.Dead(15@)

Actor.Dead(16@)

else_jump @DEBT_3113

gosub @DEBT_3136

0@ = 1

 

:DEBT_3113

jump @DEBT_74

if

82CA: not car 12@ bounding_sphere_visible

else_jump @DEBT_3136

 

:DEBT_3136

Marker.Disable(29@)

Actor.RemoveReferences(13@)

Actor.RemoveReferences(14@)

Actor.RemoveReferences(15@)

Actor.RemoveReferences(16@)

Car.RemoveReferences(12@)

065C: release_decision_maker 19@

065C: release_decision_maker 18@

0632: release_group 17@

if

2@ == 1

else_jump @DEBT_3211

Model.Destroy(#ADMIRAL)

2@ = 0

 

:DEBT_3211

if

3@ == 1

else_jump @DEBT_3240

Model.Destroy(#VMAFF1)

3@ = 0

 

:DEBT_3240

if

4@ == 1

else_jump @DEBT_3269

Model.Destroy(#VMAFF2)

4@ = 0

 

:DEBT_3269

if

5@ == 1

else_jump @DEBT_3298

Model.Destroy(#VMAFF3)

5@ = 0

 

:DEBT_3298

if

6@ == 1

else_jump @DEBT_3327

Model.Destroy(#VMAFF4)

6@ = 0

 

:DEBT_3327

if

7@ == 1

else_jump @DEBT_3357

Model.Destroy(#MICRO_UZI)

7@ = 0

 

:DEBT_3357

if

8@ == 1

else_jump @DEBT_3387

Model.Destroy(#AK47)

8@ = 0

 

:DEBT_3387

return

 

------------------------------------------------------------------------------

Thats the script, I hope someone can help me

Link to comment
Share on other sites

Dude use the "code" feature when posting code, also.. what the hell is with all those random checks, and floats?

 

I've re-written the code to be less confusing and still have the same effect. Sorry if i removed some crucial part...also ive not tested

 

 

{$CLEO}0000:model.Load(#ADMIRAL)model.Load(#VMAFF1)model.Load(#VMAFF2)model.Load(#VMAFF3)model.Load(#VMAFF4)model.Load(#MICRO_UZI)model.Load(#AK47)038B: load_requested_models                        :1wait 0if0256:   player $PLAYER_CHAR defined jf @101C0: 1@ = player $PLAYER_CHAR wanted_level :2wait 0if 1@ == 6jf @104C4: store_coords_to 2@ 3@ 4@ from_actor $PLAYER_ACTOR with_offset 200.0 200.0 1.0 $mobcar = Car.Create(#ADMIRAL, 2@, 3@, 4@)0229: set_car $mobcar primary_color_to 0 secondary_color_to 17 Car.Health($mobcar) = 15000129: $mob1 = create_actor_pedtype 24 model #VMAFF1 in_car $mobcar driverseat01C8: $mob2 = create_actor_pedtype 24 model #VMAFF2 in_car $mobcar passenger_seat 0 01C8: $mob3 = create_actor_pedtype 24 model #VMAFF3 in_car $mob3 passenger_seat 1 01C8: $mob4 = create_actor_pedtype 24 model #VMAFF4 in_car $mob4 passenger_seat 2 01B2: give_actor $mob1 weapon 28 ammo 10000 // Load the weapon model before using this 01B2: give_actor $mob2 weapon 30 ammo 10000 // Load the weapon model before using this 01B2: give_actor $mob3 weapon 28 ammo 10000 // Load the weapon model before using this 01B2: give_actor $mob4 weapon 30 ammo 10000 // Load the weapon model before using this04C4: store_coords_to 2@ 3@ 4@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0  05D1: AS_actor $mob1 drive_car $mobcar to 1@ 2@ 3@ speed 50.0 0 model #NULL 0:2checkwait 0if00F4:   actor $mob1 near_actor $PLAYER_ACTOR radius 20.0 20.0 0 in_carjf @2check    05E2: AS_actor $mob1 kill_actor $PLAYER_ACTOR 05E2: AS_actor $mob2 kill_actor $PLAYER_ACTOR 05E2: AS_actor $mob3 kill_actor $PLAYER_ACTOR  05E2: AS_actor $mob4 kill_actor $PLAYER_ACTOR:301C0: 5@ = player $PLAYER_CHAR wanted_level wait 0if or 8118:   not actor $PLAYER_ACTOR dead5@ > 5jf @4jump @5:401C2: remove_references_to_actor $mob1 // Like turning an actor into a random pedestrian 01C2: remove_references_to_actor $mob2 // Like turning an actor into a random pedestrian 01C2: remove_references_to_actor $mob3 // Like turning an actor into a random pedestrian 01C2: remove_references_to_actor $mob4 // Like turning an actor into a random pedestrian 01C3: remove_references_to_car $mobcar // Like turning a car into any random car jump @1:5wait 0if and0118:   actor $mob1 dead0118:   actor $mob2 dead0118:   actor $mob3 dead0118:   actor $mob4 deadjf @3jump @4

 

Link to comment
Share on other sites

 

also.. what the hell is with all those random checks, and floats?

 

Those are from the original script: //-------------External script 76 (DEBT)---------------

 

 

Link to comment
Share on other sites

also.. what the hell is with all those random checks, and floats?

 

Those are from the original script: //-------------External script 76 (DEBT)---------------

Oh okay icon14.gif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.