mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 17:58:54 +00:00
Minor string formatting improvements
This commit is contained in:
@@ -1,30 +1,54 @@
|
||||
# esx_billing
|
||||
|
||||
[INSTALLATION]
|
||||
## Download & Installation
|
||||
|
||||
1) CD in your resources/[esx] folder
|
||||
2) Clone the repository
|
||||
### Using [fvm](https://github.com/qlaffont/fvm-installer)
|
||||
```
|
||||
git clone https://github.com/FXServer-ESX/fxserver-esx_billing esx_billing
|
||||
fvm install --save --folder=esx esx-org/esx_billing
|
||||
```
|
||||
3) Import `esx_billing.sql` in your database
|
||||
4) Add this in your `server.cfg`:
|
||||
|
||||
### Using Git
|
||||
```
|
||||
cd resources
|
||||
git clone https://github.com/ESX-Org/esx_billing [esx]/esx_billing
|
||||
```
|
||||
|
||||
### Manually
|
||||
- Download https://github.com/ESX-Org/esx_billing/archive/master.zip
|
||||
- Put it in the `[esx]` directory
|
||||
|
||||
|
||||
## Installation
|
||||
- Import `esx_billing.sql` in your database
|
||||
- Add this in your server.cfg :
|
||||
|
||||
```
|
||||
start esx_billing
|
||||
```
|
||||
|
||||
[USAGE]
|
||||
## Usage
|
||||
|
||||
Press `[F7]` To show billing menu
|
||||
Press `[F7]` To show the billing menu
|
||||
|
||||
```
|
||||
```lua
|
||||
local amount = 100
|
||||
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
|
||||
|
||||
if closestPlayer == -1 or closestDistance > 3.0 then
|
||||
ESX.ShowNotification('There\'s no players nearby!')
|
||||
ESX.ShowNotification('There\'s no players nearby!')
|
||||
else
|
||||
TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_taxi', 'Taxi', amount)
|
||||
TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_taxi', 'Taxi', amount)
|
||||
end
|
||||
```
|
||||
|
||||
# Legal
|
||||
### License
|
||||
esx_billing - billing for ESX
|
||||
|
||||
Copyright (C) 2015-2018 Jérémie N'gadi
|
||||
|
||||
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.
|
||||
|
||||
This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.
|
||||
|
||||
You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/.
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
Config = {}
|
||||
Config.Locale = 'sv'
|
||||
Config.Locale = 'fr'
|
||||
|
||||
+9
-10
@@ -1,14 +1,13 @@
|
||||
USE `essentialmode`;
|
||||
|
||||
CREATE TABLE `billing` (
|
||||
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`identifier` varchar(255) NOT NULL,
|
||||
`sender` varchar(255) NOT NULL,
|
||||
`target_type` varchar(50) NOT NULL,
|
||||
`target` varchar(255) NOT NULL,
|
||||
`label` varchar(255) NOT NULL,
|
||||
`amount` int(11) NOT NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`identifier` varchar(255) NOT NULL,
|
||||
`sender` varchar(255) NOT NULL,
|
||||
`target_type` varchar(50) NOT NULL,
|
||||
`target` varchar(255) NOT NULL,
|
||||
`label` varchar(255) NOT NULL,
|
||||
`amount` int(11) NOT NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
+2
-4
@@ -1,9 +1,7 @@
|
||||
Locales['br'] = {
|
||||
|
||||
['invoices'] = 'Faturas',
|
||||
['received_invoice'] = 'Você ~r~recebeu~s~ uma fatura',
|
||||
['paid_invoice'] = 'Você ~g~pagou~s~ uma fatura de ~r~$',
|
||||
['received_payment'] = 'Você ~g~recebeu~s~ um pagamento de ~r~$',
|
||||
['paid_invoice'] = 'Você ~g~pagou~s~ uma fatura de ~r~$%s~s~',
|
||||
['received_payment'] = 'Você ~g~recebeu~s~ um pagamento de ~r~$%s~s~',
|
||||
['player_not_logged'] = 'O jogador não está logado',
|
||||
|
||||
}
|
||||
|
||||
+2
-4
@@ -1,9 +1,7 @@
|
||||
Locales['de'] = {
|
||||
|
||||
['invoices'] = 'Rechnungen',
|
||||
['received_invoice'] = 'you hast eine Rechnung ~r~erhlaten~s~',
|
||||
['paid_invoice'] = 'du ~g~bezahlst~s~ eine Rechnung von ~r~$',
|
||||
['received_payment'] = 'du ~g~erhältst~s~ eine Zahlung von ~r~$',
|
||||
['paid_invoice'] = 'du ~g~bezahlst~s~ eine Rechnung von ~r~$%s~s~',
|
||||
['received_payment'] = 'du ~g~erhältst~s~ eine Zahlung von ~r~$%s~s~',
|
||||
['player_not_logged'] = 'der Spieler ist nicht online',
|
||||
|
||||
}
|
||||
|
||||
+3
-4
@@ -1,10 +1,9 @@
|
||||
Locales['en'] = {
|
||||
['invoices'] = 'invoices',
|
||||
['received_invoice'] = 'you have just ~r~received~s~ an invoice',
|
||||
['paid_invoice'] = 'you ~g~paid~s~ an invoice of ~r~$',
|
||||
['received_payment'] = 'you ~g~received~s~ a payment of ~r~$',
|
||||
['paid_invoice'] = 'you ~g~paid~s~ an invoice of ~r~$%s~s~',
|
||||
['received_payment'] = 'you ~g~received~s~ a payment of ~r~$%s~s~',
|
||||
['player_not_logged'] = 'the player is not logged in',
|
||||
['no_money'] = 'you do not have enough money to pay this bill',
|
||||
['target_no_money'] = 'The player ~r~does not~w~ have enough money to pay the bill!',
|
||||
['negative_bill'] = 'You cannot send negative bills!'
|
||||
['target_no_money'] = 'the player ~r~does not~w~ have enough money to pay the bill!',
|
||||
}
|
||||
|
||||
+2
-3
@@ -1,8 +1,7 @@
|
||||
Locales['es'] = {
|
||||
|
||||
['invoices'] = 'Facturas',
|
||||
['received_invoice'] = 'Has ~r~recibido~s~ una multa',
|
||||
['paid_invoice'] = 'Has ~g~pagado~s~ una multa de ~r~€',
|
||||
['received_payment'] = 'Has ~g~recibido~s~ un pago de ~g~€',
|
||||
['paid_invoice'] = 'Has ~g~pagado~s~ una multa de ~r~€%s~s~',
|
||||
['received_payment'] = 'Has ~g~recibido~s~ un pago de ~g~€%s~s~',
|
||||
['player_not_logged'] = 'El jugador no está conectado',
|
||||
}
|
||||
|
||||
+2
-4
@@ -1,9 +1,7 @@
|
||||
Locales['fr'] = {
|
||||
|
||||
['invoices'] = 'factures',
|
||||
['received_invoice'] = 'vous avez ~r~reçu~s~ une facture',
|
||||
['paid_invoice'] = 'vous avez ~g~payé~s~ une facture de ~r~$',
|
||||
['received_payment'] = 'vous avez ~g~reçu~s~ un paiement de ~g~$',
|
||||
['paid_invoice'] = 'vous avez ~g~payé~s~ une facture de ~r~$%s~s~',
|
||||
['received_payment'] = 'vous avez ~g~reçu~s~ un paiement de ~g~$%s~s~',
|
||||
['player_not_logged'] = 'le joueur n\'est pas connecté',
|
||||
|
||||
}
|
||||
|
||||
+2
-3
@@ -1,10 +1,9 @@
|
||||
Locales['sv'] = {
|
||||
['invoices'] = 'räkningar',
|
||||
['received_invoice'] = 'du har ~y~mottagit~s~ en räkning',
|
||||
['paid_invoice'] = 'du ~y~betalade~w~ precis en räkning på ~g~$',
|
||||
['received_payment'] = 'du har ~y~mottagit~w~ en räkning på ~g~$',
|
||||
['paid_invoice'] = 'du ~y~betalade~w~ precis en räkning på ~g~$%s~s~',
|
||||
['received_payment'] = 'du har ~y~mottagit~w~ en räkning på ~g~$%s~s~',
|
||||
['player_not_logged'] = 'spelaren är inte online',
|
||||
['no_money'] = 'du har ~r~inte råd~w~ för att kunna betala räkningen',
|
||||
['target_no_money'] = 'Spelaren har ~r~inte råd~w~ för att betala räkningen',
|
||||
['negative_bill'] = 'Du kan inte skicka negativa räkningar!'
|
||||
}
|
||||
|
||||
+4
-5
@@ -13,7 +13,6 @@ AddEventHandler('esx_billing:sendBill', function(playerId, sharedAccountName, la
|
||||
|
||||
if amount < 0 then
|
||||
print('esx_billing: ' .. GetPlayerName(_source) .. ' tried sending a negative bill!')
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('negative_bill'))
|
||||
elseif account == nil then
|
||||
|
||||
for i=1, #xPlayers, 1 do
|
||||
@@ -149,8 +148,8 @@ ESX.RegisterServerCallback('esx_billing:payBill', function(source, cb, id)
|
||||
xPlayer.removeMoney(amount)
|
||||
foundPlayer.addMoney(amount)
|
||||
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('paid_invoice') .. amount)
|
||||
TriggerClientEvent('esx:showNotification', foundPlayer.source, _U('received_payment') .. amount)
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('paid_invoice', amount))
|
||||
TriggerClientEvent('esx:showNotification', foundPlayer.source, _U('received_payment', amount))
|
||||
|
||||
cb()
|
||||
|
||||
@@ -175,9 +174,9 @@ ESX.RegisterServerCallback('esx_billing:payBill', function(source, cb, id)
|
||||
function(rowsChanged)
|
||||
xPlayer.removeMoney(amount)
|
||||
account.addMoney(amount)
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('paid_invoice') .. amount)
|
||||
TriggerClientEvent('esx:showNotification', xPlayer.source, _U('paid_invoice', amount))
|
||||
if foundPlayer ~= nil then
|
||||
TriggerClientEvent('esx:showNotification', foundPlayer.source, _U('received_payment') .. amount)
|
||||
TriggerClientEvent('esx:showNotification', foundPlayer.source, _U('received_payment', amount))
|
||||
end
|
||||
cb()
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user