Well, i know that this line is causing you the trouble.
PHP Code:
if((fOrigin[i][0] == fPoss[id][0]) && (fOrigin[i][1] == fPoss[id][1]) && (fOrigin[i][2] == fPoss[id][2])
This code is actually telling us, that the reviver needs to be on the EXACT SAME SPOT the victim died, if not, the reviving function will not work.
I would suggest using random_float() for this.
__________________