Is player in front of an object?
#2

Maybe it can hepl you

http://forum.sa-mp.com/showthread.ph...nFrontOfPlayer
pawn Code:
forward GetXYInFrontOfPlayer2(playerid, &Float, &Float:y, Float:distance, Float:angle);
public GetXYInFrontOfPlayer2(playerid, &Float, &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));
}
Reply


Messages In This Thread
Is player in front of an object? - by Programie - 17.05.2012, 16:50
Re: Is player in front of an object? - by ViniBorn - 17.05.2012, 16:59

Forum Jump:


Users browsing this thread: 1 Guest(s)