GM:CanExitVehicle

From Garry's Mod
Jump to: navigation, search
 GM:CanExitVehicle( )

Contents

Description

Determines if the player can exit the vehicle.

Arguments

Vehicle veh

The vehicle entity

Arguments

Player ply

The player

Returns

boolean

True if the player can exit the vehicle.

Examples

Example

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

function GM:CanExitVehicle(veh, ply)
    return (veh:GetVelocity() == Vector(0,0,0))
end


Personal tools
Navigation