Updated 2.1.0

Updated everything to new format, N1K0 is about to work on some more stuff.
This commit is contained in:
Andyyy7666
2022-07-16 04:46:27 +02:00
parent e25da65776
commit 96f89d60ff
37 changed files with 924 additions and 854 deletions

View File

@@ -1,24 +1,24 @@
config = {
maxJailTime = 300, -- Max time in seconds that someone can jail another player for.
maxJailTime = 300, -- Max time in seconds that someone can jail another player.
jailDistance = 90.0, -- How far can the player go from the Jail coordinates. If the player is further than the set amount they will be teleported back.
jailCoords = {x = 1680.21, y = 2513.25, z = 44.56, h = 6.53},
releaseCoords = {x = 1840.22, y = 2608.42, z = 45.58, h = 270.09},
-- Where can players access the UI from.
-- Where can players access it from.
accessLocation = {
{x = -450.17, y = 6012.62, z = 31.71}, -- Paleto Bay Sheriff's Office
{x = 1853.57, y = 3690.74, z = 34.26}, -- Sandy Shores Sheriff's Office
{x = 460.53, y = -988.84, z = 24.91} -- Mission Row PD
},
-- Departments that can access the jail UI.
-- Departments that can access the jail tablet.
accessDepartments = {
"SAHP",
"LSPD",
"BCSO"
},
-- How close the player must be to access the jail UI
-- How close does the player have to be to the coordiantes to be able to open the tablet.
accessDistance = 1.2,
}
}

View File

@@ -1,3 +1,3 @@
server_config = {
discordWebhook = "",
discordWebhook = "https://discord.com/api/webhooks/873744008122335252/zk53XWv0ZfD-BD2Su6VYGPzUgNW0NjLrj7hVBQFVgp_ByO0f0rpMwx7fsNNNjyVp4GUT",
}

View File

@@ -2,7 +2,7 @@
author "Andyyy#7666"
description "ND Framework Jailing"
version "2.0.0"
version "2.1.0"
fx_version "cerulean"
game "gta5"
@@ -20,4 +20,6 @@ client_script "source/client.lua"
server_scripts {
"config_server.lua",
"source/server.lua"
}
}
dependency "ND_Core"

View File

@@ -2,6 +2,7 @@ local display = false
local nearJailingUi = false
local jailTime = 0
local ped
NDCore = exports["ND_Core"]:GetCoreObject()
function SetDisplay(bool)
display = bool
@@ -40,9 +41,9 @@ function drawText3D(coords, text)
end
function hasAccess()
local selectedDepartment = exports["ND_Core"]:getCharacterInfo().department
local job = NDCore.functions:getSelectedCharacter().job
for _, department in pairs(config.accessDepartments) do
if department == selectedDepartment then
if department == job then
return true
end
end

View File

@@ -1,3 +1,6 @@
NDCore = exports["ND_Core"]:GetCoreObject()
NDCore.functions:versionChecker("ND_Jailing", GetCurrentResourceName(), "https://github.com/Andyyy7666/ND_Framework", "https://raw.githubusercontent.com/Andyyy7666/ND_Framework/main/ND_Jailing/fxmanifest.lua")
local jailedPlayers = {}
-- Get player any identifier, available types: steam, license, xbl, ip, discord, live.