You can do the following: Code: local veh = be:getObjectByID(vehID) -- You have to specify the vehicle ID -- To get your current vehicle, you can do: veh = be:getPlayerVehicle(0) -- You can then print/dump it like so: dump(veh) -- From the output of the dump, you should see the function "getPosition", so to call it, you can do: dump(veh:getPosition()) -- Will return "vec3(x, y, z)"
It seems that be can't be used in lua files under the folder "vehicles", how can I use it in the files inder "vehicles"
If it's vehicle lua, you can use "obj:getPosition()". Call "dump(obj)" in the vehicle lua from the console, it will show you all the available functions