08.01.2015, 12:39
Code:
stock GetXYInFrontOfPlayer(playerid, &Float:x, &Float:y, &Float:z, &Float:a, Float:distance) { GetPlayerPos(playerid, x, y ,z); if(IsPlayerInAnyVehicle(playerid)) { GetVehicleZAngle(GetPlayerVehicleID(playerid),a); } else { GetPlayerFacingAngle(playerid, a); } x += (distance * floatsin(-a, degrees)); y += (distance * floatcos(-a, degrees)); return 0; }