Skip to content

Commit

Permalink
Merge pull request #717 from bitpredator/dev
Browse files Browse the repository at this point in the history
convert: esx_billing > bpt_billing
  • Loading branch information
bitpredator authored Jun 10, 2024
2 parents 8fb2267 + d8a72f0 commit e926a6f
Show file tree
Hide file tree
Showing 43 changed files with 5,865 additions and 6,933 deletions.
912 changes: 411 additions & 501 deletions server-data/resources/[bpt_addons]/bpt_ambulancejob/client/job.lua

Large diffs are not rendered by default.

686 changes: 312 additions & 374 deletions server-data/resources/[bpt_addons]/bpt_ammujob/client/main.lua

Large diffs are not rendered by default.

681 changes: 308 additions & 373 deletions server-data/resources/[bpt_addons]/bpt_bakerjob/client/main.lua

Large diffs are not rendered by default.

383 changes: 159 additions & 224 deletions server-data/resources/[bpt_addons]/bpt_ballasjob/client/main.lua

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ AddEventHandler("esx:onPlayerSpawn", function(spawn)
end)

AddEventHandler("bpt_status:loaded", function(status)
TriggerEvent("bpt_status:registerStatus", "hunger", 1000000, "#CFAD0F", function()
TriggerEvent("bpt_status:registerStatus", "hunger", 1000000, "#CFAD0F", function(status)
return Config.Visible
end, function()
status.remove(100)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Expand Down Expand Up @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

fxserver-esx_billing
Copyright (C) 2015-2023
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 2024 bitpredator

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
Expand All @@ -645,14 +645,14 @@ the "copyright" line and a pointer to where the full notice is found.
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/>.
along with this program. If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

fxserver-esx_billing Copyright (C) 2015-2023
<program> Copyright (C) 2024 bitpredator
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
Expand All @@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
<https://www.gnu.org/licenses/>.

The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
<https://www.gnu.org/licenses/why-not-lgpl.html>.
19 changes: 19 additions & 0 deletions server-data/resources/[bpt_addons]/bpt_billing/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<h1 align='center'>bpt_billing</a></h1>
<p align='center'><a href='https://discord.gg/ksGfNvDEfq'>Discord</a>

Copyright (C) 2024 bitpredator

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.

ATTENTION:
You are not authorized to change the name of the resource and the resources within it.

If you want to contribute you can open a pull request.

You are not authorized to sell this software (this is free project).

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/.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ CREATE TABLE `billing` (

PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
local isDead = false

function ShowBillsMenu()
ESX.TriggerServerCallback("esx_billing:getBills", function(bills)
ESX.TriggerServerCallback("bpt_billing:getBills", function(bills)
if #bills > 0 then
local elements = {
{ unselectable = true, icon = "fas fa-scroll", title = _U("invoices") },
{ unselectable = true, icon = "fas fa-scroll", title = TranslateCap("invoices") },
}

for _, v in ipairs(bills) do
elements[#elements + 1] = {
icon = "fas fa-scroll",
title = ('%s - <span style="color:red;">%s</span>'):format(v.label, _U("invoices_item", ESX.Math.GroupDigits(v.amount))),
title = ('%s - <span style="color:red;">%s</span>'):format(v.label, TranslateCap("invoices_item", ESX.Math.GroupDigits(v.amount))),
billId = v.id,
}
end

ESX.OpenContext("right", elements, function(_, element)
ESX.TriggerServerCallback("esx_billing:payBill", function()
ESX.OpenContext("right", elements, function(menu, element)
ESX.TriggerServerCallback("bpt_billing:payBill", function()
ShowBillsMenu()
end, element.billId)
end)
else
ESX.ShowNotification(_U("no_invoices"))
ESX.ShowNotification(TranslateCap("no_invoices"))
end
end)
end
Expand All @@ -32,11 +32,11 @@ RegisterCommand("showbills", function()
end
end, false)

RegisterKeyMapping("showbills", _U("keymap_showbills"), "keyboard", "F7")
RegisterKeyMapping("showbills", TranslateCap("keymap_showbills"), "keyboard", "F7")

AddEventHandler("esx:onPlayerDeath", function()
isDead = true
end)
AddEventHandler("esx:onPlayerSpawn", function()
AddEventHandler("esx:onPlayerSpawn", function(spawn)
isDead = false
end)
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fx_version("adamant")

game("gta5")

description("ESX Billing")
description("Allows Players to recieve and Send Bills")
lua54("yes")
version("1.0.0")

Expand Down
Loading

0 comments on commit e926a6f

Please sign in to comment.