Skip to main content

Redutzu MDT

ESX​

server/config.lua
        local from = {
label = 'Police',
job = 'police',
identifier = 'police',
}
if online then
local player = ESX.GetPlayerFromIdentifier(identifier)
TriggerEvent('bill:createBill', player.source, tonumber(amount), data.description, from, creator.source)
else
local name
for i = 1, #data.players do
if data.players[i].identifier == identifier then
name = data.players[i].firstname .. ' ' .. data.players[i].lastname
end
end
TriggerEvent('bill:createOfflineBill', identifier, name, tonumber(amount), data.description, from,
creator.source)
end

QBCore​

server/config.lua
        local from = {
label = 'Police',
job = 'police',
identifier = 'police',
}
if online then
local player = QBCore.Functions.GetPlayerByCitizenId(identifier)
TriggerEvent('bill:createBill', player.PlayerData.source, tonumber(amount), data.description, from, creator.source)
else
local name
for i = 1, #data.players do
if data.players[i].identifier == identifier then
name = data.players[i].firstname .. ' ' .. data.players[i].lastname
end
end
TriggerEvent('bill:createOfflineBill', identifier, name, tonumber(amount), data.description, from,
creator.source)
end