Invalid function declaration?
#5

Quote:
Originally Posted by Imperor
Посмотреть сообщение
OMG I am sorry, i forgot that lol.
pawn Код:
forwad Float:SetPlayerToFacePos(playerid, Float:X, Float:Y);
public Float:SetPlayerToFacePos(playerid, Float:X, Float:Y)
{
    new
        Float:local_pX,
        Float:local_pY,
        Float:local_pZ,
        Float:ang;

    GetPlayerPos(playerid, local_pX, local_pY, local_pZ);

    if( Y > local_pY ) ang = (-acos((X - local_pX) / floatsqroot((X - local_pX)*(X - local_pX) + (Y - local_pY)*(Y - local_pY))) - 90.0);
    else if( Y < local_pY && X < local_pX ) ang = (acos((X - local_pX) / floatsqroot((X - local_pX)*(X - local_pX) + (Y - local_pY)*(Y - local_pY))) - 450.0);
    else if( Y < local_pY ) ang = (acos((X - local_pX) / floatsqroot((X - local_pX)*(X - local_pX) + (Y - local_pY)*(Y - local_pY))) - 90.0);

    if(X > local_pX) ang = (floatabs(floatabs(ang) + 180.0));
    else ang = (floatabs(ang) - 180.0);

    ang += 180.0;

    SetPlayerFacingAngle(playerid, ang);

    return ang;
}
Seriously 'forwad', change 'forwad' to 'forward'.
Reply


Messages In This Thread
Invalid function declaration? - by Laure - 03.06.2014, 04:11
Re: Invalid function declaration? - by xFirex - 03.06.2014, 04:14
Re: Invalid function declaration? - by SAMProductions - 03.06.2014, 04:17
Re: Invalid function declaration? - by Laure - 03.06.2014, 04:19
Re: Invalid function declaration? - by SAMProductions - 03.06.2014, 04:21
Re: Invalid function declaration? - by Laure - 03.06.2014, 04:22
Re: Invalid function declaration? - by SAMProductions - 03.06.2014, 04:24
Re: Invalid function declaration? - by Laure - 03.06.2014, 04:26

Forum Jump:


Users browsing this thread: 2 Guest(s)