Skip to content

Commit

Permalink
chore: (bpt_crafting) replace _U with TranslateCap
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Mar 26, 2024
1 parent 5371ee6 commit e697fcd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ CreateThread(function()
for _, v in ipairs(Config.Workbenches) do
local dst = #(coords - v.coords)
if dst < 10 then
DrawText3D(v.coords[1], v.coords[2], v.coords[3] - 0.8, _U("workbench_hologram"))
DrawText3D(v.coords[1], v.coords[2], v.coords[3] - 0.8, TranslateCap("workbench_hologram"))
end
if dst < 2 then
if IsControlJustReleased(0, Keys["E"]) then
Expand All @@ -202,7 +202,7 @@ CreateThread(function()
if open or #v.jobs == 0 then
openWorkbench(v)
else
SendTextMessage(_U("wrong_job"))
SendTextMessage(TranslateCap("wrong_job"))
end
end
end
Expand Down
20 changes: 10 additions & 10 deletions server-data/resources/[bpt_addons]/bpt_crafting/server/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function craft(src, item, retrying)

TriggerClientEvent("bpt_crafting:craftStart", src, item, count)
else
TriggerClientEvent("bpt_crafting:sendMessage", src, _U("not_enough_ingredients"))
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("not_enough_ingredients"))
end
else
if Config.UseLimitSystem then
Expand All @@ -72,10 +72,10 @@ function craft(src, item, retrying)

TriggerClientEvent("bpt_crafting:craftStart", src, item, count)
else
TriggerClientEvent("bpt_crafting:sendMessage", src, _U("not_enough_ingredients"))
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("not_enough_ingredients"))
end
else
TriggerClientEvent("bpt_crafting:sendMessage", src, _U("you_cant_hold_item"))
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("you_cant_hold_item"))
end
else
if xPlayer.canCarryItem(item, count) then
Expand All @@ -86,10 +86,10 @@ function craft(src, item, retrying)

TriggerClientEvent("bpt_crafting:craftStart", src, item, count)
else
TriggerClientEvent("bpt_crafting:sendMessage", src, _U("not_enough_ingredients"))
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("not_enough_ingredients"))
end
else
TriggerClientEvent("bpt_crafting:sendMessage", src, _U("you_cant_hold_item"))
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("you_cant_hold_item"))
end
end
end
Expand All @@ -110,11 +110,11 @@ AddEventHandler("bpt_crafting:itemCrafted", function(item, count)
else
xPlayer.addInventoryItem(item, count)
end
TriggerClientEvent("bpt_crafting:sendMessage", src, _U("item_crafted"))
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("item_crafted"))
giveCraftingLevel(xPlayer.identifier, Config.ExperiancePerCraft)
else
TriggerEvent("bpt_crafting:craft", item)
TriggerClientEvent("bpt_crafting:sendMessage", src, _U("inv_limit_exceed"))
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("inv_limit_exceed"))
end
else
if xPlayer.canCarryItem(item, count) then
Expand All @@ -123,14 +123,14 @@ AddEventHandler("bpt_crafting:itemCrafted", function(item, count)
else
xPlayer.addInventoryItem(item, count)
end
TriggerClientEvent("bpt_crafting:sendMessage", src, _U("item_crafted"))
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("item_crafted"))
giveCraftingLevel(xPlayer.identifier, Config.ExperiancePerCraft)
else
TriggerClientEvent("bpt_crafting:sendMessage", src, _U("inv_limit_exceed"))
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("inv_limit_exceed"))
end
end
else
TriggerClientEvent("bpt_crafting:sendMessage", src, _U("crafting_failed"))
TriggerClientEvent("bpt_crafting:sendMessage", src, TranslateCap("crafting_failed"))
end
end)

Expand Down

0 comments on commit e697fcd

Please sign in to comment.