#IVS Generators Script

1 messages · Page 1 of 1 (latest)

clever wasp
scenic falcon
#

What's the usecase for this? Do only the players in the zone experience the blackout? Or is it for emulating lights inside MLOs? I feel like I would use this if I knew why I needed this xD

Also I wanted to point out a part of the script - personally I'd avoid the use of a thread that runs 24/7 and only call it when inside the zone if necessary.

If you're interested in even more technical analysis.. 2 calls to the server per player per second is extremely taxing if it's running whenever you're not in a zone. Lets use average HTTP requests and math for that.. true/false is 5-6 bytes + average header (8200ish bytes) sent 4 times per second per player - roughly 397KB per second with 120 players... so every 3 seconds it takes 1.2Mb of bandwidth to execute this single thread. So if your server averages 120 players minimum all hours of the day that's 11GB of unnecessary bandwidth being used between your server and the players.

#

I'm a huge proponent of calling threads as a function to avoid long running threads if you can't tell xD

clever wasp
#

the thread is a work around for how qb-weathersync did their blackout mode

#

so when the player is not within the generator zones it runs the thread which triggers the callback checking the blackout mode state so when it sets the blackout mode to false while inzone it doesn't run the thread because it would cause flickering between the two natives

#

not too familiar with the bandwidth thing you mentioned

#

if you want to message me how the whole bandwidth works I am intrigued

main pewter
#

@clever wasp I love it, just have to figure out what I need it for lol

#

Wonder if it can be tied into a job ? Like restoring power to certain buildings ?

clever wasp
#

Could I have though about expanding onto it just need to find time

#

Im looking into an alternative to that thread issue