Vehicle.GetDriver
From GMod Wiki
| Function | |
| Syntax | Vehicle:GetDriver( ) |
| Description: | |
| Returns the driver. | |
| Returns: | Entity |
| In Object: | Vehicle |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Vehicle.GetDriver]Vehicle.GetDriver [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | Gets the driver of the vehicle that the first player on the server is in. |
|---|---|
| Used on | |
| Code | print(player.GetAll()[1]:GetVehicle():GetDriver()) |
| Output | Player [1][Lexi] |
Aditional Notes
- The example is useless, but demonstrates the usage.