Garry's Mod Wiki

Revision Difference

GM:CanPlayerEnterVehicle#560609

<function name="CanPlayerEnterVehicle" parent="GM" type="hook"> <description> 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> <file line="552">gamemodes/base/gamemode/player.lua</file>⤶ <args> <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>