How to detect: a player is a driver or a passenger? And if so, what does he drive?
How to detect: a player is a driver or a passenger? And if so, what does he drive?
How to detect: a player is a driver or a passenger? And if so, what does he drive?
Re: How to detect: a player is a driver or a passenger? And if so, what does he drive?
You can check if he is in a vehicle with : https://lua-api.factorio.com/latest/Lua ... ol.vehicle
And with the vehicle you can get the entity or player who is driving: https://lua-api.factorio.com/latest/Lua ... get_driver
Or the passenger: https://lua-api.factorio.com/latest/Lua ... _passenger
And with the vehicle you can get the entity or player who is driving: https://lua-api.factorio.com/latest/Lua ... get_driver
Or the passenger: https://lua-api.factorio.com/latest/Lua ... _passenger