mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
feat(esx_property): Translations for Saving Reasons
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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")})
|
||||
|
||||
Reference in New Issue
Block a user