Gamemode.PlayerLeaveVehicle

From GMod Wiki

Revision as of 15:17, 17 February 2011 by BlackVoid (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NamePlayerLeaveVehicle
SyntaxGM:PlayerLeaveVehicle( Player Player, Vehicle Vehicle )
DescriptionThis hook runs when a player has exited a vehicle
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerLeaveVehicle]Gamemode.PlayerLeaveVehicle [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPrints the players name who exited the vehicle and the vehicle
Used onNewerServer.png
Code
function VehicleExit(pl, vehicle)
	print("Player " .. pl:GetName() .. " exited " .. vehicle:GetClass() .. ".\n")
end
hook.Add("PlayerLeaveVehicle", "PrintPlayerVehicleExit", VehicleExit)
OutputN/A


Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox