Quote:
Originally Posted by RyDeR`
@Lorenc_:
I meant something more like this:
pawn Код:
stock SetObjectFacePoint(iObjectID, Float: fX, Float: fY, Float: fOffset = 0.0) { new Float: fOX, Float: fOY, Float: fRZ ; if(GetObjectPos(iObjectID, fOX, fOY, fRZ)) { fRZ = atan2(fY - fOY, fX - fOX) - 90.0; GetObjectRot(iObjectID, fX, fY, fOX); SetObjectRot(iObjectID, fX, fY, fRZ + fOffset); } }
|
Ah, an offset, sorry about that. I didn't check the thread nor I couldn't since my computer blocked the SA-MP forums url randomly :S
Thanks though for the correction