From 06993633ff535a68f47dbb0253188badb3552e69 Mon Sep 17 00:00:00 2001 From: kac5a Date: Fri, 7 Oct 2022 01:46:03 +0200 Subject: [PATCH] add command disable config --- client/client.lua | 4 ++-- config.lua | 2 +- fxmanifest.lua | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/client.lua b/client/client.lua index 8ae1084..79bd16f 100644 --- a/client/client.lua +++ b/client/client.lua @@ -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) diff --git a/config.lua b/config.lua index 4e2a1cf..bffbff0 100644 --- a/config.lua +++ b/config.lua @@ -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 diff --git a/fxmanifest.lua b/fxmanifest.lua index 72f4d15..79c7cc1 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -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'