tk_drugs

Integration with tk_drugs for our Turf Zones Loylity System.

1

Find Folder in tk_drugs

Find folder: tk_drugs/server/main_editable.lua

2

Replace function

Replace Function:

function SoldDrugs(xPlayer, drugName, amount, price)
    AddItem(xPlayer, Config.Selling.moneyType, price)
end

With this function:

function SoldDrugs(xPlayer, drugName, amount, price)
    AddItem(xPlayer, Config.Selling.moneyType, price)
    
    local id = xPlayer.source or xPlayer.PlayerData.source
    local turfId = exports['op-crime']:getPlayerTurfZone(id)
    if turfId then 
        TriggerEvent('op-crime:drugSold', id, turfId, price)
    end
end

Last updated