I think you misunderstood the documentation on vec_for_min and vec_for max. These functions sets the given vector to the maximum and minimum of the entity in object space. A pretty simple approach to place an entity on the ground is to first lift it up by a certain value, like "my->z += some_distance". Then you can trace from the entities position in a downwards direction:
Code:
result = c_trace(my.x,vector(my.x,my.y,my.z-2*some_distance),IGNORE_ME | etc.);

You can then set the entities position to target and add entity.min_z to the z position of the entity.


Always learn from history, to be sure you make the same mistakes again...