Difference between revisions of "01C8"

From GTAMods Wiki
Jump to navigation Jump to search
m
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<code>01C8=5,%1d% %2d% %3o% %4d% %5d%</code><br>
+
{{OpCode
'''Description''': Creates an actor in a passenger seat of a vehicle<br>
+
| games      = {{Icon|t}}
'''Parameter 1''': Existing vehicle handle<br>
+
| command    = CREATE_CHAR_AS_PASSENGER
'''Parameter 2''': [[Ped type]]<br>
+
| description = Creates a character in the passenger seat of the vehicle
'''Parameter 3''': [[DFF]] model name or ID of a ped<br>
+
| syntax1    = 01C8: [''var''] = create_actor_pedtype [''int1''] model [''int2''] in_car [''car handle''] passenger_seat [''int3'']
'''Parameter 4''': Flag<br>
+
| p1t        = [''car handle'']
'''Parameter 5''': Actor handle<br>
+
| p1d        = The handle of the vehicle
'''Supports''': GTA3, Vice City, San Andreas<br>
+
| p2t        = [''int1'']
 +
| p2d        = [[Ped type]]
 +
| p3t        = [''int2'']
 +
| p3d        = Valid model index as defined in the [[PEDS|PEDS section]] of the [[IDE]] file; also acceptable is model's [[DFF]] name with a hash character
 +
| p4t        = [''int3'']
 +
| p4d        = [[#Seat position|Seat position]]
 +
| p5t        = [''var'']
 +
| p5d        = Variable to store the handle of the character
 +
| native      = [[CREATE_CHAR_AS_PASSENGER]]
 +
}}
  
This creates an actor in a passenger seat of a vehicle. Using this opcode requires an existing vehicle and [[0247]] to load the model or else the game can crash. If you create an actor in a non-existent seat, the actor will still be created inside the vehicle but it will be invisible.
+
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.
  
==Flags==
+
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.
The flag is the position of the seat that the actor will be created in.<br>
 
0 Front right seat<br>
 
1 Rear left seat<br>
 
2 Rear right seat
 
  
==Note==
+
== Seat position ==
Sometimes this opcode is written as this:<br>
+
{|class="wikitable center-col-1"
<code>01C8=5,%5d% %2d% %3o% %1d% %4d%</code><br>
+
!Seat ||Four-seat ||Two-seat
The parameters are mixed around. This depends on which sascm.ini file you use.<br>
+
|-
[[Sanny Builder]] by default:
+
|-1 ||colspan="2" {{a|c}} |the next available seat
<code>01C8: 1@ = create_actor_pedtype 5 model #BFORI in_car 0@ passenger_seat 0</code>
+
|-
 +
|0 ||front right seat ||rear seat
 +
|-
 +
|1 ||rear left seat ||
 +
|-
 +
|2 ||rear right seat ||
 +
|}
  
==Keywords==
+
== Keywords ==
create, actor, pedtype, model, vehicle
+
create, actor, character, pedtype, model, vehicle, car, passenger
 
 
[[Category:OpCodes]]
 

Latest revision as of 03:45, 4 December 2016

GTA III Vice City San Andreas CREATE_CHAR_AS_PASSENGER


Description
Creates a character in the passenger seat of the vehicle
Syntax
01C8: [var] = create_actor_pedtype [int1] model [int2] in_car [car handle] passenger_seat [int3]
Parameter
[car handle]
The handle of the vehicle
[int1]
Ped type
[int2]
Valid model index as defined in the PEDS section of the IDE file; also acceptable is model's DFF name with a hash character
[int3]
Seat position
[var]
Variable to store the handle of the character
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

Seat Four-seat Two-seat
0 front right seat rear seat
1 rear left seat
2 rear right seat

Keywords

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