🎉 Driving School is released. Read more →
Paid Scripts
Company Manager v5
Integrations
redutzu-mdt

Redutzu MDT

ESX

server/config.lua
        local from = {
            label = 'Police',
            job = 'police',
            identifier = 'police',
        }
        if online then
            local player = ESX.GetPlayerFromIdentifier(identifier)
            TriggerEvent('CompanyManager:server:CreateBill', player.source, tonumber(amount), data.description, nil, 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('CompanyManager:server: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('CompanyManager:server:CreateBill', player.PlayerData.source, tonumber(amount), data.description, nil, 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('CompanyManager:server:CreateOfflineBill', identifier, name, tonumber(amount), data.description, from, creator.source)
        end