Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getXYInFrontOfPlayer( player, distance )
- local x, y, z = getElementPosition( player )
- local rot = getPedRotation( player ) --Was first getPlayerRotation, but this wasn't the bug.
- x = x + ( math.sin( math.rad ( -rot ) ) * distance ) --This,
- y = y + ( math.cos( math.rad ( -rot ) ) * distance ) --And this where the bug. I've added ( and ), and a - in front of rot.
- return x, y
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement