Quantcast

Jump to content

» «
Photo

Driveby

3 replies to this topic
Big_Mitch_Baker
  • Big_Mitch_Baker

    =┼= Angels of Death - Founder

  • Members
  • Joined: 23 Feb 2005
  • None

#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

    return 0;

  • The Yardies
  • Joined: 28 Jun 2010
  • Saint-Vincent-and-the-Grenadines

#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

  • Feroci
  • Joined: 10 Jan 2005
  • European-Union
  • Contribution Award [Mods]
    Helpfulness Awards [Mods]

#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: [email protected] = actor $PLAYER_ACTOR car
Car.SetMaxSpeed([email protected], 0.0)
Car.SetImmunities([email protected], 0, 0, 0, 0, 0)
0A30: repair_car [email protected]
Car.Health([email protected]) = 5000
Car.DoorStatus([email protected]) = 0
053F: set_car [email protected] tires_vulnerability 0
Camera.SetBehindPlayer
Camera.Restore_WithJumpCut
[email protected] = 0
wait 500
Car.LockInCurrentPosition([email protected]) = 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 [email protected] 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([email protected])
82BF:   not car [email protected] sunk
jf @DRIVBYsingle_50
if
  Actor.Driving($PLAYER_ACTOR)
jf @DRIVBYsingle_50
if
 [email protected] == 0
jf @DRIVBYsingle_30
wait 0
0A30: repair_car [email protected]
Car.Health([email protected]) = 5000
Car.LockInCurrentPosition([email protected]) = False
Car.DoorStatus([email protected]) = 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
[email protected] = 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([email protected], 0.0)
Car.DoorStatus([email protected]) = 0
0633: AS_actor $PLAYER_ACTOR exit_car
wait 1000
jump @DRIVBYsingle_50

:DRIVBYsingle_50
0501: set_player $PLAYER_CHAR driveby_mode 1
[email protected] = 0
Car.LockInCurrentPosition([email protected]) = False
Car.RemoveReferences([email protected])
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 [email protected]
if and
 $ONMISSION == 0
 [email protected] == 0
jf @DVBYACT_11
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset -100.0 50.0 0.0
04C4: store_coords_to [email protected] [email protected] [email protected] from_actor $PLAYER_ACTOR with_offset 100.0 200.0 0.0
053E: [email protected] = get_random_car_with_model -1 in_rectangle_cornerA [email protected] [email protected] cornerB [email protected] [email protected]
if
  not [email protected] == -1
jf @DVBYACT_11
0407: store_coords_to [email protected] [email protected] [email protected] from_car [email protected] with_offset 0.0 0.0 0.0
[email protected] = Car.Angle([email protected])
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
[email protected] = Car.Create(#SAVANNA, [email protected], [email protected], [email protected])
Car.Angle([email protected]) = [email protected]
Car.Health([email protected]) = 1000
053F: set_car [email protected] tires_vulnerability 0
Car.Destroy([email protected])
0129: [email protected] = create_actor_pedtype 7 model #VWMYCR in_car [email protected] driverseat
01C8: [email protected] = create_actor_pedtype 7 model #BMYDRUG in_car [email protected] passenger_seat 0
Actor.Health([email protected]) = 1000
Actor.Health([email protected]) = 1000
0446: set_actor [email protected] immune_to_headshots 0
0446: set_actor [email protected] immune_to_headshots 0
[email protected] = Marker.CreateAboveActor([email protected])
00AE: set_car [email protected] traffic_behaviour_to 2
Car.SetToPsychoDriver([email protected])
Car.SetImmunities([email protected], 1, 1, 1, 1, 1)
Model.Destroy(#VWMYCR)
Model.Destroy(#BMYDRUG)
Model.Destroy(#SAVANNA)
01B2: give_actor [email protected] weapon 29 ammo 99999 // Load the weapon model before using this
Actor.WeaponAccuracy([email protected]) = 100
0713: actor [email protected] driveby_actor $PLAYER_ACTOR car -1 point 0.0 0.0 0.0 radius 5000.0 4 1 firing_rate 40
Car.SetDriverBehaviour([email protected], KillThePlayer)
Car.SetMaxSpeed([email protected], 15.0)
[email protected] = 0
[email protected] = 0
[email protected] = 0

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

:DVBYACT_703
if
 [email protected] == 0
jf @DVBYACT_782
if or
 10000 > [email protected]
0202:   actor $PLAYER_ACTOR near_car [email protected] radius 70.0 70.0 flag 0
jf @DVBYACT_1539
Car.SetImmunities([email protected], 0, 0, 0, 0, 0)
[email protected] = 1

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

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

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

:DVBYACT_1053
if and
  not Actor.Dead([email protected])
  not Actor.Dead([email protected])
jf @DVBYACT_1140
if or
 [email protected] == 0
 [email protected] == 1
 [email protected] == 2
jf @DVBYACT_1140
if and
  Actor.InCar([email protected], [email protected])
  Actor.InCar([email protected], [email protected])
jf @DVBYACT_1140
jump @DVBYACT_521

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

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

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

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

:DVBYACT_1511
if or
  not Actor.Dead([email protected])
  not Actor.Dead([email protected])
jf @DVBYACT_1539
jump @DVBYACT_521

:DVBYACT_1539
Model.Destroy(#MP5LNG)
Marker.Disable([email protected])
Actor.RemoveReferences([email protected])
Actor.RemoveReferences([email protected])
Car.SetImmunities([email protected], 0, 0, 0, 0, 0)
Car.RemoveReferences([email protected])
jump @DVBYACT_11

Big_Mitch_Baker
  • Big_Mitch_Baker

    =┼= Angels of Death - Founder

  • Members
  • Joined: 23 Feb 2005
  • None

#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