Difference between revisions of "020A"

From GTAMods Wiki
Jump to navigation Jump to search
(completed named values, my tests matched them!)
m
Line 1: Line 1:
{{Icon|trilogy}} '''LOCK_CAR_DOORS'''
+
{{OpCode
<hr />
+
| games      = {{Icon|t}}
<onlyinclude>{{#ifeq:{{{transcludesection|opcode}}}|opcode|
+
| command    = LOCK_CAR_DOORS
'''Description'''
+
| description = Sets the door lock status of the vehicle
: Sets the door lock status of the vehicle
+
| syntax1    = 020A: set_car [''car handle''] door_status_to [''int'']
'''Syntax'''
+
| p1t        = [''car handle'']
: 020A: set_car [''car handle''] door_status_to [''int'']
+
| p1d        = The handle of the vehicle
'''Parameter'''
+
| p2t        = [''int'']
: [''car handle'']
+
| p2d        = Car lock ([[#Car locks|see below]])
:: The handle of the vehicle
+
| native      = [[LOCK_CAR_DOORS]]
: [''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. In GTA III, this opcode behaves exactly as opcode [[0135]].
}}</onlyinclude>
 
  
{| class="wikitable"
+
== Car locks ==
! Status || Enum || Description
+
{|class="wikitable center-col-1"
 +
!Car lock ||[[SCM language III/VC definitions#CARLOCK|Enum]] ||Description
 
|-
 
|-
| 0 || CARLOCK_NONE ||
+
|0 ||CARLOCK_NONE ||
 
|-
 
|-
| 1 || CARLOCK_UNLOCKED || unlocked car
+
|1 ||CARLOCK_UNLOCKED ||unlocked car
 
|-
 
|-
| 2 || CARLOCK_LOCKED || locked car &ndash; 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
+
|2 ||CARLOCK_LOCKED ||locked car &ndash; 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
+
|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
+
|4 ||CARLOCK_LOCKED_PLAYER_INSIDE ||locked, the player is stuck in the car
 
|-
 
|-
| 5 || CARLOCK_LOCKED_INITIALLY || locked when not in car, unlocks when in car
+
|5 ||CARLOCK_LOCKED_INITIALLY ||locked when not in car, unlocks when in car
 
|-
 
|-
| 6 || CARLOCK_FORCE_SHUT_DOORS || animation will never leave door opened, always closes door
+
|6 ||CARLOCK_FORCE_SHUT_DOORS ||animation will never leave door opened, always closes door
 
|-
 
|-
| 7 || CARLOCK_LOCKED_BUT_CAN_BE_DAMAGED || locked but doors can fall off
+
|7 ||CARLOCK_LOCKED_BUT_CAN_BE_DAMAGED ||locked but doors can fall off
 
|}
 
|}
 
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 01:14, 12 December 2016

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]
Car lock (see below)
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. In GTA III, this opcode behaves exactly as opcode 0135.

Car locks

Car lock Enum Description
0 CARLOCK_NONE
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 CARLOCK_LOCKED_INITIALLY locked when not in car, unlocks when in car
6 CARLOCK_FORCE_SHUT_DOORS animation will never leave door opened, always closes door
7 CARLOCK_LOCKED_BUT_CAN_BE_DAMAGED locked but doors can fall off

Keywords

set, car, vehicle, door, lock, status