Vehicle.GetPassenger

From GMod Wiki

Jump to: navigation, search


Function
Syntax Vehicle:GetPassenger( )
Description:
Gets the passenger of the vehicle entity.
Returns: Entity
In Object: Vehicle
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Vehicle.GetPassenger]Vehicle.GetPassenger [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionGets the passenger of the vehicle that the first player on the server is in.
Used onNewerServer.png
Code
print(player.GetAll()[1]:GetVehicle():GetPassenger())
OutputPlayer [1][Lexi]


Aditional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox