Garry's Mod Wiki

Player:IsDrivingEntity

Description

Used to find out if a player is currently 'driving' an entity (by which we mean 'right click > drive' ).

Returns

1 boolean
A value representing whether or not the player is 'driving' an entity.

Example

Kills every player currently 'driving' an entity.

local plys = player.GetAll() for _, ply in pairs( plys ) do if ( ply:IsDrivingEntity() ) then ply:Kill() end end
Output: Every player 'driving' an entity will die a painful death.

Page Links


Special Pages


Wikis

?

Render Time: 23ms

Session 0
DB GetPage 3
Generate Html 4
SaveChanges 8
Render Body 0
Render Sidebar 6