SA-MP Forums Archive
Modern Camera ( HELP PLEASE! ) - Get Coordinates on where the Camera is aiming - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Modern Camera ( HELP PLEASE! ) - Get Coordinates on where the Camera is aiming (/showthread.php?tid=345527)



Modern Camera ( HELP PLEASE! ) - Get Coordinates on where the Camera is aiming - Aira - 25.05.2012

Thats what i'm asking for, i'm not asking for someone to make it for me.
But i need to know WHAT FUNCTIONS i need to use..
Its
If you have a CAMERA and if you aim at a Certain Locaton - Ground - Building, it will show the COORDINATES ( X Y Z ) of it as a Textdraw on the lower side of the camera. How?


Re: Modern Camera ( HELP PLEASE! ) - Get Coordinates on where the Camera is aiming - ViniBorn - 25.05.2012

Maybe this can help you

pawn Код:
GetPosInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
    new Float:a;
    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    if(GetPlayerVehicleID(playerid))
        GetVehicleZAngle(GetPlayerVehicleID(playerid), a);

    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}



Re: Modern Camera ( HELP PLEASE! ) - Get Coordinates on where the Camera is aiming - WooTFTW - 25.05.2012

You should search around forums.
User _niCe_ has already released a function, which detects x,y,z coords where player is looking.
Search for it.


Re: Modern Camera ( HELP PLEASE! ) - Get Coordinates on where the Camera is aiming - Aira - 27.05.2012

Quote:
Originally Posted by WooTFTW
Посмотреть сообщение
You should search around forums.
User _niCe_ has already released a function, which detects x,y,z coords where player is looking.
Search for it.
Sorry but can you please give me a link? I Can't really find _niCe_