Difference between revisions of "020A"

From GTAMods Wiki
Jump to navigation Jump to search
(updating page + lock names)
Line 1: Line 1:
{{OpCode
+
{{Icon|trilogy}} '''LOCK_CAR_DOORS'''
| ini        = 020A=2,%1d% %2d%
+
<hr />
| description = Sets the door lock status
+
<onlyinclude>{{#ifeq:{{{transcludesection|opcode}}}|opcode|
| p1          = Valid vehicle handle
+
'''Description'''
| p2          = Integer
+
: Sets the door lock status of the vehicle
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]]
+
'''Syntax'''
| native      = [[LOCK_CAR_DOORS]]
+
: 020A: set_car [''car handle''] door_status_to [''int'']
}}
+
'''Parameter'''
 +
: [''car handle'']
 +
:: The handle of the vehicle
 +
: [''int'']
 +
:: Lock status
 +
'''Native analog'''
 +
: [[LOCK_CAR_DOORS]]
 +
 
 
This opcode sets the door status of the vehicle. Of course, the opcode only affects vehicles with a working door.
 
This opcode sets the door status of the vehicle. Of course, the opcode only affects vehicles with a working door.
*1 - unlocked car
+
}}</onlyinclude>
*2 - locked car - properties include doors can't fall off, no one can enter but can exit but can enter car if door left wide open or fallen off
+
 
*3 - locked for the player, not locked for NPCs
+
{| {{prettytable}}
*4 - locked, the player is stuck in the car
+
! Status || Name || Description
*5 - locked when not in car, unlocks when in car
+
|-
*6 - animation will never leave door opened, always closes door
+
| 1 || CARLOCK_UNLOCKED || unlocked car
*7 - locked but doors can fall off
+
|-
 +
| 2 || CARLOCK_LOCKED || locked car - properties include doors can't fall off, no one can enter but can exit, anyone can enter if door left wide open or fallen off
 +
|-
 +
| 3 || CARLOCK_LOCKOUT_PLAYER_ONLY || locked for the player, not locked for NPCs
 +
|-
 +
| 4 || CARLOCK_LOCKED_PLAYER_INSIDE || locked, the player is stuck in the car
 +
|-
 +
| 5 || || locked when not in car, unlocks when in car
 +
|-
 +
| 6 || CARLOCK_FORCE_SHUT_DOORS || animation will never leave door opened, always closes door
 +
|-
 +
| 7 || || locked but doors can fall off
 +
|}
  
 
In GTA III, this opcode behaves exactly as opcode [[0135]].
 
In GTA III, this opcode behaves exactly as opcode [[0135]].
  
==Keywords==
+
== Keywords ==
 
set, car, vehicle, door, lock, status
 
set, car, vehicle, door, lock, status
 +
 +
[[Category:OpCodes]]

Revision as of 11:59, 4 January 2012

GTA III Vice City San Andreas LOCK_CAR_DOORS


Description

Sets the door lock status of the vehicle

Syntax

020A: set_car [car handle] door_status_to [int]

Parameter

[car handle]
The handle of the vehicle
[int]
Lock status

Native analog

LOCK_CAR_DOORS

This opcode sets the door status of the vehicle. Of course, the opcode only affects vehicles with a working door.

Status Name Description
1 CARLOCK_UNLOCKED unlocked car
2 CARLOCK_LOCKED locked car - properties include doors can't fall off, no one can enter but can exit, anyone can enter if door left wide open or fallen off
3 CARLOCK_LOCKOUT_PLAYER_ONLY locked for the player, not locked for NPCs
4 CARLOCK_LOCKED_PLAYER_INSIDE locked, the player is stuck in the car
5 locked when not in car, unlocks when in car
6 CARLOCK_FORCE_SHUT_DOORS animation will never leave door opened, always closes door
7 locked but doors can fall off

In GTA III, this opcode behaves exactly as opcode 0135.

Keywords

set, car, vehicle, door, lock, status