This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function saveNewDoor(src, data, doubleDoor) | |
local Player = QBCore.Functions.GetPlayer(src) | |
if not Player then return end | |
local configData = {} | |
local jobs, gangs, cids, items, doorType, identifier | |
if data.job then configData.authorizedJobs = { [data.job] = 0 } jobs = "['"..data.job.."'] = 0" end | |
if data.gang then configData.authorizedGangs = { [data.gang] = 0 } gangs = "['"..data.gang.."'] = 0" end | |
if data.cid then configData.authorizedCitizenIDs = { [data.cid] = true } cids = "['"..data.cid.."'] = true" end | |
if data.item then configData.items = { [data.item] = 1 } items = "['"..data.item.."'] = 1" end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local RunService = game:GetService("RunService") | |
local ContextActionService = game:GetService("ContextActionService") | |
local ReplicatedStorage = game:GetService("ReplicatedStorage") | |
local Controllers = ReplicatedStorage:WaitForChild("Controllers") | |
local HUDController = require(Controllers.Character.HUDController) | |
-- Constants | |
local HEAD_HORIZONTAL_FACTOR = 1 | |
local HEAD_VERTICAL_FACTOR = 0.6 | |
local BODY_HORIZONTAL_FACTOR = 0.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CreateThread(function() | |
--version check with github latest version | |
PerformHttpRequest( | |
"https://raw.githubusercontent.com/[User]/[Repo]/main/fxmanifest.lua", | |
function(err, text, headers) | |
if err ~= 200 then | |
return | |
end | |
local version = GetResourceMetadata(GetCurrentResourceName(), "version") | |
local latestVersion = string.match(text, '%sversion \"(.-)\"') |