Price
UnknownA script by narus
Price
UnknownHello everyone,
I present to you my new script, available on my Tebex Page ==> https://narus.tebex.io
Open Source version ==> Open Source Version ALT-TPE
–==> Youtube Preview <==–
Electronic Payment Terminal Script Compatible with QBCore and ESX
Automatic retrieval of the sender’s job
Display of the UI on the target player for payment validation or rejection
Automatic detection of player balance (if validation of credit on the sender’s company account)
Automatic rejection if insufficient player account, with UI returned to the sender
Configuration (config.lua)-- Lang : fr / en / es /de
Config.Locale = 'fr'
-- Debug mode: enables the /tpe command to open the NUI without a target
Config.Debug = false
-- Framework choice: 'qb' or 'esx'
Config.Framework = 'qb'
-- Item usage: allow opening the TPE via an inventory item (if false ==> TriggerClientEvent('tpe_ui:client:openPayment', source, jobName, jobLabel, source)
Config.UseItem = true
Config.TPEItem = 'tpe'
-- Business parameters
Config.MaxDistance = 3.0 -- max distance to target a player
Config.MaxAmount = 10000000 -- maximum invoice amount
Config.MaxDigits = 10 -- max number of digits on the pad
-- NUI loading screen
Config.Loading = {
Enabled = true, -- enable/disable the loading screen
Duration = 3000, -- duration in milliseconds
}
-- Discord webhook for logs
Config.TPEWebhook = {
Enabled = true, -- enable Discord logging
Url = 'https://discord.com/api/webhooks/…',
username = 'TPE Logger',
avatar_url = 'https://i.imgur.com/AfFp7pu.png',
}
--[[
_________________________________________________________________________________________
If UseItem = false
--== QBCORE ==--
local ply = QBCore.Functions.GetPlayer(src)
if not ply then return end
local jobName = ply.PlayerData.job.name
local jobLabel = ply.PlayerData.job.label
if jobName == 'unemployed' then
return notify(source, L('not_employed'), "error")
end
TriggerClientEvent('tpe_ui:client:openPayment', source, jobName, jobLabel, source)
_________________________________________________________________________________________
--== ESX ==--
local ply = ESX.GetPlayerFromId(src)
if not ply then return end
local job = ply.job or {}
if job.name == 'unemployed' then
return notify(src, L('not_employed'))
end
TriggerClientEvent('tpe_ui:client:openPayment', src, job.name, job.label or job.grade_label or job.name, src)
]]--
Adding the TPE ItemIn your ESX database, run:
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`)
VALUES
('tpe', 'Payment Terminal', 1, 0, 1);
In qb-core/shared/items.lua, add :
tpe = {
name = 'tpe',
label = 'Payment Terminal',
weight = 100,
type = 'item',
image = 'tpe.png',
unique = true,
useable = true,
shouldClose = true,
description = 'Payment Terminal'
},
/tpeis only available when Config.Debug = true.Framework = 'esx', don’t forget to update your items table as shown and restart your server.| Code is accessible | No (config and locales yes) |
| Subscription-based | No |
| Lines (approximately) | 1360 |
| Requirements | oxmysql |
| Support | Yes |
See what others are saying about this script.
Share your experience and help others.