12.12.2010, 18:30
use a funзгo GetXYInFrontOfPlayer
creditos а quem quer que a tenha feito, sei la quem fez
use:
pawn Код:
stock 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));
}
use:
pawn Код:
new Float:X, Float:Y;
GetXYInFrontOfPlayer(playerid, X, Y, 1.0);
//blablabla