Not to crap on your code, but there is a function that already does this =P Here is a much simplified version;
Replace
dbPositionCamera(pointatx + (dbSin(anglea)* dbSin(angleb) * dist), pointaty + (dbCos(angleb)*dist), pointatz+(dbCos(anglea)*dbSin(angleb)*dist));
With
dbSetCameraToFollow( pointatx, pointaty, pointatz, anglea, dist, 5, 10, 0 );
This will follow, and orbit around if the object is spinning, the objects coordinates at a height of 5. It also has a smooth command which will make the movement less jerky.
Cheers!
Tux is my guildmaster.