diff --git a/config.lua b/config.lua index 01213a1..927a33a 100644 --- a/config.lua +++ b/config.lua @@ -1,6 +1,6 @@ ------------------------------------------------------------ --- Guardian- A Simple FiveM Script, Made By Jordan.#2139 -- ------------------------------------------------------------ +-------------------------------------------------------------------------------------------- +-- Guardian- A Far More Advanced FiveM Script Than DiscordWhitelist, Made By Jordan.#2139 -- +-------------------------------------------------------------------------------------------- ------------------------------------------------------- -- CONFIG YOUR PERIPHERALS HERE! -- @@ -9,7 +9,8 @@ Config = { DiscordYeet = 'Sorry but this server reqiures you to have Discord (Desktop Edition) to play. Please restart FiveM and Discord if it is already open!', -- Message to client if their discord cannot be found by the script WhitelistYeet = 'Sorry but this is a whitelisted community if you would like to join please see our website- WEBSITE to apply!', -- Message to client if they are not whitelisted RoleIdsYeet = 'Sorry but I could not find your role ID\'s please reconnect and if this persists please contact the server developer!', -WhitelistRoles = { -- Roles that you assigned in Badgers API that should pass the whitelist +ServerName = 'New Orleans Roleplay', +WhitelistRoles = { -- Roles that you assigned in Badgers API that should pass the whitelist, ALSO Make sure that **each** role ends with a comma! "Whitelisted", "MaybeWhitelisted", "ScrewItMakeThis", @@ -17,4 +18,4 @@ WhitelistRoles = { -- Roles that you assigned in Badgers API that should pass th } -------------------------- -- ^^^ DO THAT HERE ^^^ -- --------------------------- \ No newline at end of file +-------------------------- diff --git a/server.lua b/server.lua index 68a8e92..237451e 100644 --- a/server.lua +++ b/server.lua @@ -1,6 +1,6 @@ ------------------------------------------------------------ --- Guardian- A Simple FiveM Script, Made By Jordan.#2139 -- ------------------------------------------------------------ +-------------------------------------------------------------------------------------------- +-- Guardian- A Far More Advanced FiveM Script Than DiscordWhitelist, Made By Jordan.#2139 -- +-------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- -- !WARNING! !WARNING! !WARNING! !WARNING! !WARNING! -- @@ -31,7 +31,7 @@ AddEventHandler("playerConnecting", function(name, setCallback, deferrals) deferrals.defer() local src = source local identifierDiscord = ""; - deferrals.update("Checking Whitelist Permissions") + deferrals.update("Checking Whitelist Permissions For " Config.ServerName) Citizen.Wait(0); -- Necessary Citizen.Wait() before deferrals.done() @@ -48,6 +48,7 @@ AddEventHandler("playerConnecting", function(name, setCallback, deferrals) for j = 1, #roleIDs do if exports.Badger_Discord_API:CheckEqual(roleList[i], roleIDs[j]) then print("[Guardian] (playerConnecting) Allowing " .. GetPlayerName(src) .. " to join with the role " .. roleList[i]) + print("[Guardian] (playerConnecting) Player " .. GetPlayerName(src) .. " Attempted to connect with Guardian, They were allowed entry") isWhitelisted = true; else if isWhitelisted == false then @@ -58,12 +59,14 @@ AddEventHandler("playerConnecting", function(name, setCallback, deferrals) end else print("[Guardian] (playerConnecting) Player " .. GetPlayerName(src) .. " Could not connect because role id\'s were not present") + print("[Guardian] (playerConnecting) Player " .. GetPlayerName(src) .. " Attempted to connect with Guardian, however they failed") deferrals.done(Config.RoleIdsYeet) CancelEvent() return; end else print("[Guardian] (playerConnecting) Declined connection from " .. GetPlayerName(src) .. " because they did not have Discord open") + print("[Guardian] (playerConnecting) Player " .. GetPlayerName(src) .. " Attempted to connect with Guardian, however they failed") deferrals.done(Config.DiscordYeet) CancelEvent() return; diff --git a/version_check.lua b/version_check.lua index 67bf77f..9730c78 100644 --- a/version_check.lua +++ b/version_check.lua @@ -1,6 +1,6 @@ ------------------------------------------------------------ --- Guardian- A Simple FiveM Script, Made By Jordan.#2139 -- ------------------------------------------------------------ +-------------------------------------------------------------------------------------------- +-- Guardian- A Far More Advanced FiveM Script Than DiscordWhitelist, Made By Jordan.#2139 -- +-------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------- -- !WARNING! !WARNING! !WARNING! !WARNING! !WARNING! -- -- DO NOT TOUCH THIS FILE OR YOU /WILL/ FUCK SHIT UP! EDIT THE CONFIG.LUA --