feat: esx_property - Real Estate Translations

This commit is contained in:
Mycroft
2022-08-26 17:32:33 +01:00
parent 2a1c51c528
commit 3f079ddb28
2 changed files with 23 additions and 10 deletions
+9 -9
View File
@@ -841,9 +841,9 @@ function OpenPMQuickMenu(Action)
Wait(1500)
ESX.TriggerServerCallback("esx_property:PMenterOffice", function(HasEntered)
if HasEntered then
ESX.ShowNotification("~b~Entering~s~ Office.", "success")
ESX.ShowNotification(_U("enter_office"), "success")
else
ESX.ShowNotification("You ~r~Cannot~s~ Enter This Office!", "error")
ESX.ShowNotification(_U("enter_office_error"), "error")
end
Wait(1500)
DoScreenFadeIn(1500)
@@ -853,9 +853,9 @@ function OpenPMQuickMenu(Action)
Wait(1500)
ESX.TriggerServerCallback("esx_property:PMexitOffice", function(HasExited)
if HasExited then
ESX.ShowNotification("~b~Exiting~s~ Office.", "success")
ESX.ShowNotification(_U("exit_office"), "success")
else
ESX.ShowNotification("You ~r~Cannot~s~ Exit This Office!", "error")
ESX.ShowNotification(_U("exit_office_error"), "error")
end
Wait(1500)
DoScreenFadeIn(1500)
@@ -864,14 +864,14 @@ function OpenPMQuickMenu(Action)
TriggerEvent("esx_property:AdminMenu")
elseif Action == "ActionsMenu" then
local elements = {{unselectable = true, title = "Real Estate Actions", value = "RealEstateActions"}}
local elements = {{unselectable = true, title = _U("actions"), value = "RealEstateActions"}}
if ESX.PlayerData.job.name == PM.job then
if ESX.PlayerData.job.grade >= PM.Permissions.CreateProperty then
elements[#elements + 1] = {title = "Create Property", value = "CreateProperty"}
elements[#elements + 1] = {title = _U("property_create"), value = "CreateProperty"}
end
if ESX.PlayerData.job.grade >= PM.Permissions.ManagePropertiesFromQuickActions then
elements[#elements + 1] = {title = "Manage Properties", value = "manage"}
elements[#elements + 1] = {title = _U("property_manage"), value = "manage"}
end
end
ESX.OpenContext("right", elements, function(menu, element)
@@ -885,7 +885,7 @@ function OpenPMQuickMenu(Action)
end
end
ESX.RegisterInput("realestatequickmenu", "(ESX Property) Open Real Estate Quick Actions", "keyboard", "F5", function()
ESX.RegisterInput(_U("realestate_command"), _U("realestate_command_desc"), "keyboard", "F5", function()
ESX.TriggerServerCallback('esx_property:IsAdmin', function(Access)
if Access then
OpenPMQuickMenu("ActionsMenu")
@@ -914,7 +914,7 @@ CreateThread(function()
if Dist <= 1.5 then
if not PMdrawing[k] then
PMdrawing[k] = true
ESX.TextUI("Press ~b~[E]~s~ to Access ~b~" .. k)
ESX.TextUI(_U("realestate_textui", k))
end
if IsControlJustPressed(0, 38) then
OpenPMQuickMenu(k)
+14 -1
View File
@@ -64,5 +64,18 @@ Locales['en'] = {
["key_management"] = "Key Management",
["key_management_desc"] = "Control Property Access.",
["give_keys"] = "Give Keys",
["remove_keys"] = "Remove Keys"
["remove_keys"] = "Remove Keys",
--------- Real Estate Strings ---------------
["actions"] = "Real Estate Actions",
["property_create"] = "Create Property",
["property_manage"] = "Manage Properties",
["realestate_command"] = "realestatequickmenu",
["realestate_command_desc"] = "(ESX Property) Open Real Estate Quick Actions",
["enter_office"] = "~b~Entering~s~ Office.",
["enter_office_error"] = "You ~r~Cannot~s~ Enter The Office!",
["exit_office"] = "~b~Exiting~s~ Office.",
["exit_office_error"] = "You ~r~Cannot~s~ Exit The Office!",
["realestate_textui"] = "Press ~b~[E]~s~ to Access ~b~%s",
}