Jump to content

car doors will not lock


ShadowCoderKing

Recommended Posts

ShadowCoderKing

can someone please help i cant get the car doors to lock i am using this code :

 

014B: $PARKED_PATRIOT = init_parked_car_generator #PATRIOT -1 -1 1 alarm 0 door_lock 1 0 10000 at 217.5684 107.1335 3.8906 angle 169.5958

 

Link to comment
Share on other sites

The opcode you use says that "door_lock" means "The chance of the car door being locked" so I think that with this opcode the car door shouldn't be ALWAYS locked (just sometimes). If you want them to be locked forever you should try with this opcode:

 

020A: set_car 0@ door_status_to 4

 

1 = unlocked

2-5 = locked

6 = unlocked, doors stay on car

7 = locked, doors can fall off

8 = locked

but before you use it create a car with this opcode:

 

0@ = Car.Create(#PATRIOT, X, Y, Z)

 

and make them to create only if a player is close to a car point for example radius is 150.0 (X,Y) - this is not necessery but that way you can save some memory. You could use this opcode for a conditional check:

 

	00EC: actor $PLAYER_ACTOR sphere 0 near_point X Y radius 150.0 150.0

 

And if a player is not in a radius of this car then destroy car with a "Car.Destroy" opcode.

Edited by JACK JONES
Link to comment
Share on other sites

Ashwin.Star

The opcode 014B: is for generating Cars,

if you want to use this way then

 

014C: set_parked_car_generator $PARKED_PATRIOT cars_to_generate_to 1

 

is necessary to use,

 

and as JJ told already you,

so just get the Handle of a car to any Variable & use 020A:

 

download Door Lock Mod request for example

Link to comment
Share on other sites

 

can someone please help i cant get the car doors to lock i am using this code :

 

014B: $PARKED_PATRIOT = init_parked_car_generator #PATRIOT -1 -1 1 alarm 0 door_lock 1 0 10000 at 217.5684 107.1335 3.8906 angle 169.5958

 

read here how to do: parkedcars and weaponpickups

scroll down where it says door_lock 0 can be a value between 0 and 100

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.