Garry's Mod Wiki

Revision Difference

GM:CanPlayerEnterVehicle#560238

<function name="CanPlayerEnterVehicle" parent="GM" type="hook"> <description> Determines whether or not the player can enter the vehicle. Determines whether or not a given player player can enter the given vehicle. <page>Player:EnterVehicle</page> will bypass this hook. Called just before <page>GM:PlayerEnteredVehicle</page>. </description> <realm>Server</realm> <args> <arg name="player" type="Player">The player.</arg> <arg name="vehicle" type="Vehicle">The vehicle.</arg> <arg name="player" type="Player">The player that wants to enter a vehicle.</arg> <arg name="vehicle" type="Vehicle">The vehicle in question.</arg> <arg name="role" type="number">The seat number.</arg> </args> <rets> <ret name="" type="boolean">`false` if the player is not allowed to enter the vehicle.</ret> </rets> </function>