diff --git a/resources/[inventory]/qs-inventory/html/images/katzenimpfstoff.png b/resources/[inventory]/qs-inventory/html/images/3-fach_impfung_katze.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/katzenimpfstoff.png rename to resources/[inventory]/qs-inventory/html/images/3-fach_impfung_katze.png diff --git a/resources/[inventory]/qs-inventory/html/images/hundeimpfstoff.png b/resources/[inventory]/qs-inventory/html/images/5-fach_impfung_hund.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/hundeimpfstoff.png rename to resources/[inventory]/qs-inventory/html/images/5-fach_impfung_hund.png diff --git a/resources/[inventory]/qs-inventory/html/images/bloodbag.png b/resources/[inventory]/qs-inventory/html/images/blood_100.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/bloodbag.png rename to resources/[inventory]/qs-inventory/html/images/blood_100.png diff --git a/resources/[inventory]/qs-inventory/html/images/blood_1000.png b/resources/[inventory]/qs-inventory/html/images/blood_1000.png new file mode 100644 index 000000000..d4bd4e0f4 Binary files /dev/null and b/resources/[inventory]/qs-inventory/html/images/blood_1000.png differ diff --git a/resources/[inventory]/qs-inventory/html/images/blood_250.png b/resources/[inventory]/qs-inventory/html/images/blood_250.png new file mode 100644 index 000000000..d4bd4e0f4 Binary files /dev/null and b/resources/[inventory]/qs-inventory/html/images/blood_250.png differ diff --git a/resources/[inventory]/qs-inventory/html/images/blood_500.png b/resources/[inventory]/qs-inventory/html/images/blood_500.png new file mode 100644 index 000000000..d4bd4e0f4 Binary files /dev/null and b/resources/[inventory]/qs-inventory/html/images/blood_500.png differ diff --git a/resources/[inventory]/qs-inventory/html/images/blood_750.png b/resources/[inventory]/qs-inventory/html/images/blood_750.png new file mode 100644 index 000000000..d4bd4e0f4 Binary files /dev/null and b/resources/[inventory]/qs-inventory/html/images/blood_750.png differ diff --git a/resources/[inventory]/qs-inventory/html/images/bubbletea.png b/resources/[inventory]/qs-inventory/html/images/bubble_tea.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/bubbletea.png rename to resources/[inventory]/qs-inventory/html/images/bubble_tea.png diff --git a/resources/[inventory]/qs-inventory/html/images/cola.png b/resources/[inventory]/qs-inventory/html/images/cola.png deleted file mode 100644 index 1d8a39fae..000000000 Binary files a/resources/[inventory]/qs-inventory/html/images/cola.png and /dev/null differ diff --git a/resources/[inventory]/qs-inventory/html/images/lawyerpass.png b/resources/[inventory]/qs-inventory/html/images/doj_card.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/lawyerpass.png rename to resources/[inventory]/qs-inventory/html/images/doj_card.png diff --git a/resources/[inventory]/qs-inventory/html/images/drill.png b/resources/[inventory]/qs-inventory/html/images/drill.png index cdf4fde9c..7e83de005 100644 Binary files a/resources/[inventory]/qs-inventory/html/images/drill.png and b/resources/[inventory]/qs-inventory/html/images/drill.png differ diff --git a/resources/[inventory]/qs-inventory/html/images/ecolabottle.png b/resources/[inventory]/qs-inventory/html/images/ecolabottle.png index 0021e9e65..731010eee 100644 Binary files a/resources/[inventory]/qs-inventory/html/images/ecolabottle.png and b/resources/[inventory]/qs-inventory/html/images/ecolabottle.png differ diff --git a/resources/[inventory]/qs-inventory/html/images/ecolazerocan.png b/resources/[inventory]/qs-inventory/html/images/ecolazerocan.png index 656087cb2..6a7ffdf8c 100644 Binary files a/resources/[inventory]/qs-inventory/html/images/ecolazerocan.png and b/resources/[inventory]/qs-inventory/html/images/ecolazerocan.png differ diff --git a/resources/[inventory]/qs-inventory/html/images/police_drone.png b/resources/[inventory]/qs-inventory/html/images/emergencydrone.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/police_drone.png rename to resources/[inventory]/qs-inventory/html/images/emergencydrone.png diff --git a/resources/[inventory]/qs-inventory/html/images/hotdogdeluxe-removebg-preview.png b/resources/[inventory]/qs-inventory/html/images/hotdog_deluxe.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/hotdogdeluxe-removebg-preview.png rename to resources/[inventory]/qs-inventory/html/images/hotdog_deluxe.png diff --git a/resources/[inventory]/qs-inventory/html/images/idcard.png b/resources/[inventory]/qs-inventory/html/images/idcard.png deleted file mode 100644 index eebb628e4..000000000 Binary files a/resources/[inventory]/qs-inventory/html/images/idcard.png and /dev/null differ diff --git a/resources/[inventory]/qs-inventory/html/images/junkcan.png b/resources/[inventory]/qs-inventory/html/images/junk_energy.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/junkcan.png rename to resources/[inventory]/qs-inventory/html/images/junk_energy.png diff --git a/resources/[inventory]/qs-inventory/html/images/oropax.png b/resources/[inventory]/qs-inventory/html/images/ohrstopsel.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/oropax.png rename to resources/[inventory]/qs-inventory/html/images/ohrstopsel.png diff --git a/resources/[inventory]/qs-inventory/html/images/otangcan.png b/resources/[inventory]/qs-inventory/html/images/orange_o_tang_dose.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/otangcan.png rename to resources/[inventory]/qs-inventory/html/images/orange_o_tang_dose.png diff --git a/resources/[inventory]/qs-inventory/html/images/otangbottle.png b/resources/[inventory]/qs-inventory/html/images/orange_o_tang_flasche.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/otangbottle.png rename to resources/[inventory]/qs-inventory/html/images/orange_o_tang_flasche.png diff --git a/resources/[inventory]/qs-inventory/html/images/ontangcanzero.png b/resources/[inventory]/qs-inventory/html/images/orange_o_tang_zero_dose.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/ontangcanzero.png rename to resources/[inventory]/qs-inventory/html/images/orange_o_tang_zero_dose.png diff --git a/resources/[inventory]/qs-inventory/html/images/otangzerobottle.png b/resources/[inventory]/qs-inventory/html/images/orange_o_tang_zero_flasche.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/otangzerobottle.png rename to resources/[inventory]/qs-inventory/html/images/orange_o_tang_zero_flasche.png diff --git a/resources/[inventory]/qs-inventory/html/images/DI2_police_keycard-removebg-preview.png b/resources/[inventory]/qs-inventory/html/images/pd_keycard.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/DI2_police_keycard-removebg-preview.png rename to resources/[inventory]/qs-inventory/html/images/pd_keycard.png diff --git a/resources/[inventory]/qs-inventory/html/images/idcardpd.png b/resources/[inventory]/qs-inventory/html/images/police_card.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/idcardpd.png rename to resources/[inventory]/qs-inventory/html/images/police_card.png diff --git a/resources/[inventory]/qs-inventory/html/images/gewehrmuni.png b/resources/[inventory]/qs-inventory/html/images/rifel.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/gewehrmuni.png rename to resources/[inventory]/qs-inventory/html/images/rifel.png diff --git a/resources/[inventory]/qs-inventory/html/images/screenshot_403-removebg-preview.png b/resources/[inventory]/qs-inventory/html/images/screenshot_403-removebg-preview.png deleted file mode 100644 index 22945b37c..000000000 Binary files a/resources/[inventory]/qs-inventory/html/images/screenshot_403-removebg-preview.png and /dev/null differ diff --git a/resources/[inventory]/qs-inventory/html/images/screenshot_408-removebg-preview.png b/resources/[inventory]/qs-inventory/html/images/screenshot_408-removebg-preview.png deleted file mode 100644 index 754dbeb20..000000000 Binary files a/resources/[inventory]/qs-inventory/html/images/screenshot_408-removebg-preview.png and /dev/null differ diff --git a/resources/[inventory]/qs-inventory/html/images/snikkel_candy.png b/resources/[inventory]/qs-inventory/html/images/snikkel_candy.png index 78e00bd65..e90996d13 100644 Binary files a/resources/[inventory]/qs-inventory/html/images/snikkel_candy.png and b/resources/[inventory]/qs-inventory/html/images/snikkel_candy.png differ diff --git a/resources/[inventory]/qs-inventory/html/images/snikkelcandy.png b/resources/[inventory]/qs-inventory/html/images/snikkelcandy.png deleted file mode 100644 index e90996d13..000000000 Binary files a/resources/[inventory]/qs-inventory/html/images/snikkelcandy.png and /dev/null differ diff --git a/resources/[inventory]/qs-inventory/html/images/snipermuni.png b/resources/[inventory]/qs-inventory/html/images/snp_ammo.png similarity index 100% rename from resources/[inventory]/qs-inventory/html/images/snipermuni.png rename to resources/[inventory]/qs-inventory/html/images/snp_ammo.png diff --git a/resources/[inventory]/qs-inventory/html/images/weapon_assaultrifle.png b/resources/[inventory]/qs-inventory/html/images/weapon_assaultrifle.png index 52d3739e7..22945b37c 100644 Binary files a/resources/[inventory]/qs-inventory/html/images/weapon_assaultrifle.png and b/resources/[inventory]/qs-inventory/html/images/weapon_assaultrifle.png differ diff --git a/resources/[inventory]/qs-inventory/html/images/weapon_assaultrifle_mk2.png b/resources/[inventory]/qs-inventory/html/images/weapon_assaultrifle_mk2.png deleted file mode 100644 index 1aced8fc5..000000000 Binary files a/resources/[inventory]/qs-inventory/html/images/weapon_assaultrifle_mk2.png and /dev/null differ diff --git a/resources/[inventory]/qs-inventory/html/images/weapon_assaultshotgun.png b/resources/[inventory]/qs-inventory/html/images/weapon_assaultshotgun.png deleted file mode 100644 index f430975b4..000000000 Binary files a/resources/[inventory]/qs-inventory/html/images/weapon_assaultshotgun.png and /dev/null differ diff --git a/resources/[inventory]/qs-inventory/html/images/weapon_combatpdw.png b/resources/[inventory]/qs-inventory/html/images/weapon_combatpdw.png index dbdb15e8f..3dbe56734 100644 Binary files a/resources/[inventory]/qs-inventory/html/images/weapon_combatpdw.png and b/resources/[inventory]/qs-inventory/html/images/weapon_combatpdw.png differ diff --git a/resources/[inventory]/qs-inventory/html/images/weapon_stungun.png b/resources/[inventory]/qs-inventory/html/images/weapon_stungun.png index aeb7b6c2f..754dbeb20 100644 Binary files a/resources/[inventory]/qs-inventory/html/images/weapon_stungun.png and b/resources/[inventory]/qs-inventory/html/images/weapon_stungun.png differ diff --git a/resources/[inventory]/qs-inventory/html/images/zigmpx.png b/resources/[inventory]/qs-inventory/html/images/zigmpx.png deleted file mode 100644 index 3dbe56734..000000000 Binary files a/resources/[inventory]/qs-inventory/html/images/zigmpx.png and /dev/null differ diff --git a/resources/[jobs]/[weapons]/force-sling/server/callbacks.lua b/resources/[jobs]/[weapons]/force-sling/server/callbacks.lua new file mode 100644 index 000000000..71a277c7b --- /dev/null +++ b/resources/[jobs]/[weapons]/force-sling/server/callbacks.lua @@ -0,0 +1,84 @@ +local positions = {} +local presets = {} +local positionsFile = 'positions.json' +local presetsFile = 'presets.json' + +-- Load saved positions from JSON file +local function LoadPositions() + local file = LoadResourceFile(GetCurrentResourceName(), 'json/' .. positionsFile) + if file then + positions = json.decode(file) or {} + end +end + +-- Load saved presets from JSON file +local function LoadPresets() + local file = LoadResourceFile(GetCurrentResourceName(), 'json/' .. presetsFile) + if file then + presets = json.decode(file) or {} + end +end + +-- Save positions to JSON file +local function SavePositions() + SaveResourceFile(GetCurrentResourceName(), 'json/' .. positionsFile, json.encode(positions), -1) +end + +-- Save presets to JSON file +local function SavePresets() + SaveResourceFile(GetCurrentResourceName(), 'json/' .. presetsFile, json.encode(presets), -1) +end + +-- Load data when resource starts +CreateThread(function() + LoadPositions() + LoadPresets() +end) + +lib.callback.register('force-sling:callback:getCachedPositions', function(source) + return positions +end) + +lib.callback.register('force-sling:callback:getCachedPresets', function(source) + return presets +end) + +lib.callback.register('force-sling:callback:isPlayerAdmin', function(source) + local src = source + -- Add your admin check logic here + -- Example for QBCore: + -- local Player = QBCore.Functions.GetPlayer(src) + -- return Player.PlayerData.admin or false + + -- For testing, returning true + return {isAdmin = true} +end) + +lib.callback.register('force-sling:callback:resetWeaponPositions', function(source, weapon) + local src = source + if weapon then + positions[weapon] = nil + else + positions = {} + end + SavePositions() + return positions +end) + +RegisterNetEvent('force-sling:server:saveWeaponPosition', function(position, rotation, weapon, weaponName, boneId, isPreset) + local src = source + local data = { + coords = position, + rot = rotation, + boneId = boneId + } + + if isPreset then + presets[weaponName] = data + SavePresets() + else + positions[weaponName] = data + SavePositions() + end +end) +