add command disable config

This commit is contained in:
kac5a
2022-10-07 01:46:03 +02:00
parent 1f29913af1
commit 06993633ff
3 changed files with 5 additions and 5 deletions

View File

@@ -118,7 +118,7 @@ RegisterNUICallback('hideDocument', function(_, cb)
cb({})
end)
if CurrentFramework then
if CurrentFramework and Config.Command then
RegisterCommand(Config.Command, function()
toggleNuiFrame(true, true)
end)
@@ -252,7 +252,7 @@ end)
RegisterNetEvent("k5_documents:useItem")
AddEventHandler("k5_documents:useItem", function()
ExecuteCommand(Config.Command)
toggleNuiFrame(true, true)
end)

View File

@@ -1,6 +1,6 @@
Config = {}
Config.Command = "documents"
Config.Command = "documents" -- If nil, the command won't work
Config.DocumentItemName = nil -- The name of the item you want to open the documents. If nil, no item will be registered

View File

@@ -2,8 +2,8 @@ fx_version "cerulean"
description "A better document management script"
author "K5 Scripts"
version '1.2.1'
update "Added usable item config"
version '1.2.2'
update "Added config to disable command"
repository 'https://github.com/kac5a/k5_documents'
lua54 'yes'