Gamemode.PlayerEnteredVehicle

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NamePlayerEnteredVehicle
SyntaxGM:PlayerEnteredVehicle( Player Player, Vehicle Vehicle, Integer role )
DescriptionCalled when a player enters a vehicle.
ReturnsNil
Lua StateNewerShared.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerEnteredVehicle]Gamemode.PlayerEnteredVehicle [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionMessages console when a player enters a vehicle
Used onNewerServer.png
Code
 
function PlayerEnteredVehicle( player, vehicle, role )
	Msg( player:Nick() .. " has entered a vehicle" )
end
 
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox