← Previous | Next →
enterVehicle
Description
Makes the NPC enter a specified vehicle.
| Name |
Type |
Possibilities |
| enterVehicle |
behaviour |
2 |
Parameters
| # |
Name |
Type |
Mandatory |
Description |
Multiple |
| 1 |
vehicle |
Vehicle |
Yes |
The vehicle that the NPC will enter. |
No |
| 2 |
seatIndex |
number |
No |
The seat index the NPC should attempt to enter. Defaults to -1 (any seat) if not specified. |
No |
| 3 |
speed |
number |
No |
The speed at which the NPC should enter the vehicle. Defaults to 2.0 if not specified. |
No |
| 4 |
timeout |
number |
No |
The time in milliseconds to wait before giving up on entering the vehicle. Defaults to -1 (no timeout) if not specified. |
No |
| 5 |
mode |
number |
No |
The mode of entry. Defaults to 1 if not specified. |
No |
Outputs
| # |
Description |
| 1 |
The NPC is already in or entering the specified vehicle. |
| 2 |
The NPC starts entering the specified vehicle. |
Example
NPC
name Driver
model s_m_y_cop_01
position -1020.72 4839.78 258.30 0.0
interaction
nothing
behaviour
enterVehicle myVehicle -1 2.0 -1 1