Vehicle.GetPassenger
From GMod Wiki
Function | |
Syntax | Vehicle:GetPassenger( ) |
Description: | |
Gets the passenger of the vehicle entity. | |
Returns: | Entity |
In Object: | Vehicle |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Vehicle.GetPassenger]Vehicle.GetPassenger [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Gets the passenger of the vehicle that the first player on the server is in. |
---|---|
Used on | |
Code | print(player.GetAll()[1]:GetVehicle():GetPassenger()) |
Output | Player [1][Lexi] |
Aditional Notes
- This appears to return the driver.