17.12.2013, 14:11
pawn Код:
stock SetPlayerBehindPlayer(playerid, Player2, Float:Distance = 2.0)
{
new Float:P[4];
GetPlayerPos(playerid, P[0], P[1], P[2]);
GetPlayerFacingAngle(playerid, P[3]);
P[0] -= (Distance * floatsin(-P[3], degrees));
P[1] -= (Distance * floatcos(-P[3], degrees));
SetPlayerPos(Player2, P[0], P[1], P[2]);
SetPlayerFacingAngle(Player2, P[3]);
}