visualz_selldrugs

Integration of our Turf Zone system with visualz_selldrugs script!

1

Find Server-Side folder

Go to visualz_selldrugs/server/functions.lua

2

Add Code Snippet

You have to replace function SellDrugEvent with our:

function SellDrugEvent(source, drug, price, amount, zone)
  --local xPlayer = ESX.GetPlayerFromId(source)
  --exports["visualz_zones"]:AddPoints(xPlayer, zone, price * amount, drug)
  local turfId = exports['op-crime']:getPlayerTurfZone(source)
  if turfId then 
      TriggerEvent('op-crime:drugSold', source, turfId, price * amount)
  end
end
3

File After Editing

File should look like this:

Last updated