Skip to content

Commit

Permalink
Update v1.1
Browse files Browse the repository at this point in the history
* Added Jaksam Doors Creator
  • Loading branch information
Musiker15 committed Mar 9, 2023
1 parent 7632811 commit a5ef95f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ If you don't want to use the `ox_lib` Skillbar then remove it from `fxmanifest.l
* [ESX 1.2 and above](https://github.com/esx-framework/esx_core) or [QBCore](https://github.com/qbcore-framework)
* [datacrack by utkuali](https://github.com/utkuali/datacrack)
* [ox_lib](https://github.com/overextended/ox_lib)

## Optional Requirements
* [doors_creator by Jaksam](https://www.jaksam-scripts.com/) - *To unlock all doors while blackout*
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0
1.1
2 changes: 2 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ end
Config.Framework = 'ESX' -- 'ESX' or 'QBCore'
Config.Hotkey = 38 -- deafult: 38 = E
----------------------------------------------------------------
Config.useDoorsCreator = false -- Set to true if you use Jaksams Doors Creator and want to unlock all Doors while blackout
----------------------------------------------------------------
Config.Blackout = {
generalLights = true, -- Set to true turns off all artificial light sources in the map
vehicleLights = true, -- Set to false ignores Vehicles
Expand Down
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ games { 'gta5' }
author 'Musiker15 - MSK Scripts'
name 'msk_blackout'
description 'Weather Blackout Miniheist'
version '1.0'
version '1.1'

lua54 'yes'

Expand Down
12 changes: 12 additions & 0 deletions server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@ AddEventHandler('msk_blackout:syncBlackout', function(state)
Config.weatherScript(state)
end
TriggerClientEvent('msk_blackout:setBlackout', -1, state)

if Config.useDoorsCreator and state then
local doors = exports["doors_creator"]:getAllDoors()
for k, doorData in pairs(doors) do
exports["doors_creator"]:setDoorState(doorData.id, 0)
end
elseif Config.useDoorsCreator and not state then
local doors = exports["doors_creator"]:getAllDoors()
for k, doorData in pairs(doors) do
exports["doors_creator"]:setDoorState(doorData.id, 1)
end
end
end)

logging = function(code, ...)
Expand Down

0 comments on commit a5ef95f

Please sign in to comment.