Garry's Mod Wiki

GM:CanExitVehicle

GM:CanExitVehicle

  boolean GM:CanExitVehicle( Vehicle veh, Player ply )

Description

Determines if the player can exit the vehicle.

Arguments

1 Vehicle veh
The vehicle entity
2 Player ply
The player

Returns

1 boolean
True if the player can exit the vehicle.

Example

Only lets player exit vehicle if it is not in motion.

hook.Add( "CanExitVehicle", "PlayerMotion", function( veh, ply ) return ( veh:GetVelocity() == Vector( 0, 0, 0 ) ) end )

Special Pages


Wikis

?

Render Time: 45ms

DB GetPage 24
Generate Html 3
SaveChanges (1) 9
Render Body 0
Render Sidebar 6