Quantcast

Jump to content

» «
Photo

car doors will not lock

3 replies to this topic
spidermight
  • spidermight

    Cleo Modder

  • Members
  • Joined: 14 Aug 2008
  • None

#1

Posted 04 April 2012 - 07:14 AM

can someone please help i cant get the car doors to lock i am using this code :
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

Jack...
  • Jack...

    Firearms and adrenaline!!!

  • Members
  • Joined: 06 Dec 2011
  • None

#2

Posted 04 April 2012 - 08:20 AM Edited by JACK JONES, 04 April 2012 - 09:02 AM.

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:
CODE
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:
CODE
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:
CODE
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.

Ashwin the new boy
  • Ashwin the new boy

    Back again...

  • Members
  • Joined: 14 Nov 2010
  • India

#3

Posted 04 April 2012 - 09:20 AM

The opcode 014B: is for generating Cars,
if you want to use this way then
CODE
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

ZAZ
  • ZAZ

    Kernlochbohrer

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

#4

Posted 04 April 2012 - 03:20 PM

QUOTE (spidermight @ Wednesday, Apr 4 2012, 07:14)
can someone please help i cant get the car doors to lock i am using this code :
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




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users