Camera Vectors in R5 - how to use, READ THIS!
#7

pawn Код:
stock IsPlayerAimingAt(playerid, Float:x, Float:y, Float:z, Float:radius)
{
    new Float:cx,Float:cy,Float:cz,Float:fx,Float:fy,Float:fz;
    GetPlayerCameraPos(playerid, cx, cy, cz);
    GetPlayerCameraFrontVector(playerid, fx, fy, fz);
    return (radius >= DistanceCameraTargetToLocation(cx, cy, cz, x, y, z, fx, fy, fz));
}
returns 1, if a player is looking at position x,y,z
Use radius 1.0 for players
Reply


Messages In This Thread
Camera Vectors in R5 - how to use, READ THIS! - by JernejL - 24.03.2010, 18:20
Re: Camera Vectors in R5 - how to use, READ THIS! - by Norn - 24.03.2010, 18:42
Re: Camera Vectors in R5 - how to use, READ THIS! - by JernejL - 24.03.2010, 18:44
Re: Camera Vectors in R5 - how to use, READ THIS! - by wafffllesss - 24.03.2010, 18:47
Re: Camera Vectors in R5 - how to use, READ THIS! - by Norn - 24.03.2010, 19:23
Re: Camera Vectors in R5 - how to use, READ THIS! - by JernejL - 24.03.2010, 21:13
Re: Camera Vectors in R5 - how to use, READ THIS! - by CracK - 25.03.2010, 05:15
Re: Camera Vectors in R5 - how to use, READ THIS! - by Burridge - 25.03.2010, 07:08
Re: Camera Vectors in R5 - how to use, READ THIS! - by boelie - 25.03.2010, 19:18
Re: Camera Vectors in R5 - how to use, READ THIS! - by JernejL - 25.03.2010, 19:30
Re: Camera Vectors in R5 - how to use, READ THIS! - by boelie - 25.03.2010, 19:37
Re: Camera Vectors in R5 - how to use, READ THIS! - by MaykoX - 25.03.2010, 19:59
Re: Camera Vectors in R5 - how to use, READ THIS! - by Rac3r - 26.03.2010, 07:22
Re: Camera Vectors in R5 - how to use, READ THIS! - by CracK - 26.03.2010, 11:22
Re: Camera Vectors in R5 - how to use, READ THIS! - by ev0lution - 27.03.2010, 01:36
Re: Camera Vectors in R5 - how to use, READ THIS! - by Norn - 27.03.2010, 08:11
Re: Camera Vectors in R5 - how to use, READ THIS! - by ev0lution - 28.03.2010, 08:35
Re: Camera Vectors in R5 - how to use, READ THIS! - by ev0lution - 02.04.2010, 00:15
Re: Camera Vectors in R5 - how to use, READ THIS! - by SourceCode - 20.09.2011, 01:34
Re: Camera Vectors in R5 - how to use, READ THIS! - by JernejL - 28.09.2011, 21:05
Re: Camera Vectors in R5 - how to use, READ THIS! - by SourceCode - 15.11.2011, 13:45
Re: Camera Vectors in R5 - how to use, READ THIS! - by Banditukas - 02.11.2014, 12:00

Forum Jump:


Users browsing this thread: 14 Guest(s)