Float help
#2

No, because if the player isn't facing to the north, it won't be his right side. You need GetXYInFrontOfPlayer and variations of it.
pawn Код:
GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
    new Float:a;

    GetPlayerPos(playerid, x, y, a);
    GetPlayerFacingAngle(playerid, a);

    if (GetPlayerVehicleID(playerid)) {
        GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    }

    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
}
Not sure who originally wrote this.
Reply


Messages In This Thread
Float help - by Equuuuin0X - 28.03.2014, 08:12
Re: Float help - by Vince - 28.03.2014, 09:56
Re: Float help - by Equuuuin0X - 28.03.2014, 10:01
Re: Float help - by Matess - 28.03.2014, 11:18
Re: Float help - by Equuuuin0X - 30.03.2014, 00:05

Forum Jump:


Users browsing this thread: 1 Guest(s)