GetAimingPos
#6

This topic should help it works for me for placing objects you would just need to edit to what you need ie, just return co-ords not create object.

Here is the code posted by simon in that topic.
pawn Код:
new
    Float:fPX, Float:fPY, Float:fPZ,
    Float:fVX, Float:fVY, Float:fVZ,
    Float:object_x, Float:object_y, Float:object_z;

// Change this constant to the the scale you want. A larger scale increases the distance from
// the camera. A negative scale will inverse the vectors and make them face in the opposite
// direction (i.e. behind the camera)
const
    Float:fScale = 6.0;

GetPlayerCameraPos(playerid, fPX, fPY, fPZ);
GetPlayerCameraFrontVector(playerid, fVX, fVY, fVZ);

object_x = fPX + floatmul(fVX, fScale);
object_y = fPY + floatmul(fVY, fScale);
object_z = fPZ + floatmul(fVZ, fScale);

CreateObject(345, object_x, object_y, object_z, 0.0, 0.0, 0.0);
Its camera angle that effects it though not aiming.
Reply


Messages In This Thread
GetAimingPos - by Trooper[Y] - 12.08.2010, 18:53
Re: GetAimingPos - by Trooper[Y] - 12.08.2010, 19:17
Re: GetAimingPos - by Trooper[Y] - 13.08.2010, 10:21
Re: GetAimingPos - by Hiddos - 13.08.2010, 10:29
Re: GetAimingPos - by Trooper[Y] - 13.08.2010, 10:33
Re: GetAimingPos - by iggy1 - 13.08.2010, 11:02
Re: GetAimingPos - by Trooper[Y] - 22.08.2010, 21:11
Re: GetAimingPos - by Trooper[Y] - 29.08.2010, 20:48
AW: GetAimingPos - by Trooper[Y] - 29.09.2010, 20:06
Re: GetAimingPos - by Mauzen - 29.09.2010, 21:20

Forum Jump:


Users browsing this thread: 1 Guest(s)