Skip to content

Commit

Permalink
Merge pull request #75 from ItsANoBrainer/dev2
Browse files Browse the repository at this point in the history
[Hotfixes] Defaults and Restrictions
  • Loading branch information
GhzGarage authored Mar 28, 2022
2 parents 5fcb156 + ca13c46 commit 82ce133
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
16 changes: 8 additions & 8 deletions client/cl_bennys.lua
Original file line number Diff line number Diff line change
Expand Up @@ -783,13 +783,13 @@ function EnterLocation(override)
end
elseif override then canEnter = true end

if not canEnter then
if not canEnter then
QBCore.Functions.Notify('You cant do anything here!')
ExitBennys()
return
end
if Config.UseRadial then
exports['qb-radialmenu']:RemoveOption(radialMenuItemId)
if Config.UseRadial then
exports['qb-radialmenu']:RemoveOption(radialMenuItemId)
radialMenuItemId = nil
end

Expand Down Expand Up @@ -964,11 +964,11 @@ CreateThread(function()
CheckForGhostVehicle()
elseif CustomsData['location'] == location and CustomsData['spot'] == _name then
CustomsData = {}
if Config.UseRadial then
exports['qb-radialmenu']:RemoveOption(radialMenuItemId)
if Config.UseRadial then
exports['qb-radialmenu']:RemoveOption(radialMenuItemId)
radialMenuItemId = nil
end

exports['qb-core']:HideText()
end
end)
Expand Down Expand Up @@ -1025,10 +1025,10 @@ RegisterNetEvent("qb-customs:client:purchaseFailed", function()
QBCore.Functions.Notify("Not enough money", "error")
end)

RegisterNetEvent('qb-customs:client:EnterCustoms', function(override, checkRestrictions)
RegisterNetEvent('qb-customs:client:EnterCustoms', function(override)
if not override.coords or not override.heading then override = nil end
if not IsPedInAnyVehicle(PlayerPedId(), false) or isPlyInBennys or (not next(CustomsData) and not override) then return end
if checkRestrictions and next(CustomsData) and not CheckRestrictions(CustomsData.location) then return end
if not override and next(CustomsData) and not CheckRestrictions(CustomsData.location) then return end

EnterLocation(override)
end)
12 changes: 6 additions & 6 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Config.RepairMoneyType = 'cash'
Config.UseRadial = false -- Will use qb-radial menu for entering instead of press E
Config.allowGovPlateIndex = false -- Setting this to true will allow all vehicles to purchase gov plate index "Blue on White #3" (only for emergency vehicles otherwise)

maxVehiclePerformanceUpgrades = -1 -- Set to 0 to have all the upgrades
maxVehiclePerformanceUpgrades = 0 -- | All Upgrades: 0 | No Upgrades: -1 | Can be -1 to 4
vehicleBaseRepairCost = 600
vehicleRepairCostMultiplier = 1

Expand Down Expand Up @@ -95,7 +95,7 @@ vehicleTyreSmokeOptions = {
r = 254,
g = 254,
b = 254
},
},
{
name = "Black Smoke",
r = 1,
Expand Down Expand Up @@ -235,7 +235,7 @@ vehicleNeonOptions = {
-- MAIN COMPONENTS

vehicleCustomisation = {
{category = "Spoiler", id = 0},
{category = "Spoiler", id = 0},
{category = "Front Bumper", id = 1},
{category = "Rear Bumper", id = 2},
{category = "Side Skirt", id = 3},
Expand Down Expand Up @@ -274,8 +274,8 @@ vehicleCustomisation = {
{category = "Fuel Tank", id = 45},
{category = "Window", id = 46},
{category = "Livery", id = 48},
{category = "Horns", id = 14,
{category = "Horns", id = 14,

hornNames = {
{name = "Truck Horn", id = 0},
{name = "Cop Horn", id = 1},
Expand Down Expand Up @@ -414,7 +414,7 @@ vehicleResprayOptions = {
{name = "Ice White", id = 111},
{name = "Frost White", id = 112}
}
},
},
{category = "Metallic", id = 1,
colours = {{name = "Black", id = 0},
{name = "Carbon Black", id = 147},
Expand Down
2 changes: 1 addition & 1 deletion shared/locations.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
horn = true,
turbo = true,
},
drawtextui = { -- background1 and background2 are also valid options for the background gradiant
drawtextui = {
text = "Bennys Motorworks",
},
restrictions = { -- A person must pass ALL the restriction checks. Remove an item below to automatically pass that check.
Expand Down

0 comments on commit 82ce133

Please sign in to comment.