From 0d79792399e1b4c42a7dc38ad62d2ae756e854dc Mon Sep 17 00:00:00 2001 From: Douth <47131318+douth-c@users.noreply.github.com> Date: Mon, 25 Apr 2022 13:04:50 -0500 Subject: [PATCH 1/4] feat(client): load effect --- [esx]/esx_loadingscreen/client/client.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 [esx]/esx_loadingscreen/client/client.lua diff --git a/[esx]/esx_loadingscreen/client/client.lua b/[esx]/esx_loadingscreen/client/client.lua new file mode 100644 index 00000000..2aac97be --- /dev/null +++ b/[esx]/esx_loadingscreen/client/client.lua @@ -0,0 +1,13 @@ +local ClientLoadESX = false + +AddEventHandler("playerSpawned", function () + if not ClientLoadESX then + ShutDownLoadingScreenNui() + ClientLoadESX = true + if Config.Fade then + DoScreenFadeOut(0) + Wait(3000) + DoScreenFadeIn(2500) + end + end +end) \ No newline at end of file From f334aeabc416f3b050d8178c50aa11d7cfb4bcbc Mon Sep 17 00:00:00 2001 From: Douth <47131318+douth-c@users.noreply.github.com> Date: Mon, 25 Apr 2022 13:05:04 -0500 Subject: [PATCH 2/4] feat: config file --- [esx]/esx_loadingscreen/config.lua | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 [esx]/esx_loadingscreen/config.lua diff --git a/[esx]/esx_loadingscreen/config.lua b/[esx]/esx_loadingscreen/config.lua new file mode 100644 index 00000000..67f639b2 --- /dev/null +++ b/[esx]/esx_loadingscreen/config.lua @@ -0,0 +1,3 @@ +Config = {} + +Config.Fade = true \ No newline at end of file From 9866960b4b89d0fbd193c4cafd65c0675f6d6c19 Mon Sep 17 00:00:00 2001 From: Douth <47131318+douth-c@users.noreply.github.com> Date: Mon, 25 Apr 2022 13:05:24 -0500 Subject: [PATCH 3/4] fix(fxmanifest): directory update --- [esx]/esx_loadingscreen/fxmanifest.lua | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/[esx]/esx_loadingscreen/fxmanifest.lua b/[esx]/esx_loadingscreen/fxmanifest.lua index 6604cbaa..b36d6bdd 100644 --- a/[esx]/esx_loadingscreen/fxmanifest.lua +++ b/[esx]/esx_loadingscreen/fxmanifest.lua @@ -1,17 +1,20 @@ +game 'common' +version '1.3.0' fx_version 'cerulean' -games { 'gta5' } - author 'ESX-Framework' -version '1.2.0' loadscreen 'index.html' -loadscreen_manual_shutdown 'yes' -client_script 'client.lua' + +shared_script 'config.lua' + +loadscreen_manual_shutdown "yes" + +client_script 'client/client.lua' files { + 'index.html', './vid/*.mp4', './vid/*.webm', './js/index.js', - './css/index.css', - 'index.html', -} + './css/index.css' +} \ No newline at end of file From 44a95f19163e827e595bf3ef3de252e81ac3de4c Mon Sep 17 00:00:00 2001 From: Douth <47131318+douth-c@users.noreply.github.com> Date: Mon, 25 Apr 2022 13:15:12 -0500 Subject: [PATCH 4/4] refractor(loadingscreen): "D" -> "d" --- [esx]/esx_loadingscreen/client/client.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[esx]/esx_loadingscreen/client/client.lua b/[esx]/esx_loadingscreen/client/client.lua index 2aac97be..62125c3b 100644 --- a/[esx]/esx_loadingscreen/client/client.lua +++ b/[esx]/esx_loadingscreen/client/client.lua @@ -2,7 +2,7 @@ local ClientLoadESX = false AddEventHandler("playerSpawned", function () if not ClientLoadESX then - ShutDownLoadingScreenNui() + ShutdownLoadingScreenNui() ClientLoadESX = true if Config.Fade then DoScreenFadeOut(0)