From JC2-MP Documentation
|Arguments (in table)||Player player, Vehicle vehicle, boolean is_driver, Player old_driver|
Fired when a player enters a vehicle. Jumping onto stunt position does not count; they must be physically in the vehicle. Player:EnterVehicle will also fire the event.
Foo = function(args) print(args.player:GetName().." entered a "..args.vehicle:GetName()) end Events:Subscribe("PlayerEnterVehicle", Foo)
Detecting vehicle theft
Foo = function(args) if args.is_driver and args.old_driver then print(args.player:GetName().." stole a vehicle from "..args.old_driver:GetName()) end end Events:Subscribe("PlayerEnterVehicle", Foo)