Last active
June 23, 2023 15:38
-
-
Save wowjeeez/4fa1df967aa017a6f2c9cca0b80889fa to your computer and use it in GitHub Desktop.
GTA 5 screen coords to HTML % (mainly used with FiveM nui)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function coordsToPerc(X, Y) { | |
const x = X * 100 | |
const y = Y * 100 | |
const style = `style="position:fixed; top:${this.location.y}%; left:${this.location.x}%"` | |
return {X: x, Y: y, CSS: style} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment