π±Envi Trap Phone
Integration with Envi Trap Phone is easy! Follow the step-by-step guide to get started!
Replace the first function in envi-trap-phone/server/open_functions.lua:
function OnDrugSaleServer(source)
if Config.Debug then print('OnDrugSaleServer') end
-- SERVER-SIDE FUNCTION if you want to add additional things for a completed drug sale, such as adding integration with another Gang/Rep System
local increase = 10
local gangID = exports['cb-gangsystem']:GetGangID(source)
if gangID ~= nil then
local ped = GetPlayerPed(source)
local coords = GetEntityCoords(ped)
local zone = exports['cb-gangsystem']:GetGangZoneByCoords(coords)
exports["cb-gangsystem"]:AddLoyaltyToZone(gangID, zone, increase)
exports["cb-gangsystem"]:IncreasePrevalence(gangID, 1)
end
endLast updated