Difference between revisions of "PutPlayerInVehicle"

From Nomad DB
(Created page with "Lets the specified Pawn ride a specific vehicle. == Syntax == <syntaxhighlight lang="lua"> PutPlayerInVehicle(pawnId, vehicleId) </syntaxhighlight> * '''pawnId''' (string): [...")
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Lets the specified Pawn ride a specific vehicle.
+
Puts the specified [[Pawn|pawn]] into the first seat of the specified vehicle.
  
 
== Syntax ==
 
== Syntax ==
Line 5: Line 5:
 
PutPlayerInVehicle(pawnId, vehicleId)
 
PutPlayerInVehicle(pawnId, vehicleId)
 
</syntaxhighlight>
 
</syntaxhighlight>
* '''pawnId''' (string): [[EntityId|ID]] of the [[Pawn]] that should be put into the specified vehicle
+
* '''pawnId''' (string): [[EntityId|ID]] of the [[Pawn|pawn]] that should be put into the specified vehicle
 
* '''vehicleId''' (string): [[EntityId|ID]] of the vehicle the specified pawn should be put into
 
* '''vehicleId''' (string): [[EntityId|ID]] of the vehicle the specified pawn should be put into
  
Line 20: Line 20:
 
* [[Pawn]]
 
* [[Pawn]]
  
[[Category:WD2 Lua]] [[Category: WD2 Entity]] [[Category: WD2 Player]]
+
[[Category:WD2 Lua]] [[Category: WD2 Entity]] [[Category: WD2 Player]] [[Category: WD2 Vehicle]]

Latest revision as of 16:38, 15 April 2020

Puts the specified pawn into the first seat of the specified vehicle.

Syntax

PutPlayerInVehicle(pawnId, vehicleId)
  • pawnId (string): ID of the pawn that should be put into the specified vehicle
  • vehicleId (string): ID of the vehicle the specified pawn should be put into

Example

local car = SpawnEntityFromArchetype("{4bfd48bb-003b-4fa2-9f42-a6aa2732609e}", 0, 0, 65, 0, 0, 0)
PutPlayerInVehicle(GetLocalPlayerEntityId(), car)

Related Pages