Garry's Mod Wiki

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 )

Page Links


Special Pages


Wikis

?

Render Time: 49ms

DB GetPage 20
Generate Html 4
SaveChanges (1) 9
Render Body 0
Render Sidebar 12