Vehicle.GetDriver

From GMod Wiki

Jump to: navigation, search


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



Examples

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


Aditional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox