30.06.2013, 10:10
(
Последний раз редактировалось QuaTTrO; 30.06.2013 в 11:12.
)
Can someone make a fuction that creates a object in front of player ?
Edit:
nvm. I found it
Edit:
nvm. I found it
pawn Код:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance)
{
new Float:Angle;
GetPlayerPos(playerid, x, y, Angle);
GetPlayerFacingAngle(playerid, Angle);
if (GetPlayerVehicleID(playerid))
{
GetVehicleZAngle(GetPlayerVehicleID(playerid), Angle);
}
x += (distance * floatsin(-Angle, degrees));
y += (distance * floatcos(-Angle, degrees));
}