mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
Group digits
This commit is contained in:
+2
-2
@@ -275,7 +275,7 @@ function OpenPropertyMenu(property)
|
||||
{
|
||||
title = property.label,
|
||||
align = 'top-left',
|
||||
elements = elements,
|
||||
elements = elements
|
||||
}, function(data, menu)
|
||||
menu.close()
|
||||
|
||||
@@ -387,7 +387,7 @@ function OpenGatewayAvailablePropertiesMenu(property)
|
||||
for i=1, #gatewayProperties, 1 do
|
||||
if not PropertyIsOwned(gatewayProperties[i]) then
|
||||
table.insert(elements, {
|
||||
label = gatewayProperties[i].label .. ' $' .. gatewayProperties[i].price,
|
||||
label = gatewayProperties[i].label .. ' $' .. ESX.Math.GroupDigits(gatewayProperties[i].price),
|
||||
value = gatewayProperties[i].name,
|
||||
price = gatewayProperties[i].price
|
||||
})
|
||||
|
||||
+5
-4
@@ -24,9 +24,9 @@ function SetPropertyOwned(name, price, rented, owner)
|
||||
TriggerClientEvent('esx_property:setPropertyOwned', xPlayer.source, name, true)
|
||||
|
||||
if rented then
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('rented_for', price))
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('rented_for', ESX.Math.GroupDigits(price)))
|
||||
else
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('purchased_for', price))
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('purchased_for', ESX.Math.GroupDigits(price)))
|
||||
end
|
||||
end
|
||||
end)
|
||||
@@ -155,8 +155,9 @@ RegisterServerEvent('esx_property:rentProperty')
|
||||
AddEventHandler('esx_property:rentProperty', function(propertyName)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
local property = GetProperty(propertyName)
|
||||
local rent = ESX.Math.Round(property.price / 200)
|
||||
|
||||
SetPropertyOwned(propertyName, property.price / 200, true, xPlayer.identifier)
|
||||
SetPropertyOwned(propertyName, rent, true, xPlayer.identifier)
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx_property:buyProperty')
|
||||
@@ -428,7 +429,7 @@ function PayRent(d, h, m)
|
||||
-- message player if connected
|
||||
if xPlayer ~= nil then
|
||||
xPlayer.removeAccountMoney('bank', result[i].price)
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('paid_rent', result[i].price))
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('paid_rent', ESX.Math.GroupDigits(result[i].price)))
|
||||
else -- pay rent either way
|
||||
MySQL.Sync.execute('UPDATE users SET bank = bank - @bank WHERE identifier = @identifier',
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user