Update // Partysystem

This commit is contained in:
Max 2025-06-15 22:11:42 +02:00
parent 872725e914
commit 5589199c08
80 changed files with 11319 additions and 0 deletions

View file

@ -0,0 +1,117 @@
-- Client & Server
if Config.Framework == 'auto' then
local options = {'qb-core', 'es_extended'}
for _, option in ipairs(options) do
if GetResourceState(option) == 'started' then
Config.Framework = option
break;
end
end
Config.Framework = (Config.Framework == 'auto') and 'standalone' or Config.Framework
end
-- Client & Server
Config.GetFrameworkObject = function()
if Config.Framework == 'esx' or Config.Framework == 'es_extended' then
Config.Core = exports["es_extended"]:getSharedObject();
elseif Config.Framework == 'qbcore' or Config.Framework == 'qb-core' then
Config.Core = exports['qb-core']:GetCoreObject();
elseif Config.Framework == 'standalone' or Config.Framework == '' then
-- Custom function
end
end
if IsDuplicityVersion() then
nPrint = function(source, text)
print('----------------------------')
print('Player: '..GetPlayerIdentifier(source, 0))
print('Action: '..text)
print('----------------------------')
end
Config.GetPlayerFromId = function(source)
if Config.Framework == 'esx' or Config.Framework == 'es_extended' then
return Config.Core.GetPlayerFromId(source);
elseif Config.Framework == 'qbcore' or Config.Framework == 'qb-core' then
return Config.Core.Functions.GetPlayer(source);
elseif Config.Framework == 'standalone' or Config.Framework == '' then
-- Custom function
end
end
Config.GetJob = function(source)
local player = Config.GetPlayerFromId(source)
if Config.Framework == 'esx' or Config.Framework == 'es_extended' then
return player?.getJob()?.name, player?.getJob()?.grade;
elseif Config.Framework == 'qbcore' or Config.Framework == 'qb-core' then
return player?.PlayerData?.job?.name, player?.PlayerData?.job?.grade?.level;
elseif Config.Framework == 'standalone' or Config.Framework == '' then
return 'Uknown', 0;
end
end
Config.IsPlayerAdmin = function(source)
if Config.Framework == 'esx' or Config.Framework == 'es_extended' then
local xPlayer = Config.GetPlayerFromId(source);
local group = xPlayer.getGroup();
if group == 'admin' then
return true;
else
return false;
end
elseif Config.Framework == 'qbcore' or Config.Framework == 'qb-core' then
local permList = Config.Core.Functions.GetPermission(source)
local hasPerms = false
if permList.god then
hasPerms = true
elseif permList.admin then
hasPerms = true
end
return hasPerms;
elseif Config.Framework == 'standalone' or Config.Framework == '' then
local adminList = {
'license:yourlicense123',
}
local identifier = GetPlayerIdentifierByType(source, 'license')
for index, value in ipairs(adminList) do
if identifier == value then
return true;
end
end
return false;
end
end
else
Config.Microphone = function(status) -- Only change this if you are not using PMA-VOICE
if GetResourceState('pma-voice') == 'started' then
if status then
exports["pma-voice"]:overrideProximityRange(100.0, true)
else
exports["pma-voice"]:clearProximityOverride()
end
else
print('You are not using pma-voice, please configure your voice system exports.')
end
end
Config.GetJob = function()
if Config.Framework == 'esx' or Config.Framework == 'es_extended' then
return Config?.Core?.GetPlayerData()?.job?.name, Config?.Core?.GetPlayerData()?.job?.grade;
elseif Config.Framework == 'qbcore' or Config.Framework == 'qb-core' then
return Config?.Core?.Functions?.GetPlayerData()?.job?.name, Config?.Core?.Functions?.GetPlayerData()?.job?.grade?.level;
elseif Config.Framework == 'standalone' or Config.Framework == '' then
return 'Uknown', 0;
end
end
end
-- Client & Server
Config.GetFrameworkObject() -- Get CORE functions

View file

@ -0,0 +1,23 @@
SoundSystem = {
soundExists = function(soundName)
return exports['xsound']:soundExists(soundName)
end,
fadeIn = function(soundName, time, volume)
exports['xsound']:fadeIn(soundName, time, volume)
end,
fadeOut = function(soundName, time)
exports['xsound']:fadeOut(soundName, time)
end,
Destroy = function(soundName)
exports['xsound']:Destroy(soundName)
end,
isPaused = function(soundName)
return exports['xsound']:isPaused(soundName)
end,
getMaxDuration = function(soundName)
return exports['xsound']:getMaxDuration(soundName)
end,
getTimeStamp = function(soundName)
return exports['xsound']:getTimeStamp(soundName)
end,
}

View file

@ -0,0 +1,23 @@
SoundSystem = {
PlayUrlPos = function(source, soundName, url, volume, coords, loop)
exports['xsound']:PlayUrlPos(source, soundName, url, volume, coords, loop)
end,
Distance = function(source, soundName, distance)
exports['xsound']:Distance(source, soundName, distance)
end,
Destroy = function(source, soundName)
exports['xsound']:Destroy(source, soundName)
end,
Resume = function(source, soundName)
exports['xsound']:Resume(source, soundName)
end,
Pause = function(source, soundName)
exports['xsound']:Pause(source, soundName)
end,
setVolume = function(source, soundName, volume)
exports['xsound']:setVolume(source, soundName, volume)
end,
setTimeStamp = function(source, soundName, timestamp)
exports['xsound']:setTimeStamp(source, soundName, timestamp)
end,
}