Mobius1 / bulletin

Customisable notifications for FiveM
GNU General Public License v3.0
53 stars 39 forks source link

Align the notifications by safe zone size #1

Open Kristukas1337 opened 3 years ago

Kristukas1337 commented 3 years ago

Hello, is this possible to align the notifications position by player safezone size? Because i took all of the info needed from client to js, but its not working, but on my hud its working just perfect :D I'm trying to put the needed style on bulletin_container, because i can't find anything else where can i put that style, any help?

JS this.safezone = safeZoneSize const f = safeZoneSize * 0.5 const tbMargin = window.screen.height * f; const lrMargin = window.screen.width * f; document.getElementById('bulletin_container').style.margin =${tbMargin}px ${lrMargin}px``

client

function AddNotification(data) data.config = Config data.safeZoneSize = 1.0 - GetSafeZoneSize() SendNUIMessage(data); end