BlackOut.lua Search

Looking for a blackout.lua to make server in complete blackout if anyone has this or would point me in the right direction, i’m still learning the lua scripting.

use the weather script and see if that will work but atm nothing like that available but should be easy to make

I have the xmas.lua for snow that i am trying to add this to so it will make a good zombie server

Put this SetBlackout(true) on your gameType

@jamaglian OH OH Thank You Thank You, works like a charm!!!

1 Like

hi, where is this gameType?

On default server is the resource “fivem” you can view on __resource.lua where “resource_type ‘gametype’ {name = ‘Freeroam’}” sorry my english im brazilian.

Can you please put an example of how you got it to work?

meaning, where do i put the “SetBlackout(true)” within the __resource.lua

is it:

resource_type ‘gametype’ { name = ‘FreeRoam’ }
resource_type ‘SetBlackout(true)’

I was able to get this to work, but not as previously described.

Go to this file path:
cfx-server/resources/fivem

In your “fivem” folder, there is a LUA file called “fivem_client.lua”. Open that LUA file. You will see several listed events under “AddEventHandler”, such as SetClockTime, Citizen.Trace, etc. As the last addition in the “AddEventHandler” (right above end), I added:

SetBlackout(true)

Save the file, and start your server. This turns off all of the lights on the map.

Yes, I changed it before you replied.

Thanks anyway.