mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 17:28:53 +00:00
feat: esx_property: serversided key strings
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
Locales['en'] = {
|
||||
|
||||
--- CCTV Strings ------
|
||||
|
||||
["take_picture"] = "Take Picture",
|
||||
["rot_left_right"] = "Left/Right",
|
||||
["rot_up_down"] = "Up/Down",
|
||||
@@ -44,5 +46,14 @@ Locales['en'] = {
|
||||
["furni_reset_success"] = "Furniture Reset!",
|
||||
["furni_cannot_afford"] = "You Cannot Afford Todo this!",
|
||||
["furni_reset_error"] = "You ~r~Cannot~s~ Reset This Property!",
|
||||
["furni_management"] = "Manage Furniture"
|
||||
["furni_management"] = "Manage Furniture",
|
||||
|
||||
--------- Key Strings ---------------
|
||||
|
||||
["you_granted"] = 'You Have Been Granted Keys To ~b~%s~s~.',
|
||||
["already_has"] = "This Player Already Has Keys!",
|
||||
["do_not_own"] = 'You do ~r~not~s~ own this property.',
|
||||
["key_revoked"] = 'Your Key Access To ~b~%s~s~. Has Been ~r~Revoked~s~',
|
||||
["no_keys"] = "This Player Does Not Have Keys!"
|
||||
|
||||
}
|
||||
@@ -805,15 +805,15 @@ ESX.RegisterServerCallback('esx_property:GiveKey', function(source, cb, property
|
||||
local id = xTarget.identifier
|
||||
if not Properties[property].Keys[id] then
|
||||
Property.Keys[id] = {name = xTarget.getName(), identifier = id}
|
||||
xTarget.showNotification('You Have Been Granted Keys To ~b~' .. Property.Name .. '~s~.', 'success')
|
||||
xTarget.showNotification(_U("you_granted", Property.Name), 'success')
|
||||
xTarget.triggerEvent("esx_property:giveKeyAccess")
|
||||
cb(true)
|
||||
else
|
||||
xPlayer.showNotification('This Player Already Has Keys To ~b~' .. Property.Name .. '~s~.', 'error')
|
||||
xPlayer.showNotification(_U("already_has"), 'error')
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
xPlayer.showNotification('You do ~r~not~s~ own this property.', 'error')
|
||||
xPlayer.showNotification(_U("do_not_own"), 'error')
|
||||
cb(false)
|
||||
end
|
||||
Log("Property Key Given", 3640511,
|
||||
@@ -902,18 +902,18 @@ ESX.RegisterServerCallback('esx_property:RemoveKey', function(source, cb, proper
|
||||
{{name = "**Property Name**", value = Property.Name, inline = true}, {name = "**Owner**", value = xPlayer.getName(), inline = true},
|
||||
{name = "**Removed From**", value = tostring(Properties[property].Keys[player].name), inline = true}}, 3)
|
||||
Properties[property].Keys[player] = nil
|
||||
xTarget.showNotification('Your Key Access To ~b~' .. Property.Name .. '~s~. Has Been ~r~Revoked~s~', 'error')
|
||||
xTarget.showNotification(_U("key_revoked", Property.Name), 'error')
|
||||
xTarget.triggerEvent("esx_property:RemoveKeyAccess", property)
|
||||
cb(true)
|
||||
else
|
||||
xPlayer.showNotification('This Player Does Not Have Keys To ~b~' .. Property.Name .. '~s~.', 'error')
|
||||
xPlayer.showNotification(_U("no_keys"), 'error')
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
xPlayer.showNotification('You do ~r~not~s~ own this property.', 'error')
|
||||
xPlayer.showNotification(_U("do_not_own"), 'error')
|
||||
cb(false)
|
||||
end
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user