diff --git a/server-data/resources/[bpt_addons]/bpt_doorlock/client/main.lua b/server-data/resources/[bpt_addons]/bpt_doorlock/client/main.lua index c2b20230c..88c0ed460 100644 --- a/server-data/resources/[bpt_addons]/bpt_doorlock/client/main.lua +++ b/server-data/resources/[bpt_addons]/bpt_doorlock/client/main.lua @@ -1,3 +1,5 @@ +local doors, NuiHasLoaded, source = {}, {}, {} + if not LoadResourceFile(lib.name, 'web/build/index.html') then error('Unable to load UI. Build bpt_doorlock or download the latest release.\n ^3https://github.com/bitpredator/bpt_doorlock/releases/latest/download/bpt_doorlock.zip^0') end @@ -115,7 +117,7 @@ lib.callback('bpt_doorlock:getDoors', false, function(data) end end) -RegisterNetEvent('bpt_doorlock:setState', function(id, state, source, data) +RegisterNetEvent('bpt_doorlock:setState', function(id, state, _, data) if not doors then return end if data then @@ -169,13 +171,13 @@ RegisterNetEvent('bpt_doorlock:setState', function(id, state, source, data) if door.state == state and door.distance and door.distance < 20 then if Config.NativeAudio then - RequestScriptAudioBank('dlc_oxdoorlock/oxdoorlock', false) + RequestScriptAudioBank('dlc_bptdoorlock/bptdoorlock', false) local sound = state == 0 and door.unlockSound or door.lockSound or 'door_bolt' local soundId = GetSoundId() - PlaySoundFromCoord(soundId, sound, door.coords.x, door.coords.y, door.coords.z, 'DLC_OXDOORLOCK_SET', false, 0, false) + PlaySoundFromCoord(soundId, sound, door.coords.x, door.coords.y, door.coords.z, 'DLC_BPTDOORLOCK_SET', false, 0, false) ReleaseSoundId(soundId) - ReleaseNamedScriptAudioBank('dlc_oxdoorlock/oxdoorlock') + ReleaseNamedScriptAudioBank('dlc_bptdoorlock/bptdoorlock') else local volume = (0.01 * GetProfileSetting(300)) / (door.distance / 2) if volume > 1 then volume = 1 end diff --git a/server-data/resources/[bpt_addons]/bpt_doorlock/client/utils.lua b/server-data/resources/[bpt_addons]/bpt_doorlock/client/utils.lua index 66ac47e00..b098f72de 100644 --- a/server-data/resources/[bpt_addons]/bpt_doorlock/client/utils.lua +++ b/server-data/resources/[bpt_addons]/bpt_doorlock/client/utils.lua @@ -1,3 +1,4 @@ +local doors, source, NuiHasLoaded = {}, {}, {} local Entity = Entity local function getDoorFromEntity(data) diff --git a/server-data/resources/[bpt_addons]/bpt_doorlock/locales/en.json b/server-data/resources/[bpt_addons]/bpt_doorlock/locales/en.json index 8b14217af..ba6a852d0 100644 --- a/server-data/resources/[bpt_addons]/bpt_doorlock/locales/en.json +++ b/server-data/resources/[bpt_addons]/bpt_doorlock/locales/en.json @@ -1,18 +1,18 @@ { - "unlocked_door": "Unlocked door", - "locked_door": "Locked door", - "lock_door": "[E] Lock door", - "unlock_door": "[E] Unlock door", - "door_lock": "Door lock", - "passcode": "Passcode", - "lockpick_broke": "Your lockpick broke", - "pick_lock": "Pick lock", - "add_lock": "Add doorlock", - "edit_lock": "Edit doorlock", - "remove_lock": "Remove doorlock", - "cannot_unlock": "Unable to unlock door", - "cannot_lock": "Unable to lock door", - "create_modify_lock": "Create a doorlock, or modify an existing one", - "add_door_textui": "**Create new door** \nInteract with [LMB] \nCancel with [RMB]", - "command_closest": "Open UI directly to closest doorlock" - } \ No newline at end of file + "unlocked_door": "Unlocked door", + "locked_door": "Locked door", + "lock_door": "[E] Lock door", + "unlock_door": "[E] Unlock door", + "door_lock": "Door lock", + "passcode": "Passcode", + "lockpick_broke": "Your lockpick broke", + "pick_lock": "Pick lock", + "add_lock": "Add doorlock", + "edit_lock": "Edit doorlock", + "remove_lock": "Remove doorlock", + "cannot_unlock": "Unable to unlock door", + "cannot_lock": "Unable to lock door", + "create_modify_lock": "Create a doorlock, or modify an existing one", + "add_door_textui": "**Create new door** \nInteract with [LMB] \nCancel with [RMB]", + "command_closest": "Open UI directly to closest doorlock" +} \ No newline at end of file diff --git a/server-data/resources/[bpt_addons]/bpt_doorlock/locales/it.json b/server-data/resources/[bpt_addons]/bpt_doorlock/locales/it.json index 8c9b49cb0..be105c5be 100644 --- a/server-data/resources/[bpt_addons]/bpt_doorlock/locales/it.json +++ b/server-data/resources/[bpt_addons]/bpt_doorlock/locales/it.json @@ -1,18 +1,18 @@ { - "unlocked_door": "Porta sbloccata", - "locked_door": "Porta chiusa", - "lock_door": "[E] Chiudi porta", - "unlock_door": "[E] Apri porta", - "door_lock": "Serratura della porta", - "passcode": "codice di accesso", - "lockpick_broke": "il tuo grimaldello si è rotto", - "pick_lock": "Scassina serratura", - "add_lock": "Aggiungi serratura", - "edit_lock": "Modifica serratura", - "remove_lock": "Rimuovi serratura", - "cannot_unlock": "Impossibile aprire la porta", - "cannot_lock": "Impossibile chiudere la porta", - "create_modify_lock": "Crea una serratura o modificane una esistente", - "add_door_textui": "**Crea una nuova porta** \nInteragire con [LMB] \nAnnulla con [RMB]", - "command_closest": "Apri l'interfaccia utente direttamente alla serratura più vicina" - } \ No newline at end of file + "unlocked_door": "Porta sbloccata", + "locked_door": "Porta chiusa", + "lock_door": "[E] Chiudi porta", + "unlock_door": "[E] Apri porta", + "door_lock": "Serratura della porta", + "passcode": "codice di accesso", + "lockpick_broke": "il tuo grimaldello si è rotto", + "pick_lock": "Scassina serratura", + "add_lock": "Aggiungi serratura", + "edit_lock": "Modifica serratura", + "remove_lock": "Rimuovi serratura", + "cannot_unlock": "Impossibile aprire la porta", + "cannot_lock": "Impossibile chiudere la porta", + "create_modify_lock": "Crea una serratura o modificane una esistente", + "add_door_textui": "**Crea una nuova porta** \nInteragire con [LMB] \nAnnulla con [RMB]", + "command_closest": "Apri l'interfaccia utente direttamente alla serratura più vicina" +} \ No newline at end of file