#1 09-11-2009 12:10

Game_RTC
Registered: 08-11-2009
Posts: 2

[HELP] Enter car as driver

Hi to evreybody , i want to make script that you can to enter to evrey car in SAMP with key H , i downloaded one script that you can to enter evrey car as Passenger but i didnt succseesed to edit ti .... somebody can help me ?

Script that i tried to edit

// 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 'PASSENG'
17@ = 0

:PASSENG_18
wait 0
if
   Player.Defined($PLAYER_CHAR)
else_jump @PASSENG_18
if and
09E7:   player $PLAYER_CHAR not_frozen
84AD:   not actor $PLAYER_ACTOR in_water
   not Actor.Driving($PLAYER_ACTOR)
80E1:   not player 0 pressed_key 4
else_jump @PASSENG_18
if
0AB0:   key_pressed 71
else_jump @PASSENG_18
077E: get_active_interior_to 0@
if
  0@ == 0
else_jump @PASSENG_18

:PASSENG_108
wait 0
5@ = -1
if
   Player.Defined($PLAYER_CHAR)
else_jump @PASSENG_108
if
0AB0:   key_pressed 71
else_jump @PASSENG_18
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 10.0 -1.0 0.0
04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset -10.0 15.0 0.0
053E: 5@ = get_random_car_with_model -1 in_rectangle_cornerA 1@ 2@ cornerB 11@ 12@
wait 50
if
   not 5@ == -1
else_jump @PASSENG_108
Car.SetMaxSpeed(5@, 0.0)
9@ = Car.Model(5@)
if and
881E:   not model 9@ boat
881F:   not model 9@ plane
else_jump @PASSENG_1070
046C: 16@ = car 5@ driver
wait 50
if
   not 16@ == -1
else_jump @PASSENG_1070
0665: get_actor 16@ model_to 18@
Actor.DestroyInstantly(16@)
wait 10
gosub @PASSENG_1141
0129: 16@ = create_actor_pedtype 7 model 18@ in_car 5@ driverseat
Actor.SetImmunities(16@, 1, 1, 1, 1, 1)
Model.Destroy(18@)
if and
847A:   not actor 16@ driving_bike
   not Actor.DrivingVehicleType(16@, #QUAD)
   not Actor.DrivingVehicleType(16@, #VORTEX)
else_jump @PASSENG_414
Car.DoorStatus(5@) = 0

:PASSENG_414
Car.SetMaxSpeed(5@, 0.0)
01EA: 10@ = car 5@ max_passengers
if
  10@ > 0
else_jump @PASSENG_1117
if
  10@ == 3
else_jump @PASSENG_512
0209: 15@ = random_int_in_ranges 1 2
05CA: AS_actor $PLAYER_ACTOR enter_car 5@ driver_seat 15@ 16000 ms
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 29
33@ = 0
jump @PASSENG_623

:PASSENG_512
if
  10@ == 2
else_jump @PASSENG_571
05CA: AS_actor $PLAYER_ACTOR enter_car 5@ driver_seat 1 16000 ms
gosub @PASSENG_1141
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 29
33@ = 0
jump @PASSENG_623

:PASSENG_571
if
  10@ == 1
else_jump @PASSENG_1117
05CA: AS_actor $PLAYER_ACTOR enter_car 5@ driver_seat 0 16000 ms
gosub @PASSENG_1141
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 29
33@ = 0

:PASSENG_623
wait 0
if
   Player.Defined($PLAYER_CHAR)
else_jump @PASSENG_1117
if
   not Car.Wrecked(5@)
else_jump @PASSENG_1065
if
  17@ == 0
else_jump @PASSENG_769
if or
  33@ > 17000
00E1:   player 0 pressed_key 15
00E1:   player 0 pressed_key 1
00E1:   player 0 pressed_key 0
else_jump @PASSENG_721
jump @PASSENG_1065

:PASSENG_721
if
   Actor.InCar($PLAYER_ACTOR, 5@)
else_jump @PASSENG_623
Car.SetMaxSpeed(5@, 100.0)
Car.SetToPsychoDriver(5@)
00AE: set_car 5@ traffic_behaviour_to 2
17@ = 1

:PASSENG_769
if
   not Actor.InCar(16@, 5@)
else_jump @PASSENG_804
05CB: AS_actor 16@ enter_car 5@ as_driver 10000 ms
wait 1000

:PASSENG_804
if or
  17@ == 1
  17@ == 2
else_jump @PASSENG_623
if
   Actor.InCar($PLAYER_ACTOR, 5@)
else_jump @PASSENG_1117
if
00E1:   player 0 pressed_key 15
else_jump @PASSENG_906
Player.CanMove($PLAYER_CHAR) = False
Car.SetMaxSpeed(5@, 0.0)
wait 750
Player.CanMove($PLAYER_CHAR) = True
0633: AS_actor $PLAYER_ACTOR exit_car
jump @PASSENG_1117

:PASSENG_906
if
  17@ == 1
else_jump @PASSENG_989
if or
00E1:   player 0 pressed_key 17
00E1:   player 0 pressed_key 4
else_jump @PASSENG_989
0713: actor $PLAYER_ACTOR driveby_actor -1 car -1 point 0.0 0.0 0.0 radius 300.0 8 0 firing_rate 100
17@ = 2

:PASSENG_989
if
00E1:   player 0 pressed_key 6
else_jump @PASSENG_1021
Car.SetMaxSpeed(5@, 0.0)
wait 750

:PASSENG_1021
if and
01C1:   car 5@ stopped
80E1:   not player 0 pressed_key 6
else_jump @PASSENG_623
Car.SetMaxSpeed(5@, 40.0)
Car.SetToPsychoDriver(5@)
jump @PASSENG_623

:PASSENG_1065
0792: disembark_instantly_actor $PLAYER_ACTOR

:PASSENG_1070
17@ = 0
Car.RemoveReferences(5@)
03F0: enable_text_draw 1
045A: draw_text_1number 350.0 40.0 GXT 'NUMBER' number 17@  // ~1~
jump @PASSENG_18

:PASSENG_1117
17@ = 0
Car.RemoveReferences(5@)
Actor.RemoveReferences(16@)
jump @PASSENG_18

:PASSENG_1141
wait 0
Model.Load(#MP5LNG)
Model.Load(18@)
if and
   Model.Available(#MP5LNG)
   Model.Available(18@)
else_jump @PASSENG_1141
01B2: give_actor $PLAYER_ACTOR weapon 29 ammo 99999 // Load the weapon model before using this
Model.Destroy(#MP5LNG)
return

Offline

Board footer

Powered by FluxBB