okay looks as though I can't edit my old posts :'(
anyway.
this code works for bots and players and maybe even ohter entities which I havne't been able to test with yet (works with players and bots).
you may need GetIServerEntity
PHP Code:
Vector entityOrigin ( edict_t *pEntity )
{
static float *fOrigin;
fOrigin = pEntity->GetIServerEntity()->GetNetworkable()->GetPVSInfo()->m_vCenter;
return Vector(fOrigin[0],fOrigin[1],fOrigin[2]);
}