function getXYInFrontOfPlayer( distance )
local x,y,z = getElementPosition( getLocalPlayer() )
local rotation = getPlayerRotation( getLocalPlayer() )
rotation = rotation/180*3.141592
x = x + ( math.sin(rotation) * distance )
y = y + ( math.cos(rotation) * distance )
return x, y
end
I didn't test this because I dont have MTA installed at the moment, its a conversion from GetXYInFrontOfPlayer on sa-mp.
If there are problems post them here