Difference between revisions of "01C8"

From GTAMods Wiki
Jump to navigation Jump to search
(updating page)
Line 1: Line 1:
{{OpCode
+
{{Icon|trilogy}} '''CREATE_CHAR_AS_PASSENGER'''
| 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}}
+
<hr />
| description = Creates a character in the passenger seat of a vehicle
+
<onlyinclude>{{#ifeq:{{{transcludesection|opcode}}}|opcode|
| p1          = Existing vehicle handle
+
'''Description'''
| p2          = [[Ped type]]
+
: Creates a character in the passenger seat of a vehicle
| p3          = Valid ped [[DFF]] model name or ID number as defined in the [[IDE#PEDS|IDE]] file
+
'''Syntax'''
| p4          = Flag (seat)
+
: 01C8: [''var''] = create_actor [''int1''] [''int2''] in_car [''car handle''] passenger_seat [''int3'']
| p5          = Actor handle
+
'''Parameter'''
| game        = [[GTA 3]], [[Vice City]], [[San Andreas]], [[Liberty City Stories]] (01CD), [[Vice City Stories]] (0118)
+
: [''var'']
| native      = [[CREATE_CHAR_AS_PASSENGER]]
+
:: Variable to store the handle of the character
}}
+
: [''int1'']
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.
+
:: [[Ped type]]
[[Sanny Builder]] example:<source lang="scm">01C8: 1@ = create_actor_pedtype 4 model #BFORI in_car 0@ passenger_seat 0</source>
+
: [''int2'']
 +
:: Valid character model ID number as defined in the [[PEDS|PEDS section]] of the [[IDE]] file; also acceptable is model's [[DFF]] name with a hash character
 +
: [''car handle'']
 +
:: The handle of the vehicle
 +
: [''int3'']
 +
:: [[01C8#Seat position|Seat position]]
 +
'''Native analog'''
 +
: [[CREATE_CHAR_AS_PASSENGER]]
  
==Flags==
+
Similar to opcode [[009A]], this opcode creates a character in the passenger seat of a vehicle. Using this opcode requires an existing vehicle and opcode [[0247]] to load the model of the character or else the game could crash. Characters can even be created in wrecked vehicles as long as the vehicle exists. Without further additions, if the player enters the vehicle with the character, the character will exit the vehicle. Additional opcodes like [[0526]] are needed to prevent them from doing that.
 +
 
 +
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.
 +
}}</onlyinclude>
 +
 
 +
== Seat position ==
 
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}}
Line 20: Line 32:
 
! Two-seat
 
! Two-seat
 
|-
 
|-
| -1 || the next available seat ||
+
| -1 || colspan="2" style="text-align:center" | the next available seat
 
|-
 
|-
 
| 0 || front right seat || rear seat
 
| 0 || front right seat || rear seat
Line 29: Line 41:
 
|}
 
|}
  
==Note==
+
== Keywords ==
The above format is more commonly used. The actual format of this opcode is in order:<br>
+
create, actor, character, pedtype, model, vehicle, car, passenger
<code>01C8=5,%1d% %2d% %3o% %4d% %5d%</code><br>
 
The format to use depends on which INI file you use.<br>
 
  
==Keywords==
+
[[Category:OpCodes]]
create, actor, character, pedtype, model, vehicle, car, passenger
 

Revision as of 21:42, 10 January 2012

GTA III Vice City San Andreas CREATE_CHAR_AS_PASSENGER


Description

Creates a character in the passenger seat of a vehicle

Syntax

01C8: [var] = create_actor [int1] [int2] in_car [car handle] passenger_seat [int3]

Parameter

[var]
Variable to store the handle of the character
[int1]
Ped type
[int2]
Valid character model ID number as defined in the PEDS section of the IDE file; also acceptable is model's DFF name with a hash character
[car handle]
The handle of the vehicle
[int3]
Seat position

Native analog

CREATE_CHAR_AS_PASSENGER

Similar to opcode 009A, this opcode creates a character in the passenger seat of a vehicle. Using this opcode requires an existing vehicle and opcode 0247 to load the model of the character or else the game could crash. Characters can even be created in wrecked vehicles as long as the vehicle exists. Without further additions, if the player enters the vehicle with the character, the character will exit the vehicle. Additional opcodes like 0526 are needed to prevent them from doing that.

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.

Seat position

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

Keywords

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