Skip to content

Commit

Permalink
Merge pull request #826 from bitpredator/dev
Browse files Browse the repository at this point in the history
chore:  improved code formatting fixed minor errors
  • Loading branch information
bitpredator authored Sep 21, 2024
2 parents 926133c + 51499f3 commit 35c4f5d
Show file tree
Hide file tree
Showing 64 changed files with 5,374 additions and 4,026 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ INSERT INTO `bpt_items` (`name`, `label`) VALUES
('cannabis', 'Cannabis'),
('diamond_tip', 'Diamond tip'),
('diamond', 'Diamond'),
('marijuana_extract', 'Marijuana extract')
('marijuana_extract', 'Marijuana extract'),
('medikit', 'Medikit')
;
102 changes: 70 additions & 32 deletions server-data/resources/[bpt_addons]/bpt_crafting/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,38 @@ Config = {
HideWhenCantCraft = false, -- Instead of lowering the opacity it hides the item that is not craftable due to low level or wrong job

Categories = {
["medical"] = {
Label = "Ospedale",
Image = "bandage",
Jobs = { "ambulance" },
["tools"] = {
Label = "Utensili",
Image = "tools",
Jobs = { "import" },
},
["recycled"] = {
Label = "Riciclo",
Image = "recycled",
Jobs = { "import" },
},
["import"] = {
Label = "Import",
Image = "Import",
["manufacturing"] = {
Label = "Fabbricazione",
Image = "manufacturing",
Jobs = { "import" },
},
["mechanic"] = {
Label = "Meccanico",
Image = "Mechanic",
Jobs = { "mechanic" },
},
["med_equip"] = {
Label = "Med Equip",
Image = "bandage",
Jobs = { "ambulance" },
},
["drugs"] = {
Label = "Droghe",
Image = "drugs",
Jobs = { "ambulance" },
},
["ammu"] = {
Label = "Armeria",
Label = "Armi",
Image = "ammu",
Jobs = { "ammu" },
},
Expand All @@ -45,6 +60,11 @@ Config = {
Image = "fisherman",
Jobs = { "fisherman" },
},
["ammunation"] = {
Label = "Munizioni",
Image = "ammu",
Jobs = { "ammu" },
},
},

PermanentItems = { -- Items that dont get removed when crafting
Expand All @@ -54,7 +74,7 @@ Config = {
Recipes = { -- Enter Item name and then the speed value! The higher the value the more torque
["bandage"] = {
Level = 0,
Category = "medical",
Category = "med_equip",
isGun = false,
Jobs = { "ambulance" },
JobGrades = {},
Expand All @@ -67,9 +87,27 @@ Config = {
},
},

["medikit"] = {
Level = 0,
Category = "med_equip",
isGun = false,
Jobs = { "ambulance" },
JobGrades = {},
Amount = 1,
SuccessRate = 100,
requireBlueprint = false,
Time = 30,
Ingredients = {
["recycled_plastic"] = 2,
["marijuana"] = 5,
["bandage"] = 1,
["cottonforbandages"] = 2,
},
},

["marijuana_extract"] = {
Level = 0,
Category = "medical",
Category = "drugs",
isGun = false,
Jobs = { "ambulance" },
JobGrades = {},
Expand All @@ -86,7 +124,7 @@ Config = {

["marijuana"] = {
Level = 0,
Category = "medical",
Category = "drugs",
isGun = false,
Jobs = { "ambulance" },
JobGrades = {},
Expand All @@ -101,23 +139,23 @@ Config = {
},

["cottonforbandages"] = {
Level = 0, -- From what level this item will be craftable
Category = "import", -- The category item will be put in
isGun = false, -- Specify if this is a gun so it will be added to the loadout
Jobs = { "import" }, -- What jobs can craft this item, leaving {} allows any job
JobGrades = {}, -- What job grades can craft this item, leaving {} allows any grade
Amount = 1, -- The amount that will be crafted
SuccessRate = 100, -- 100% you will recieve the item
requireBlueprint = false, -- Requires a blueprint whitch you need to add in the database yourself TEMPLATE: itemname_blueprint EXAMPLE: bandage_blueprint
Time = 20, -- Time in seconds it takes to craft this item
Ingredients = { -- Ingredients needed to craft this item
["cotton"] = 4, -- item name and count, adding items that dont exist in database will crash the script
Level = 0,
Category = "manufacturing",
isGun = false,
Jobs = { "import" },
JobGrades = {},
Amount = 1,
SuccessRate = 100,
requireBlueprint = false,
Time = 20,
Ingredients = {
["cotton"] = 4,
},
},

["ironsheet"] = {
Level = 0,
Category = "import",
Category = "manufacturing",
isGun = false,
Jobs = { "import" },
JobGrades = {},
Expand All @@ -133,7 +171,7 @@ Config = {

["diamond_tip"] = {
Level = 0,
Category = "import",
Category = "tools",
isGun = false,
Jobs = { "import" },
JobGrades = {},
Expand All @@ -150,7 +188,7 @@ Config = {

["recycled_paper"] = {
Level = 0,
Category = "import",
Category = "recycled",
isGun = false,
Jobs = { "import" },
JobGrades = {},
Expand All @@ -165,7 +203,7 @@ Config = {

["paper"] = {
Level = 0,
Category = "import",
Category = "manufacturing",
isGun = false,
Jobs = { "import" },
JobGrades = {},
Expand All @@ -181,7 +219,7 @@ Config = {

["hammer"] = {
Level = 0,
Category = "import",
Category = "tools",
isGun = false,
Jobs = { "import" },
JobGrades = {},
Expand Down Expand Up @@ -246,7 +284,7 @@ Config = {

["iron"] = {
Level = 0,
Category = "import",
Category = "manufacturing",
isGun = false,
Jobs = { "import" },
JobGrades = {},
Expand Down Expand Up @@ -314,7 +352,7 @@ Config = {
},
["ammo-sniper"] = {
Level = 10,
Category = "ammu",
Category = "ammunation",
isGun = false,
Jobs = { "ammu" },
JobGrades = {},
Expand All @@ -333,7 +371,7 @@ Config = {

["ammo-9"] = {
Level = 10,
Category = "ammu",
Category = "ammunation",
isGun = false,
Jobs = { "ammu" },
JobGrades = {},
Expand Down Expand Up @@ -465,7 +503,7 @@ Config = {

["recycled_plastic"] = {
Level = 0,
Category = "import",
Category = "recycled",
isGun = false,
Jobs = { "import" },
JobGrades = {},
Expand Down Expand Up @@ -500,7 +538,7 @@ Config = {
coords = vector3(311.314301, -565.213196, 43.282104),
jobs = { "ambulance" },
blip = false,
recipes = { "bandage", "marijuana", "marijuana_extract" },
recipes = { "bandage", "marijuana", "marijuana_extract", "medikit" },
radius = 1.0,
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
fx_version("adamant")
version("1.0.1")
version("1.0.2")
game("gta5")

shared_script("@es_extended/imports.lua")
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,6 @@ INSERT INTO `bpt_items` (`name`, `label`) VALUES
('cannabis', 'Cannabis'),
('diamond_tip', 'Punta di diamante'),
('diamond', 'Diamond'),
('marijuana_extract', 'Estratto di marijuana')
('marijuana_extract', 'Estratto di marijuana'),
('medikit', 'Medikit')
;
4 changes: 2 additions & 2 deletions server-data/resources/[bpt_addons]/bpt_pointsell/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Config = {}
Config.Locale = GetConvar("esx:locale", "it")

Config.DealerItems = {
emerald = 200,
diamond = 820,
emerald = 50,
diamond = 150,
}

Config.GiveBlack = true -- give black money? if disabled it'll give regular cash.
Expand Down
1 change: 1 addition & 0 deletions server-data/resources/[esx]/es_extended/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ AddEventHandler("esx:playerLoaded", function(xPlayer, _, skin)
for i = 1, 15 do
EnableDispatchService(i, false)
end
SetAudioFlag('PoliceScannerDisabled', true)
end

-- Disable Scenarios
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ CreateThread(function()
ToggleVehicleStatus(current.vehicle, current.seat)
end
elseif isInVehicle then
if not IsPedInAnyVehicle(playerPed, false) or IsPlayerDead(PlayerId()) then
if (current.vehicle ~= GetVehiclePedIsUsing(playerPed)) or IsPlayerDead(PlayerId()) then
-- bye, vehicle
TriggerEvent("esx:exitedVehicle", current.vehicle, current.plate, current.seat, current.displayName, current.netId)
TriggerServerEvent("esx:exitedVehicle", current.plate, current.seat, current.displayName, current.netId)
Expand Down
10 changes: 8 additions & 2 deletions server-data/resources/[esx]/esx_context/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,20 @@
});
}

const api = {
Open,
Closed,
Close
};

window.addEventListener("message", (e) => {
let data = e.data;

if (!data.func || !window[data.func]) {
if (!data.func || !api.hasOwnProperty(data.func)) {
return;
}

window[data.func](...data.args);
api[data.func](...data.args);
});

window.addEventListener("keydown", (e) => {
Expand Down
13 changes: 1 addition & 12 deletions server-data/resources/[esx_addons]/esx_garage/nui/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,6 @@ $(window).ready(function() {
$('.impounded_content .vehicle-list').empty();
}

// Locales

// needs a rework
// $(".content h2").html(function (i, text) {
// return text.replace("No vehicle in this garage.", data.locales.no_veh_parking);
// });

// $(".impounded_content h2").html(function (i, text) {
// return text.replace("No vehicle impounded.", data.locales.no_veh_impounded);
// });

$('.vehicle-listing').html(function(_i, text) {
return text.replace('Model', data.locales.veh_model);
});
Expand Down Expand Up @@ -232,4 +221,4 @@ $(window).ready(function() {
$('li[data-page="impounded"]').removeClass('selected');
},
);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ RegisterCommand("cutatree", function()
FreezeEntityPosition(PlayerPedId(), true)
Citizen.Wait(3000)

lib.callback("map_lumberjack:makeDamage", false, function(data)
if data then
--print('You made damage')
end
end, closest)
lib.callback("map_lumberjack:makeDamage", false, function(data) end, closest)

FreezeEntityPosition(PlayerPedId(), false)
DeleteObject(axe)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ lib.callback.register("map_lumberjack:duty", function(source)
end)

Citizen.CreateThread(function()
for k, v in pairs(Config.Trees) do
for _, v in pairs(Config.Trees) do
table.insert(trees, {
coords = v,
health = 100,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ function CCTV(PropertyID)
RenderScriptCams(true, false, 1, true, false)
Wait(1000)
DoScreenFadeIn(500)
RequestAmbientAudioBank("Phone_Soundset_Franklin", 0, 0)
RequestAmbientAudioBank("HintCamSounds", 0, 0)
RequestAmbientAudioBank("Phone_Soundset_Franklin", false)
RequestAmbientAudioBank("HintCamSounds", false)
while IsCamActive(cctvcam) do
Wait(5)
DisableAllControlActions(0)
Expand Down Expand Up @@ -209,7 +209,7 @@ function CCTV(PropertyID)
if CamTakePic then
ShowButtons = false
Wait(1)
PlaySoundFrontend(-1, "Camera_Shoot", "Phone_Soundset_Franklin", 1)
PlaySoundFrontend(-1, "Camera_Shoot", "Phone_Soundset_Franklin", true)
ESX.TriggerServerCallback("esx_property:GetWebhook", function(hook)
if hook then
exports["screenshot-basic"]:requestScreenshotUpload(hook, "files[]", function(data)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if Config.Furniture.Enabled then
local inFurniture = false
local CurrentlyEditing = nil

function TempFurniturePlacement(PropertyId, PropName, PropIndex, PropCatagory, PropPrice, Existing, Pos, Heading)
function TempFurniturePlacement(_, PropName, PropIndex, PropCatagory, _, Existing, Pos, Heading)
ESX.CloseContext()
if CurrentlyEditing then
DeleteEntity(CurrentlyEditing)
Expand Down
4 changes: 2 additions & 2 deletions server-data/resources/[esx_addons]/esx_property/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,10 @@ Config.WardrobeInteraction = function(PropertyId, Interaction)
TriggerEvent("skinchanger:getSkin", function(skin)
ESX.TriggerServerCallback("esx_property:getPlayerOutfit", function(clothes)
TriggerEvent("skinchanger:loadClothes", skin, clothes)
TriggerEvent("esx_skin:setLastSkin", skin)
TriggerEvent("fivem-appearance:setLastSkin", skin)

TriggerEvent("skinchanger:getSkin", function(skin)
TriggerServerEvent("esx_skin:save", skin)
TriggerServerEvent("fivem-appearance:save", skin)
end)
end, element.value)
end)
Expand Down
Loading

0 comments on commit 35c4f5d

Please sign in to comment.