15.04.2013, 12:25
SetPosInFrontOfPlayer(playerid, giveplayerid, Float:distance);
Code:
SetPosInFrontOfPlayer(playerid, giveplayerid, Float:distance)
{
new Float:x,Float:y,Float:z,Float:a;
GetPlayerPos(playerid, x, y,z);
GetPlayerFacingAngle(playerid, a);
x += (distance * floatsin(-a, degrees));
y += (distance * floatcos(-a, degrees));
SetPlayerPos(giveplayerid,x,y,z);
SetPlayerFacingAngle(giveplayerid,a);
}

