Spawn something relative to the player.
#2

you mean some thing like?
pawn Код:
stock Float:GetPosInFrontOfPlayer(playerid, &Float:x, &Float:y, Float:distance){
    new Float:a;
    GetPlayerPos(playerid, x, y, a);
    if (IsPlayerInAnyVehicle(playerid)) GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
    else GetPlayerFacingAngle(playerid, a);
    x += (distance * floatsin(-a, degrees));
    y += (distance * floatcos(-a, degrees));
    return a;
}
Reply


Messages In This Thread
Spawn something relative to the player. - by IcyBlight - 01.06.2010, 07:38
Re: Spawn something relative to the player. - by (SF)Noobanatior - 01.06.2010, 08:03
Re: Spawn something relative to the player. - by IcyBlight - 01.06.2010, 08:05
Re: Spawn something relative to the player. - by jameskmonger - 01.06.2010, 08:24
Re: Spawn something relative to the player. - by IcyBlight - 01.06.2010, 08:49
Re: Spawn something relative to the player. - by jonrb - 01.06.2010, 09:06
Re: Spawn something relative to the player. - by IcyBlight - 01.06.2010, 10:31
Re: Spawn something relative to the player. - by jonrb - 01.06.2010, 11:06
Re: Spawn something relative to the player. - by IcyBlight - 01.06.2010, 11:09

Forum Jump:


Users browsing this thread: 1 Guest(s)