Difference between revisions of "01C8"
(updating page) |
|||
Line 7: | Line 7: | ||
: 01C8: [''var''] = create_actor [''int1''] [''int2''] in_car [''car handle''] passenger_seat [''int3''] | : 01C8: [''var''] = create_actor [''int1''] [''int2''] in_car [''car handle''] passenger_seat [''int3''] | ||
'''Parameter''' | '''Parameter''' | ||
− | : ['' | + | : [''car handle''] |
− | :: | + | :: The handle of the vehicle |
: [''int1''] | : [''int1''] | ||
:: [[Ped type]] | :: [[Ped type]] | ||
: [''int2''] | : [''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 | :: 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 | ||
− | |||
− | |||
: [''int3''] | : [''int3''] | ||
:: [[01C8#Seat position|Seat position]] | :: [[01C8#Seat position|Seat position]] | ||
+ | : [''var''] | ||
+ | :: Variable to store the handle of the character | ||
'''Native analog''' | '''Native analog''' | ||
: [[CREATE_CHAR_AS_PASSENGER]] | : [[CREATE_CHAR_AS_PASSENGER]] |
Revision as of 00:19, 20 November 2016
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
- [car handle]
- The handle of the vehicle
- [int1]
- [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
- [int3]
- [var]
- Variable to store the handle of the character
Native analog
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