A help related with GetXYInFrontOfPlayer.
#2

It think this already does that...what exactly do you want with it ? check if a player is in front of you ?

Maybe you want something like this;

pawn Код:
stock GetXYSetAngle(playerid, &Float:x, &Float:y, Float:distance,Float:angle)
{
    new Float:a;
    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);
    if (GetPlayerVehicleID(playerid))
    {
        GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }
    a += angle;
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}

this checks the xy angle in front of you and the distance in that angle to be checked
Reply


Messages In This Thread
A help related with GetXYInFrontOfPlayer. - by De4dpOol - 18.02.2015, 08:41
Re: A help related with GetXYInFrontOfPlayer. - by AIped - 18.02.2015, 08:49
Re: A help related with GetXYInFrontOfPlayer. - by De4dpOol - 18.02.2015, 09:09
Re: A help related with GetXYInFrontOfPlayer. - by PaulDinam - 18.02.2015, 10:44
Re: A help related with GetXYInFrontOfPlayer. - by De4dpOol - 18.02.2015, 11:11
Re: A help related with GetXYInFrontOfPlayer. - by AIped - 18.02.2015, 11:38
Re: A help related with GetXYInFrontOfPlayer. - by AIped - 18.02.2015, 11:44
Re: A help related with GetXYInFrontOfPlayer. - by De4dpOol - 18.02.2015, 11:49
AW: A help related with GetXYInFrontOfPlayer. - by Nero_3D - 18.02.2015, 11:50
Re: A help related with GetXYInFrontOfPlayer. - by AIped - 18.02.2015, 11:52

Forum Jump:


Users browsing this thread: 2 Guest(s)