Is Object in front of player?
#10

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;
}
Reply


Messages In This Thread
Is Object in front of player? - by Hantex. - 28.06.2014, 22:08
Re: Is Object in front of player? - by Jefff - 28.06.2014, 23:02
Re: Is Object in front of player? - by Hantex. - 28.06.2014, 23:28
Re : Is Object in front of player? - by S4t3K - 28.06.2014, 23:33
Re: Is Object in front of player? - by Hantex. - 28.06.2014, 23:46
Re: Is Object in front of player? - by Jefff - 28.06.2014, 23:50
Re : Is Object in front of player? - by S4t3K - 28.06.2014, 23:58
Re: Is Object in front of player? - by Hantex. - 29.06.2014, 00:01
Respuesta: Is Object in front of player? - by angelxeneize - 29.06.2014, 00:08
Re: Is Object in front of player? - by Pottus - 29.06.2014, 00:14

Forum Jump:


Users browsing this thread: 1 Guest(s)