Cargobob Magnet and GetVehicles

How can i use this command: GetAllVehicles [IN LUA]
int _GET_ALL_VEHICLES(Any* vehArray);
And how can i put magnet on the cargobob helicopter?

GetAllVehicles should work as you’d expect. Or you can use the entity iterator to make life a bit easier. https://gist.github.com/IllidanS4/9865ed17f60576425369fc1da70259b2

Ok Thanks you very much