lunar_drugscreator

Integration with lunar_drugscreator for our Turf Zones Loylity System. This integration has been created by our Customer: Awkward (206743186570346496)

1

Find Folder

Find foler: lunar_drugscreator/config/sv_edit.lua

2

Find Function

Find function called Editable.onRetailSale and replace it with this code:

function Editable.onRetailSale(player, itemName, amount, price)
    local Player = QBCore.Functions.GetPlayer(player.source)
    if not Player then return end

    local total = amount * price
    local turfId = exports['op-crime']:getPlayerTurfZone(player.source)
    if turfId then
        TriggerEvent('op-crime:drugSold', player.source, turfId, total)
    end

    print(('[DrugsCreator] %s sold %dx %s for %d black_money items'):format(
        Player.PlayerData.citizenid, amount, itemName, total
    ))
end

Last updated