Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ local textui = 'ox_lib'
--- @param type string
function ShowNotification(message, type)
if shared.setup.notify == 'ox_lib' then
lib.notify({ description = message, type = type, position = 'top', icon = 'fas fa-fire' })
lib.notify({ description = message, type = type, position = shared.setup.oxlibposition, icon = 'fas fa-fire' })
elseif shared.setup.notify == 'esx' then
ESX.ShowNotification(message)
elseif shared.setup.notify == 'qb' then
Expand Down Expand Up @@ -239,4 +239,4 @@ function SpawnPed(model, position)
SetBlockingOfNonTemporaryEvents(ped, true)
SetEntityInvincible(ped, true)
return ped
end
end
7 changes: 4 additions & 3 deletions client/mining.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ local ores = {}
-- Initialize variable to store inside mine state
local inside = false

-- Localize export
local mining = exports.lation_mining
-- allow rename of resource without breaking
local ResourceName = GetCurrentResourceName()
local mining = exports[ResourceName]

-- Mine an ore
--- @param zoneId number
Expand Down Expand Up @@ -180,4 +181,4 @@ AddEventHandler('onResourceStop', function(resourceName)
end
ores[zoneId] = nil
end
end)
end)
9 changes: 5 additions & 4 deletions client/shops.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ local shared = require 'config.shared'
local client = require 'config.client'
local icons = require 'config.icons'

-- Localize export
local mining = exports.lation_mining
-- allow rename of resource without breaking
local ResourceName = GetCurrentResourceName()
local mining = exports[ResourceName]

-- Initialize table to store shop(s) data
-- .items, .zone, .ped
Expand Down Expand Up @@ -196,7 +197,7 @@ local function createShop()
description = locale('shop-menu.item-desc', itemData.label, math.groupdigits(data.price)),
icon = data.icon or 'fas fa-triangle-exclamation',
iconColor = data.iconColor or '',
image = isPick and 'nui://lation_mining/install/images/'..data.item..'.png' or nil,
image = isPick and 'nui://'..ResourceName..'/install/images/'..data.item..'.png' or nil,
event = 'lation_mining:shops:selectquantity',
args = id
}
Expand Down Expand Up @@ -320,4 +321,4 @@ AddEventHandler('lation_mining:onPlayerLoaded', function()
createBlip(shared.shops.location, shared.shops.blip)
createShop()
createZone()
end)
end)
9 changes: 7 additions & 2 deletions client/smelting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ local client = require 'config.client'
local icons = require 'config.icons'

-- Localize export
local mining = exports.lation_mining

-- local mining = exports.lation_mining

-- allow rename of resource without breaking
local ResourceName = GetCurrentResourceName()
local mining = exports[ResourceName]

-- Initialize table to store smelting menu
local menu = {}
Expand Down Expand Up @@ -173,4 +178,4 @@ AddEventHandler('lation_mining:onPlayerLoaded', function()
})
buildMenu()
createBlip(shared.smelting.coords, shared.smelting.blip)
end)
end)
6 changes: 3 additions & 3 deletions config/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ return {
useWhileDead = false,
canCancel = true,
disable = { car = true, move = true, combat = true },
anim = { dict = 'melee@hatchet@streamed_core', clip = 'plyr_rear_takedown_b', flag = 1 },
prop = { bone = 28422, model = 'prop_tool_pickaxe', pos = vec3(0.09, -0.05, -0.02), rot = vec3(-78.0, 13.0, 28.0) }
anim = { dict = 'amb@world_human_hammering@male@base', clip = 'base', flag = 1 },
prop = { bone = 57005, model = 'prop_tool_pickaxe', pos = vec3(0.10, -0.25, 0.0), rot = vec3(90.0, 0.0, 180.0) }
},
smelting = {
scenario = 'WORLD_HUMAN_STAND_FIRE'
Expand Down Expand Up @@ -40,4 +40,4 @@ return {
-- It is only updated on server restarts & player logouts
leaderboard = true

}
}
4 changes: 3 additions & 1 deletion config/shared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ return {
-- Set your notification system below
-- Available options are: 'ox_lib', 'esx', 'qb', 'okok', 'sd-notify', 'wasabi_notify' & 'custom'
-- 'custom' needs to be added to client/functions.lua
-- only change oxlibposition when you use ox_lib as notify system.
notify = 'ox_lib',
oxlibposition = 'center-right',
-- Set your progress bar system below
-- Available options are: 'ox_lib', 'qbcore' & 'custom'
-- 'custom' needs to be added to client/functions.lua
Expand Down Expand Up @@ -371,4 +373,4 @@ return {
}


}
}
80 changes: 80 additions & 0 deletions locales/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"notify": {
"missing-item": "Mir fehlt etwas, um das zu tun",
"not-experienced": "Ich glaube, ich bin nicht erfahren genug, um das zu tun",
"missing-pickaxe": "Ich brauche eine Spitzhacke, die ich tatsächlich benutzen kann",
"pickaxe-no-durability": "Meine Spitzhacke ist in einem schrecklichen Zustand...",
"nighttime": "Ich glaube nicht, dass ich nachts abbauen darf",
"no-money": "Du hast nicht genug Geld",
"no-item": "Du hast nicht genug von diesem Gegenstand",
"cant-carry": "Du kannst nicht so viel tragen",
"max-ingots": "Du kannst maximal %s Barren auf einmal schmelzen"
},
"target": {
"mine-ore": "Abbauen",
"mine-shop": "Sprechen",
"smelt-ore": "Schmelzen"
},
"textui": {
"smelt": "Schmelzen (%s/%s) - %s%%"
},
"inputs": {
"label": "Menge",
"desc": "Wie viele?"
},
"player-data": {
"level-title": "Bergbau | Level %s/%s",
"level-desc": "Du hast derzeit %sXP",
"stats-title": "Lebenslange Statistiken",
"stats-desc": "Sieh dir deine gesamten Bergbaustatistiken an",
"meta-next-level": "Nächstes Level",
"meta-remainder": "Verbleibend",
"meta-maxed-level": "Maximales Level erreicht"
},
"stats-menu": {
"main-title": "Lebenslange Statistiken",
"mined-title": "Abgebaut",
"mined-desc": "Du hast insgesamt %s Erze abgebaut",
"smelted-title": "Geschmolzen",
"smelted-desc": "Du hast insgesamt %s Barren geschmolzen",
"earned-title": "Verdient",
"earned-desc": "Du hast insgesamt $%s verdient"
},
"mine-menu": {
"main-title": "Die Minen",
"leaderboards-title": "Bestenliste",
"leaderboards-desc": "Sieh dir die Top 10 Bergarbeiter an",
"shop-title": "Der Laden",
"shop-desc": "Kaufe hier deine Bergbauausrüstung",
"pawn-title": "Pfandleihe",
"pawn-desc": "Verkaufe deine Erze & mehr für einen Gewinn"
},
"shop-menu": {
"main-title": "Die Minen: Laden",
"pickaxe-title": "%s | Level %s",
"item-desc": "Kaufe %s für $%s"
},
"pawn-menu": {
"main-title": "Die Minen: Pfandleihe",
"item-title": "Verkaufe %s",
"item-desc": "Verkaufe %s für $%s"
},
"leaderboard-menu": {
"main-title": "Die Minen: Bestenliste",
"player-desc": "Level: %s | XP: %s | Insgesamt abgebaut: %s"
},
"smelt-menu": {
"main-title": "Schmelzen",
"ingot-desc": "Benötigt %s"
},
"logs": {
"mined-title": "Erz abgebaut",
"mined-message": "%s (Kennung: %s) hat einen Felsen für %s abgebaut",
"smelted-title": "Barren geschmolzen",
"smelted-message": "%s (Kennung: %s) hat x%d %s geschmolzen",
"purchased-title": "Ladenkauf",
"purchased-message": "%s (Kennung: %s) hat x%d %s gekauft",
"pawned-title": "Pfandleihe Verkauf",
"pawned-message": "%s (Kennung: %s) hat x%d %s verkauft"
}
}
7 changes: 4 additions & 3 deletions server/mining.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
local shared = require 'config.shared'
local server = require 'config.server'

-- Localize export
local mining = exports.lation_mining
-- allow rename of resource without breaking
local ResourceName = GetCurrentResourceName()
local mining = exports[ResourceName]

-- Initialize table to store ore data
local ores = {}
Expand Down Expand Up @@ -98,4 +99,4 @@ CreateThread(function()
Wait(10000)
end
end
end)
end)
7 changes: 4 additions & 3 deletions server/shops.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
local shared = require 'config.shared'
local server = require 'config.server'

-- Localize export
local mining = exports.lation_mining
-- allow rename of resource without breaking
local ResourceName = GetCurrentResourceName()
local mining = exports[ResourceName]

-- Complete a purchase from The Mines shop
--- @param itemId number
Expand Down Expand Up @@ -94,4 +95,4 @@ RegisterNetEvent('lation_mining:completesale', function(itemId, input)
if server.logs.events.pawned then
PlayerLog(source, locale('logs.pawned-title'), locale('logs.pawned-message', name, identifier, input, item.item))
end
end)
end)
7 changes: 4 additions & 3 deletions server/smelting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
local shared = require 'config.shared'
local server = require 'config.server'

-- Localize export
local mining = exports.lation_mining
-- allow rename of resource without breaking
local ResourceName = GetCurrentResourceName()
local mining = exports[ResourceName]

-- Initialize table to store players
local players = {}
Expand Down Expand Up @@ -70,4 +71,4 @@ RegisterNetEvent('lation_mining:completesmelt', function(ingotId)
if server.logs.events.smelted then
PlayerLog(source, locale('logs.smelted-title'), locale('logs.smelted-message', name, identifier, 1, ingot.name))
end
end)
end)