Garry's Mod Wiki

Garry's Mod Wiki

  boolean 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.

for i, ply in ipairs( player.GetAll() ) do if ( ply:IsDrivingEntity() ) then ply:Kill() end end
Output: Every player 'driving' an entity will die a painful death.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...