Quantcast

Jump to content

» «
Photo

Driveby

3 replies to this topic
Big_Mitch_Baker
  • Big_Mitch_Baker

    == Angels of Death - Founder

  • Angels of Death MC
  • Joined: 23 Feb 2005

#1

Posted 28 September 2010 - 05:17 AM Edited by Big_Mitch_Baker, 28 September 2010 - 05:21 AM.

can anyone give me an example of how to make a ped perform a driveby?

I've tried using:
CODE
05E2: AS_actor $420 kill_actor $PLAYER_ACTOR

but this causes the ped to get out of the car and fire.

I also tried:
CODE
0713: actor $420 driveby_actor $PLAYER_ACTOR car -1 point 1950.81 -1452.86 10.55 radius 200.0 4 1 firing_rate 90

however the actor doesn't actually respond to it (yes, even in the radius) mad.gif

I'm sure it's probably something simple I'm missing whatsthat.gif
any help would be appreciated, thanks icon14.gif

(No cleo plz)

BnB
  • BnB

    #OGAY_2014

  • The Yardies
  • Joined: 28 Jun 2010
  • Greece

#2

Posted 28 September 2010 - 12:44 PM

I think using 0713 you have to use the coords.
Store actor position and drive by at ...

ZAZ
  • ZAZ

    Kernlochbohrer

  • Members
  • Joined: 10 Jan 2005
  • European-Union

#3

Posted 28 September 2010 - 03:38 PM

QUOTE (Big_Mitch_Baker @ Sep 28 2010, 05:17)
can anyone give me an example of how to make a ped perform a driveby?

I've tried using:
CODE
05E2: AS_actor $420 kill_actor $PLAYER_ACTOR

but this causes the ped to get out of the car and fire.

I also tried:
CODE
0713: actor $420 driveby_actor $PLAYER_ACTOR car -1 point 1950.81 -1452.86 10.55 radius 200.0 4 1 firing_rate 90

however the actor doesn't actually respond to it (yes, even in the radius) mad.gif

I'm sure it's probably something simple I'm missing whatsthat.gif
any help would be appreciated, thanks icon14.gif

(No cleo plz)

2 scripts, first one to let player drive a car and do driveby at same time
the other one creates a car and two gangster, doing driveby against player

press backspace while in car to start driveby
CODE
{$CLEO .cs}
:DRIVEBYsingle_01
thread 'DVBY'

:DRIVBYsingle_3
wait 0
if
  Player.Defined($PLAYER_CHAR)
jf @DRIVBYsingle_3
if and
84A7:   not actor $PLAYER_ACTOR driving_boat
84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle
  Actor.Driving($PLAYER_ACTOR)
0AB0:   key_pressed 8//--- Backspace
jf @DRIVBYsingle_3
jump @DRIVBYsingle_7

:DRIVBYsingle_7
Player.CanMove($PLAYER_CHAR) = False
03BF: set_player $PLAYER_CHAR ignored_by_everyone 1
03C0: 5@ = actor $PLAYER_ACTOR car
Car.SetMaxSpeed(5@, 0.0)
Car.SetImmunities(5@, 0, 0, 0, 0, 0)
0A30: repair_car 5@
Car.Health(5@) = 5000
Car.DoorStatus(5@) = 0
053F: set_car 5@ tires_vulnerability 0
Camera.SetBehindPlayer
Camera.Restore_WithJumpCut
1@ = 0
wait 500
Car.LockInCurrentPosition(5@) = True
Model.Load(#TEC9)

:DRIVBYsingle_13
wait 0
if
  Model.Available(#TEC9)
jf @DRIVBYsingle_13
0633: AS_actor $PLAYER_ACTOR exit_car
wait 2000
01B2: give_actor $PLAYER_ACTOR weapon 32 ammo 99999 // Load the weapon model before using this
wait 250
05CB: AS_actor $PLAYER_ACTOR enter_car 5@ as_driver 0 ms
Model.Destroy(#TEC9)
03BF: set_player $PLAYER_CHAR ignored_by_everyone 0
wait 250
Player.CanMove($PLAYER_CHAR) = True

:DRIVBYsingle_20
wait 50
if
  Player.Defined($PLAYER_CHAR)
jf @DRIVBYsingle_50
if and
  not Car.Wrecked(5@)
82BF:   not car 5@ sunk
jf @DRIVBYsingle_50
if
  Actor.Driving($PLAYER_ACTOR)
jf @DRIVBYsingle_50
if
 1@ == 0
jf @DRIVBYsingle_30
wait 0
0A30: repair_car 5@
Car.Health(5@) = 5000
Car.LockInCurrentPosition(5@) = False
Car.DoorStatus(5@) = 4
wait 1000
0713: actor $PLAYER_ACTOR driveby_actor -1 car -1 point 0.0 0.0 0.0 radius 300.0 8 0 firing_rate 100
1@ = 1
wait 1000
jump @DRIVBYsingle_20

:DRIVBYsingle_30
if or
00E1:   player 0 pressed_key 15
0AB0:   key_pressed 53
jf @DRIVBYsingle_20
Car.SetMaxSpeed(5@, 0.0)
Car.DoorStatus(5@) = 0
0633: AS_actor $PLAYER_ACTOR exit_car
wait 1000
jump @DRIVBYsingle_50

:DRIVBYsingle_50
0501: set_player $PLAYER_CHAR driveby_mode 1
1@ = 0
Car.LockInCurrentPosition(5@) = False
Car.RemoveReferences(5@)
jump @DRIVBYsingle_3


go to street and wait a moment till car with actors arrive
CODE
{$CLEO .cs}
:DriveBY_actor
thread 'DVBYACT'

:DVBYACT_11
wait 0
if
  Player.Defined($PLAYER_CHAR)
jf @DVBYACT_11
if
84A9:   not actor $PLAYER_ACTOR driving_heli
84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle
84A7:   not actor $PLAYER_ACTOR driving_boat
89AE:   not actor $PLAYER_ACTOR driving_train
jf @DVBYACT_11
077E: get_active_interior_to 20@
if and
 $ONMISSION == 0
 20@ == 0
jf @DVBYACT_11
04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset -100.0 50.0 0.0
04C4: store_coords_to 14@ 15@ 16@ from_actor $PLAYER_ACTOR with_offset 100.0 200.0 0.0
053E: 0@ = get_random_car_with_model -1 in_rectangle_cornerA 11@ 12@ cornerB 14@ 15@
if
  not 0@ == -1
jf @DVBYACT_11
0407: store_coords_to 1@ 2@ 3@ from_car 0@ with_offset 0.0 0.0 0.0
4@ = Car.Angle(0@)
Model.Load(#VWMYCR)
Model.Load(#BMYDRUG)
Model.Load(#SAVANNA)
Model.Load(#MP5LNG)

:DVBYACT_243
wait 0
if and
  Model.Available(#VWMYCR)
  Model.Available(#BMYDRUG)
  Model.Available(#SAVANNA)
  Model.Available(#MP5LNG)
jf @DVBYACT_243
5@ = Car.Create(#SAVANNA, 1@, 2@, 3@)
Car.Angle(5@) = 4@
Car.Health(5@) = 1000
053F: set_car 5@ tires_vulnerability 0
Car.Destroy(0@)
0129: 7@ = create_actor_pedtype 7 model #VWMYCR in_car 5@ driverseat
01C8: 8@ = create_actor_pedtype 7 model #BMYDRUG in_car 5@ passenger_seat 0
Actor.Health(7@) = 1000
Actor.Health(8@) = 1000
0446: set_actor 7@ immune_to_headshots 0
0446: set_actor 8@ immune_to_headshots 0
9@ = Marker.CreateAboveActor(7@)
00AE: set_car 5@ traffic_behaviour_to 2
Car.SetToPsychoDriver(5@)
Car.SetImmunities(5@, 1, 1, 1, 1, 1)
Model.Destroy(#VWMYCR)
Model.Destroy(#BMYDRUG)
Model.Destroy(#SAVANNA)
01B2: give_actor 8@ weapon 29 ammo 99999 // Load the weapon model before using this
Actor.WeaponAccuracy(8@) = 100
0713: actor 8@ driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 5000.0 4 1 firing_rate 40
Car.SetDriverBehaviour(5@, KillThePlayer)
Car.SetMaxSpeed(5@, 15.0)
33@ = 0
29@ = 0
28@ = 0

:DVBYACT_521
wait 0
if
  Player.Defined($PLAYER_CHAR)
jf @DVBYACT_1539
077E: get_active_interior_to 20@
if and
 20@ == 0
 $ONMISSION == 0
  not Car.Wrecked(5@)
81F4:   not car 5@ flipped
jf @DVBYACT_1539
if or
 29@ == 0
 29@ == 1
 29@ == 2
jf @DVBYACT_1053
jump @DVBYACT_703
if
03CE:   car 5@ stuck
jf @DVBYACT_703
if or
 29@ == 0
 29@ == 1
jf @DVBYACT_703
06C7: AS_actor 7@ driver_of_car 5@ perform_action 14 timelimit 500
wait 500
Car.SetDriverBehaviour(5@, KillThePlayer)
Car.SetMaxSpeed(5@, 50.0)
29@ = 2

:DVBYACT_703
if
 29@ == 0
jf @DVBYACT_782
if or
 10000 > 33@
0202:   actor $PLAYER_ACTOR near_car 5@ radius 70.0 70.0 flag 0
jf @DVBYACT_1539
Car.SetImmunities(5@, 0, 0, 0, 0, 0)
29@ = 1

:DVBYACT_782
if
0202:   actor $PLAYER_ACTOR near_car 5@ radius 15.0 15.0 flag 0
jf @DVBYACT_878
if or
 29@ == 0
 29@ == 1
jf @DVBYACT_1053
if
  not Actor.Driving($PLAYER_ACTOR)
jf @DVBYACT_1053
Car.SetMaxSpeed(5@, 0.0)
29@ = 2
jump @DVBYACT_1053

:DVBYACT_878
if
0202:   actor $PLAYER_ACTOR near_car 5@ radius 17.0 17.0 flag 0
jf @DVBYACT_965
if or
 29@ == 0
 29@ == 2
jf @DVBYACT_1053
Car.SetDriverBehaviour(5@, KillThePlayer)
Car.SetMaxSpeed(5@, 50.0)
29@ = 1
jump @DVBYACT_1053

:DVBYACT_965
if or
 29@ == 1
 29@ == 2
jf @DVBYACT_1053
if or
 10000 > 33@
0202:   actor $PLAYER_ACTOR near_car 5@ radius 50.0 50.0 flag 0
jf @DVBYACT_1539
Car.SetDriverBehaviour(5@, KillThePlayer)
Car.SetMaxSpeed(5@, 50.0)
29@ = 0

:DVBYACT_1053
if and
  not Actor.Dead(7@)
  not Actor.Dead(8@)
jf @DVBYACT_1140
if or
 29@ == 0
 29@ == 1
 29@ == 2
jf @DVBYACT_1140
if and
  Actor.InCar(7@, 5@)
  Actor.InCar(8@, 5@)
jf @DVBYACT_1140
jump @DVBYACT_521

:DVBYACT_1140
if
  not Actor.Dead(7@)
jf @DVBYACT_1335
wait 250
if
  Actor.InCar(7@, 5@)
jf @DVBYACT_1200
Car.SetMaxSpeed(5@, 0.0)
0633: AS_actor 7@ exit_car
wait 1000

:DVBYACT_1200
if or
 29@ == 0
 29@ == 1
 29@ == 2
 29@ == 4
jf @DVBYACT_1335
if or
 28@ == 0
 28@ == 2
jf @DVBYACT_1335
if
  not Actor.Dead(7@)
jf @DVBYACT_1335
01B2: give_actor 7@ weapon 29 ammo 99999 // Load the weapon model before using this
Actor.WeaponAccuracy(7@) = 50
05E2: AS_actor 7@ kill_actor $PLAYER_ACTOR
0446: set_actor 7@ immune_to_headshots 1
29@ = 3
28@ += 1
jump @DVBYACT_521

:DVBYACT_1335
if
  not Actor.Dead(8@)
jf @DVBYACT_1511
wait 250
if
  Actor.InCar(8@, 5@)
jf @DVBYACT_1395
Car.SetMaxSpeed(5@, 0.0)
0633: AS_actor 8@ exit_car
wait 1000

:DVBYACT_1395
if or
 29@ == 0
 29@ == 1
 29@ == 2
 29@ == 3
jf @DVBYACT_1511
if or
 28@ == 0
 28@ == 1
jf @DVBYACT_1511
if
  not Actor.Dead(8@)
jf @DVBYACT_1511
05E2: AS_actor 8@ kill_actor $PLAYER_ACTOR
0446: set_actor 8@ immune_to_headshots 1
29@ = 4
28@ += 1
jump @DVBYACT_521

:DVBYACT_1511
if or
  not Actor.Dead(7@)
  not Actor.Dead(8@)
jf @DVBYACT_1539
jump @DVBYACT_521

:DVBYACT_1539
Model.Destroy(#MP5LNG)
Marker.Disable(9@)
Actor.RemoveReferences(7@)
Actor.RemoveReferences(8@)
Car.SetImmunities(5@, 0, 0, 0, 0, 0)
Car.RemoveReferences(5@)
jump @DVBYACT_11

Big_Mitch_Baker
  • Big_Mitch_Baker

    == Angels of Death - Founder

  • Angels of Death MC
  • Joined: 23 Feb 2005

#4

Posted 02 October 2010 - 12:07 PM

Thank you good sir, that worked perfectly smile.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users