Gamemode.CanPlayerEnterVehicle
From GMod Wiki
Revision as of 06:25, 24 October 2009 by Crazy Quebecer (Talk | contribs)
Event Hook | |
Hook Name | CanPlayerEnterVehicle |
Syntax | GM:CanPlayerEnterVehicle( Player Player, Vehicle Vehicle, Integer role ) |
Description | Called when a player attempts to enter a vehicle. |
Returns | Boolean |
Lua State | |
BBCode | [b][url=wiki.garrysmod.com/?title=Gamemode.CanPlayerEnterVehicle]Gamemode.CanPlayerEnterVehicle [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Only allows admins to enter vehicles |
---|---|
Used on | |
Code | function CanPlayerEnterVehicle( player, vehicle, role ) if !(player:IsAdmin()) then return false end end |
Output | N/A |