From 1225b619a18ab54d46597e09909cd688990d68b5 Mon Sep 17 00:00:00 2001
From: bitpredator <67551273+bitpredator@users.noreply.github.com>
Date: Wed, 28 Aug 2024 12:33:25 +0200
Subject: [PATCH 1/3] chore: esx-qalle-jail\client\utils.lua minor fix
---
.../[esx_addons]/esx-qalle-jail/client/utils.lua | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/server-data/resources/[esx_addons]/esx-qalle-jail/client/utils.lua b/server-data/resources/[esx_addons]/esx-qalle-jail/client/utils.lua
index 3c6992ffe..068f6ddc1 100644
--- a/server-data/resources/[esx_addons]/esx-qalle-jail/client/utils.lua
+++ b/server-data/resources/[esx_addons]/esx-qalle-jail/client/utils.lua
@@ -41,13 +41,10 @@ end
function Cutscene()
DoScreenFadeOut(100)
-
Wait(250)
-
- local Male = GetHashKey("mp_m_freemode_01")
-
TriggerEvent("skinchanger:getSkin", function(skin)
- if GetHashKey(GetEntityModel(PlayerPedId())) == Male then
+ local hash = GetEntityModel(PlayerPedId())
+ if hash == "mp_m_freemode_01" then
local clothesSkin = {
["tshirt_1"] = 20,
["tshirt_2"] = 15,
@@ -171,6 +168,6 @@ CreateThread(function()
SetBlipColour(blip, 49)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName("STRING")
- AddTextComponentString("Boilingbroke Penitentiary")
+ AddTextComponentString("Penitentiary")
EndTextCommandSetBlipName(blip)
end)
From 42ee4860feeabcf1d02e1b15881fa98e4b532798 Mon Sep 17 00:00:00 2001
From: bitpredator <67551273+bitpredator@users.noreply.github.com>
Date: Sun, 1 Sep 2024 18:29:01 +0200
Subject: [PATCH 2/3] chore: fixed formatting errors in some functions
---
.../[bpt_addons]/bpt_crafting/client/main.lua | 8 ++++----
.../[bpt_addons]/bpt_crafting/config.lua | 2 +-
.../[bpt_addons]/bpt_crafting/html/script.js | 5 -----
.../[bpt_addons]/bpt_crafting/server/main.lua | 20 +++++++++----------
4 files changed, 15 insertions(+), 20 deletions(-)
diff --git a/server-data/resources/[bpt_addons]/bpt_crafting/client/main.lua b/server-data/resources/[bpt_addons]/bpt_crafting/client/main.lua
index ce383af6d..09107e582 100644
--- a/server-data/resources/[bpt_addons]/bpt_crafting/client/main.lua
+++ b/server-data/resources/[bpt_addons]/bpt_crafting/client/main.lua
@@ -103,7 +103,7 @@ AddEventHandler("esx:setJob", function(j)
grade = j.grade
end)
-function isNearWorkbench()
+function IsNearWorkbench()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local near = false
@@ -126,7 +126,7 @@ CreateThread(function()
while true do
Wait(1000)
if craftingQueue[1] ~= nil then
- if not Config.CraftingStopWithDistance or (Config.CraftingStopWithDistance and isNearWorkbench()) then
+ if not Config.CraftingStopWithDistance or (Config.CraftingStopWithDistance and IsNearWorkbench()) then
craftingQueue[1].time = craftingQueue[1].time - 1
SendNUIMessage({
@@ -145,7 +145,7 @@ CreateThread(function()
end
end)
-function openWorkbench(val)
+function OpenWorkbench(val)
ESX.TriggerServerCallback("bpt_crafting:getXP", function(xp)
SetNuiFocus(true, true)
TriggerScreenblurFadeIn(1000)
@@ -200,7 +200,7 @@ CreateThread(function()
end
if open or #v.jobs == 0 then
- openWorkbench(v)
+ OpenWorkbench(v)
else
ESX.ShowNotification(TranslateCap("wrong_job"))
end
diff --git a/server-data/resources/[bpt_addons]/bpt_crafting/config.lua b/server-data/resources/[bpt_addons]/bpt_crafting/config.lua
index b3af09502..b206d20cb 100644
--- a/server-data/resources/[bpt_addons]/bpt_crafting/config.lua
+++ b/server-data/resources/[bpt_addons]/bpt_crafting/config.lua
@@ -173,7 +173,7 @@ Config = {
requireBlueprint = false,
Time = 60,
Ingredients = {
- ["iron"] = 4,
+ ["iron"] = 2,
["wood"] = 1,
},
},
diff --git a/server-data/resources/[bpt_addons]/bpt_crafting/html/script.js b/server-data/resources/[bpt_addons]/bpt_crafting/html/script.js
index f072ebe04..798891071 100644
--- a/server-data/resources/[bpt_addons]/bpt_crafting/html/script.js
+++ b/server-data/resources/[bpt_addons]/bpt_crafting/html/script.js
@@ -1,4 +1,3 @@
-// eslint-disable-next-line no-unused-vars
let timeout;
let opened;
let recipes;
@@ -102,7 +101,6 @@ function openCategory() {
}
-// eslint-disable-next-line no-unused-vars
function openCrafting(t) {
$('#main').html('');
@@ -287,7 +285,6 @@ function addToQueue(item, time, id) {
}
-// eslint-disable-next-line no-unused-vars
function craft(t) {
const item = t.dataset.item;
$.post('https://bpt_crafting/craft', JSON.stringify({
@@ -299,11 +296,9 @@ function setProgress(p) {
const prog = (398 / 100) * p;
$('#u136').animate({
width: prog,
- // eslint-disable-next-line no-empty-function
}, 500, function() {});
}
-// eslint-disable-next-line no-unused-vars
function inspect(t) {
if (opened != t) {
opened = t;
diff --git a/server-data/resources/[bpt_addons]/bpt_crafting/server/main.lua b/server-data/resources/[bpt_addons]/bpt_crafting/server/main.lua
index 7b0b1b3f3..c9b521d2f 100644
--- a/server-data/resources/[bpt_addons]/bpt_crafting/server/main.lua
+++ b/server-data/resources/[bpt_addons]/bpt_crafting/server/main.lua
@@ -1,5 +1,5 @@
ESX = exports["es_extended"]:getSharedObject()
-function setCraftingLevel(identifier, level)
+function SetCraftingLevel(identifier, level)
MySQL.Async.execute(
"UPDATE `users` SET `crafting_level`= @xp WHERE `identifier` = @identifier",
{ ["@xp"] = level, ["@identifier"] = identifier },
@@ -7,7 +7,7 @@ function setCraftingLevel(identifier, level)
)
end
-function getCraftingLevel(identifier)
+function GetCraftingLevel(identifier)
return tonumber(
MySQL.Sync.fetchScalar(
"SELECT `crafting_level` FROM users WHERE identifier = @identifier ",
@@ -16,7 +16,7 @@ function getCraftingLevel(identifier)
)
end
-function giveCraftingLevel(identifier, level)
+function GiveCraftingLevel(identifier, level)
MySQL.Async.execute(
"UPDATE `users` SET `crafting_level`= `crafting_level` + @xp WHERE `identifier` = @identifier",
{ ["@xp"] = level, ["@identifier"] = identifier },
@@ -26,15 +26,15 @@ end
RegisterServerEvent("bpt_crafting:setExperiance")
AddEventHandler("bpt_crafting:setExperiance", function(identifier, xp)
- setCraftingLevel(identifier, xp)
+ SetCraftingLevel(identifier, xp)
end)
RegisterServerEvent("bpt_crafting:giveExperiance")
AddEventHandler("bpt_crafting:giveExperiance", function(identifier, xp)
- giveCraftingLevel(identifier, xp)
+ GiveCraftingLevel(identifier, xp)
end)
-function craft(src, item, retrying)
+function Craft(src, item, retrying)
local xPlayer = ESX.GetPlayerFromId(src)
local cancraft = true
@@ -111,7 +111,7 @@ AddEventHandler("bpt_crafting:itemCrafted", function(item, count)
xPlayer.addInventoryItem(item, count)
end
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("item_crafted"))
- giveCraftingLevel(xPlayer.identifier, Config.ExperiancePerCraft)
+ GiveCraftingLevel(xPlayer.identifier, Config.ExperiancePerCraft)
else
TriggerEvent("bpt_crafting:craft", item)
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("inv_limit_exceed"))
@@ -124,7 +124,7 @@ AddEventHandler("bpt_crafting:itemCrafted", function(item, count)
xPlayer.addInventoryItem(item, count)
end
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("item_crafted"))
- giveCraftingLevel(xPlayer.identifier, Config.ExperiancePerCraft)
+ GiveCraftingLevel(xPlayer.identifier, Config.ExperiancePerCraft)
else
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("inv_limit_exceed"))
end
@@ -137,13 +137,13 @@ end)
RegisterServerEvent("bpt_crafting:craft")
AddEventHandler("bpt_crafting:craft", function(item, retrying)
local src = source
- craft(src, item, retrying)
+ Craft(src, item, retrying)
end)
ESX.RegisterServerCallback("bpt_crafting:getXP", function(source, cb)
local xPlayer = ESX.GetPlayerFromId(source)
- cb(getCraftingLevel(xPlayer.identifier))
+ cb(GetCraftingLevel(xPlayer.identifier))
end)
ESX.RegisterServerCallback("bpt_crafting:getItemNames", function(_, cb)
From dc97d77018113f2051298793a80e4376773d616b Mon Sep 17 00:00:00 2001
From: bitpredator <67551273+bitpredator@users.noreply.github.com>
Date: Sun, 1 Sep 2024 19:59:26 +0200
Subject: [PATCH 3/3] chore: always make the ped visible
---
.../bpt_ambulancejob/client/vehicle.lua | 6 +--
.../[bpt_addons]/bpt_boat/client/main.lua | 4 +-
.../bpt_carshowroom/client/main.lua | 4 +-
.../bpt_policejob/client/vehicle.lua | 6 +--
.../[esx]/esx_multicharacter/client/main.lua | 4 +-
.../[esx_addons]/esx_property/client/cctv.lua | 4 +-
.../esx_vehicleshop/client/main.lua | 39 +++++++------------
.../esx_vehicleshop/server/main.lua | 9 ++---
8 files changed, 31 insertions(+), 45 deletions(-)
diff --git a/server-data/resources/[bpt_addons]/bpt_ambulancejob/client/vehicle.lua b/server-data/resources/[bpt_addons]/bpt_ambulancejob/client/vehicle.lua
index c307c01ae..f2d80ff0b 100644
--- a/server-data/resources/[bpt_addons]/bpt_ambulancejob/client/vehicle.lua
+++ b/server-data/resources/[bpt_addons]/bpt_ambulancejob/client/vehicle.lua
@@ -232,7 +232,7 @@ function OpenShopMenu(elements, restoreCoords, shopCoords)
DeleteSpawnedVehicles()
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
ESX.Game.Teleport(playerPed, restoreCoords)
elseif element3.value == "buy" then
@@ -249,7 +249,7 @@ function OpenShopMenu(elements, restoreCoords, shopCoords)
ESX.CloseContext()
DeleteSpawnedVehicles()
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
ESX.Game.Teleport(playerPed, restoreCoords)
else
@@ -264,7 +264,7 @@ function OpenShopMenu(elements, restoreCoords, shopCoords)
DeleteSpawnedVehicles()
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
ESX.Game.Teleport(playerPed, restoreCoords)
end)
diff --git a/server-data/resources/[bpt_addons]/bpt_boat/client/main.lua b/server-data/resources/[bpt_addons]/bpt_boat/client/main.lua
index 78034c446..8c4588d48 100644
--- a/server-data/resources/[bpt_addons]/bpt_boat/client/main.lua
+++ b/server-data/resources/[bpt_addons]/bpt_boat/client/main.lua
@@ -64,7 +64,7 @@ function OpenBoatShop(shop)
CurrentActionMsg = TranslateCap("boat_shop_open")
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
SetEntityCoords(playerPed, shop.Outside.x, shop.Outside.y, shop.Outside.z)
else
ESX.ShowNotification(TranslateCap("boat_shop_nomoney"))
@@ -235,7 +235,7 @@ function reset(shop)
CurrentActionMsg = TranslateCap("boat_shop_open")
DeleteSpawnedVehicles()
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
SetEntityCoords(playerPed, shop.Outside.x, shop.Outside.y, shop.Outside.z)
ESX.CloseContext()
end
diff --git a/server-data/resources/[bpt_addons]/bpt_carshowroom/client/main.lua b/server-data/resources/[bpt_addons]/bpt_carshowroom/client/main.lua
index b2d4ce7e1..c35b43b3c 100644
--- a/server-data/resources/[bpt_addons]/bpt_carshowroom/client/main.lua
+++ b/server-data/resources/[bpt_addons]/bpt_carshowroom/client/main.lua
@@ -143,7 +143,7 @@ function OpenShopMenu()
local playerPed = PlayerPedId()
FreezeEntityPosition(playerPed, true)
- SetEntityVisible(playerPed, false)
+ SetEntityVisible(PlayerPedId(), true, true)
SetEntityCoords(playerPed, Config.Zones.ShopInside.Pos.x, Config.Zones.ShopInside.Pos.y, Config.Zones.ShopInside.Pos.z)
local vehiclesByCategory = {}
@@ -226,7 +226,7 @@ function OpenShopMenu()
FreezeEntityPosition(playerPed, false)
SetEntityCoords(playerPed, Config.Zones.Katalog.Pos.x, Config.Zones.Katalog.Pos.y, Config.Zones.Katalog.Pos.z)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
IsInShopMenu = false
end, function(data, menu)
diff --git a/server-data/resources/[bpt_addons]/bpt_policejob/client/vehicle.lua b/server-data/resources/[bpt_addons]/bpt_policejob/client/vehicle.lua
index 8033a3e26..c3502ae8d 100644
--- a/server-data/resources/[bpt_addons]/bpt_policejob/client/vehicle.lua
+++ b/server-data/resources/[bpt_addons]/bpt_policejob/client/vehicle.lua
@@ -236,7 +236,7 @@ function OpenShopMenu(elements, restoreCoords, shopCoords)
DeleteSpawnedVehicles()
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
ESX.Game.Teleport(playerPed, restoreCoords)
elseif element3.value == "buy" then
@@ -253,7 +253,7 @@ function OpenShopMenu(elements, restoreCoords, shopCoords)
ESX.CloseContext()
DeleteSpawnedVehicles()
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
ESX.Game.Teleport(playerPed, restoreCoords)
else
@@ -268,7 +268,7 @@ function OpenShopMenu(elements, restoreCoords, shopCoords)
DeleteSpawnedVehicles()
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
ESX.Game.Teleport(playerPed, restoreCoords)
end)
diff --git a/server-data/resources/[esx]/esx_multicharacter/client/main.lua b/server-data/resources/[esx]/esx_multicharacter/client/main.lua
index 5aa172654..612f2c67d 100644
--- a/server-data/resources/[esx]/esx_multicharacter/client/main.lua
+++ b/server-data/resources/[esx]/esx_multicharacter/client/main.lua
@@ -56,7 +56,7 @@ if ESX.GetConfig().Multichar then
for i = 1, #keys do
EnableControlAction(0, keys[i], true)
end
- SetEntityVisible(PlayerPedId(), 0, 0)
+ SetEntityVisible(PlayerPedId(), true, true)
SetLocalPlayerVisibleLocally(1)
SetPlayerInvincible(PlayerId(), 1)
ThefeedHideThisFrame()
@@ -72,7 +72,7 @@ if ESX.GetConfig().Multichar then
end
local playerId, playerPed = PlayerId(), PlayerPedId()
MumbleSetVolumeOverride(playerId, -1.0)
- SetEntityVisible(playerPed, 1, 0)
+ SetEntityVisible(PlayerPedId(), true, true)
SetPlayerInvincible(playerId, 0)
FreezeEntityPosition(playerPed, false)
Wait(10000)
diff --git a/server-data/resources/[esx_addons]/esx_property/client/cctv.lua b/server-data/resources/[esx_addons]/esx_property/client/cctv.lua
index 9a3003396..1680de982 100644
--- a/server-data/resources/[esx_addons]/esx_property/client/cctv.lua
+++ b/server-data/resources/[esx_addons]/esx_property/client/cctv.lua
@@ -92,7 +92,7 @@ function CCTV(PropertyID)
FreezeEntityPosition(playerPed, true)
SetEntityCollision(playerPed, false, true)
local ShowButtons = true
- SetEntityVisible(playerPed, false)
+ SetEntityVisible(PlayerPedId(), true, true)
SetTimecycleModifierStrength(2.0)
SetFocusArea(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z, 0.0, 0.0, 0.0)
PointCamAtCoord(cctvcam, vector3(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z + Config.CCTV.HeightAboveDoor))
@@ -246,7 +246,7 @@ function CCTV(PropertyID)
SetSeethrough(false)
SetEntityCollision(playerPed, true, true)
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
Wait(1500)
DoScreenFadeIn(1000)
end
diff --git a/server-data/resources/[esx_addons]/esx_vehicleshop/client/main.lua b/server-data/resources/[esx_addons]/esx_vehicleshop/client/main.lua
index 846745e87..a5ba64e9b 100644
--- a/server-data/resources/[esx_addons]/esx_vehicleshop/client/main.lua
+++ b/server-data/resources/[esx_addons]/esx_vehicleshop/client/main.lua
@@ -2,7 +2,7 @@ local HasAlreadyEnteredMarker, IsInShopMenu = false, false
local CurrentAction, CurrentActionMsg, LastZone, currentDisplayVehicle, CurrentVehicleData
local CurrentActionData, Vehicles, Categories = {}, {}, {}
-function getVehicleFromModel(model)
+function GetVehicleFromModel(model)
for i = 1, #Vehicles do
local vehicle = Vehicles[i]
if vehicle.model == model then
@@ -11,7 +11,7 @@ function getVehicleFromModel(model)
end
end
-function getVehicles()
+function GetVehicles()
ESX.TriggerServerCallback("esx_vehicleshop:getCategories", function(categories)
Categories = categories
end)
@@ -21,7 +21,7 @@ function getVehicles()
end)
end
-AddEventHandler("onResourceStart", getVehicles)
+AddEventHandler("onResourceStart", GetVehicles)
function PlayerManagement()
if not Config.EnablePlayerManagement then
@@ -59,7 +59,7 @@ end)
RegisterNetEvent("esx:setJob")
AddEventHandler("esx:setJob", function()
PlayerManagement()
- getVehicles()
+ GetVehicles()
end)
function DeleteDisplayVehicleInsideShop()
@@ -84,7 +84,7 @@ function ReturnVehicleProvider()
for _, v in ipairs(vehicles) do
local returnPrice = ESX.Math.Round(v.price * 0.75)
- local vehicleLabel = getVehicleFromModel(v.vehicle).name
+ local vehicleLabel = GetVehicleFromModel(v.vehicle).name
table.insert(elements, {
label = ('%s [%s]'):format(vehicleLabel, TranslateCap("generic_shopitem", ESX.Math.GroupDigits(returnPrice))),
@@ -133,7 +133,7 @@ function OpenShopMenu()
local playerPed = PlayerPedId()
FreezeEntityPosition(playerPed, true)
- SetEntityVisible(playerPed, false)
+ SetEntityVisible(PlayerPedId(), true, true)
SetEntityCoords(playerPed, Config.Zones.ShopInside.Pos)
local vehiclesByCategory = {}
@@ -213,7 +213,7 @@ function OpenShopMenu()
local playerPed = PlayerPedId()
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
SetEntityCoords(playerPed, Config.Zones.ShopEntering.Pos)
menu2.close()
@@ -233,7 +233,7 @@ function OpenShopMenu()
menu.close()
DeleteDisplayVehicleInsideShop()
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
else
ESX.ShowNotification(TranslateCap("not_enough_money"))
end
@@ -255,7 +255,7 @@ function OpenShopMenu()
CurrentActionData = {}
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
SetEntityCoords(playerPed, Config.Zones.ShopEntering.Pos)
IsInShopMenu = false
@@ -439,7 +439,7 @@ function OpenPopVehicleMenu()
local elements = {}
for _, v in ipairs(vehicles) do
- local vehicleLabel = getVehicleFromModel(v.vehicle).name
+ local vehicleLabel = GetVehicleFromModel(v.vehicle).name
table.insert(elements, {
label = ('%s [MSRP %s]'):format(vehicleLabel, TranslateCap("generic_shopitem", ESX.Math.GroupDigits(v.price))),
@@ -476,7 +476,7 @@ function OpenRentedVehiclesMenu()
local elements = {}
for _, v in ipairs(vehicles) do
- local vehicleLabel = getVehicleFromModel(v.name).label
+ local vehicleLabel = GetVehicleFromModel(v.name).label
table.insert(elements, {
label = ('%s: %s - %s'):format(v.playerName, vehicleLabel, v.plate),
@@ -724,7 +724,7 @@ AddEventHandler("onResourceStop", function(resource)
local playerPed = PlayerPedId()
FreezeEntityPosition(playerPed, false)
- SetEntityVisible(playerPed, true)
+ SetEntityVisible(PlayerPedId(), true, true)
SetEntityCoords(playerPed, Config.Zones.ShopEntering.Pos)
end
@@ -732,19 +732,6 @@ AddEventHandler("onResourceStop", function(resource)
end
end)
-if Config.EnablePlayerManagement then
- RegisterNetEvent("esx_phone:loaded")
- AddEventHandler("esx_phone:loaded", function(phoneNumber, contacts)
- local specialContact = {
- name = TranslateCap("dealership"),
- number = "cardealer",
- base64Icon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADMzMzszM0M0M0w0M1Q1M101M2U2M242M3Y3M383Moc4MpA4Mpg5MqE5Mqk6MrI6Mro7Mrw8Mr89M71DML5EO8I+NMU/NcBMLshANctBNs5CN8RULMddKsheKs9YLtBCONZEOdlFOtxGO99HPNhMNsplKM1nKM1uJtRhLddiLt5kMNJwJ9B2JNR/IeNIPeVJPehKPuRQOuhSO+lZOOlhNuloM+p3Lep/KupwMMFORsVYUcplXc1waNJ7delUSepgVexrYe12bdeHH9iIH9qQHd2YG+udH+OEJeuGJ+uOJeuVIuChGeSpF+aqGOykHOysGeeyFeuzFuyzFuq6E+27FO+Cee3CEdaGgdqTjvCNhfKYkvOkngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJezdycAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4xLjb9TgnoAAAQGElEQVR4Xt2d+WMUtxXHbS6bEGMPMcQQ04aEUnqYo9xJWvC6kAKmQLM2rdn//9+g0uir2Tl0PElPszP7+cnH7Fj6rPTeG2lmv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AGazk8mkMyL2J5OTWZ89L/ny5f+yiDXCPYKoAQAAAABJRU5ErkJggg==",
- }
-
- TriggerEvent("esx_phone:addSpecialContact", specialContact.name, specialContact.number, specialContact.base64Icon)
- end)
-end
-
-- Create Blips
CreateThread(function()
if Config.Blip.show then
@@ -866,4 +853,4 @@ end)
if ESX.PlayerLoaded then
PlayerManagement()
end
-getVehicles()
+GetVehicles()
diff --git a/server-data/resources/[esx_addons]/esx_vehicleshop/server/main.lua b/server-data/resources/[esx_addons]/esx_vehicleshop/server/main.lua
index 9fba37f77..ff8bc6ab8 100644
--- a/server-data/resources/[esx_addons]/esx_vehicleshop/server/main.lua
+++ b/server-data/resources/[esx_addons]/esx_vehicleshop/server/main.lua
@@ -1,6 +1,5 @@
local categories, vehicles = {}, {}
-TriggerEvent("esx_phone:registerNumber", "cardealer", TranslateCap("dealer_customers"), false, false)
TriggerEvent("bpt_society:registerSociety", "cardealer", TranslateCap("car_dealer"), "society_cardealer", "society_cardealer", "society_cardealer", {
type = "private",
})
@@ -32,7 +31,7 @@ function SQLVehiclesAndCategories()
vehicles = MySQL.query.await("SELECT vehicles.*, vehicle_categories.label AS categoryLabel FROM vehicles JOIN vehicle_categories ON vehicles.category = vehicle_categories.name")
end
-function getVehicleFromModel(model)
+function GetVehicleFromModel(model)
for i = 1, #vehicles do
local vehicle = vehicles[i]
if vehicle.model == model then
@@ -148,7 +147,7 @@ end)
ESX.RegisterServerCallback("esx_vehicleshop:buyVehicle", function(source, cb, model, plate)
local xPlayer = ESX.GetPlayerFromId(source)
- local modelPrice = getVehicleFromModel(model).price
+ local modelPrice = GetVehicleFromModel(model).price
if modelPrice and xPlayer.getMoney() >= modelPrice then
xPlayer.removeMoney(modelPrice, "Vehicle Purchase")
@@ -178,7 +177,7 @@ ESX.RegisterServerCallback("esx_vehicleshop:buyCarDealerVehicle", function(sourc
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer.job.name == "cardealer" then
- local modelPrice = getVehicleFromModel(model).price
+ local modelPrice = GetVehicleFromModel(model).price
if modelPrice then
TriggerEvent("bpt_addonaccount:getSharedAccount", "society_cardealer", function(account)
@@ -209,7 +208,7 @@ AddEventHandler("esx_vehicleshop:returnProvider", function(vehicleModel)
if rowsChanged == 1 then
TriggerEvent("bpt_addonaccount:getSharedAccount", "society_cardealer", function(account)
local price = ESX.Math.Round(result.price * 0.75)
- local vehicleLabel = getVehicleFromModel(vehicleModel).name
+ local vehicleLabel = GetVehicleFromModel(vehicleModel).name
account.addMoney(price)
xPlayer.showNotification(TranslateCap("vehicle_sold_for", vehicleLabel, ESX.Math.GroupDigits(price)))