29.06.2014, 00:14
Give this a shot you can use a value higher than 150.0 if you want.
pawn Код:
stock IsPlayerInFrontOfPoint(playerid, Float:x, Float:y, Float:z, Float:dist=150.0)
{
new Float:px, Float:py, Float:pz;
GetPlayerPos(targetid, px, py, pz);//my pos
GetXYInFrontOfPlayer(targetid,px,py,dist);
if(GetDistance(x,y,z,px,py,pz) <= dist)return 1;
return 0;
}