Difference between revisions of "01C8"

From GTAMods Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
{{OpCode
 
{{OpCode
| ini        = 01C8=5,%5d% %2d% %3o% %1d% %4d%
+
| ini        = 01C8=5,{{hint|%5d%|parameter 5: handle}} {{hint|%2d%|parameter 2: integer}} {{hint|%3o%|parameter 3: integer}} {{hint|%1d%|parameter 1: integer}} {{hint|%4d%|parameter 4: handle}}
 
| description = Creates a character in the passenger seat of a vehicle
 
| description = Creates a character in the passenger seat of a vehicle
 
| p1          = Existing vehicle handle
 
| p1          = Existing vehicle handle
Line 7: Line 7:
 
| p4          = Flag (seat)
 
| p4          = Flag (seat)
 
| p5          = Actor handle
 
| p5          = Actor handle
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]], [[Vice City Stories]] (0118)
+
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]], [[Liberty City Stories]] (01CD), [[Vice City Stories]] (0118)
 
| native      = [[CREATE_CHAR_AS_PASSENGER]]
 
| native      = [[CREATE_CHAR_AS_PASSENGER]]
 
}}
 
}}
Line 16: Line 16:
 
The flag is the position of the seat that the character will be created in.
 
The flag is the position of the seat that the character will be created in.
 
{| {{prettytable}}
 
{| {{prettytable}}
| -1 ||The next available seat
+
! Flag
 +
! Four-seat
 +
! Two-seat
 
|-
 
|-
|0 ||Front right seat
+
| -1 || the next available seat ||
 
|-
 
|-
|1 ||Rear left seat
+
| 0 || front right seat || rear seat
 
|-
 
|-
|2 ||Rear right seat
+
| 1 || rear left seat ||
 +
|-
 +
| 2 || rear right seat ||
 
|}
 
|}
  

Revision as of 04:24, 21 February 2011

{{{games}}}


Description
Creates a character in the passenger seat of a vehicle
Syntax
{{{syntax1}}}
Parameter
Native analog
CREATE_CHAR_AS_PASSENGER

Similar to opcode 009A, this creates a character in the passenger seat of a vehicle. Using this opcode requires an existing vehicle and opcode 0247 to load the model or else the game could crash. Characters can even be created in wrecked vehicles as long as the vehicle exists. If you create a character in a non-existent seat, the character will still be created inside the vehicle but it will be invisible. Certain actions that would normally make the character voluntarily exit the vehicle won't work but opcodes can force the character to exit the vehicle. Note that the parameters are mixed around.

Sanny Builder example:

01C8: 1@ = create_actor_pedtype 4 model #BFORI in_car 0@ passenger_seat 0

Flags

The flag is the position of the seat that the character will be created in.

Flag Four-seat Two-seat
-1 the next available seat
0 front right seat rear seat
1 rear left seat
2 rear right seat

Note

The above format is more commonly used. The actual format of this opcode is in order:
01C8=5,%1d% %2d% %3o% %4d% %5d%
The format to use depends on which INI file you use.

Keywords

create, actor, character, pedtype, model, vehicle, car, passenger