feat(esx_property): Translations for Saving Reasons

This commit is contained in:
Mycroft
2022-09-08 21:01:32 +01:00
parent 203b79ef92
commit 465367d38a
2 changed files with 11 additions and 4 deletions
+7
View File
@@ -194,4 +194,11 @@ Locales['en'] = {
["cctv_textui_3"] = "Press ~b~[E]~s~ to Set Max Left Roation",
["create_success"] = "Property created!",
["missing_data"] = "Please Fill Out all Required Inputs!",
-- Saving Translations
["server_restart"] = "Server Restarting",
["server_shutdown"] = "Server Shutdown",
["manual_save"] = "Manual Save (Requested By %s)",
["resource_stop"] = "Resource Stopping",
["interval_saving"] = "Interval Saving"
}
+4 -4
View File
@@ -1092,14 +1092,14 @@ end
--- Save Properties On Server Stop/Restart
AddEventHandler('txAdmin:events:serverShuttingDown', function()
PropertySave("Server Shutdown")
PropertySave(_U("server_shutdown"))
end)
--- Save Properties On Resource Stop/Restart
AddEventHandler('onResourceStop', function(ResourceName)
if ResourceName == GetCurrentResourceName() then
PropertySave("Resource Stopped")
PropertySave(_U("resource_stop"))
end
end)
@@ -1108,10 +1108,10 @@ end)
CreateThread(function()
while true do
Wait(60000 * Config.SaveInterval)
PropertySave("Interval Saving")
PropertySave(_U("interval_save"))
end
end)
ESX.RegisterCommand(_("save_name"), Config.AllowedGroups, function(xPlayer)
PropertySave("Manual Saving (Requested By .. " .. GetPlayerName(xPlayer.source) .. ")")
PropertySave(_U("manual_save", GetPlayerName(xPlayer.source)))
end, false,{help = _U("save_desc")})