diff --git a/server/cocaine.lua b/server/cocaine.lua index 2d4e97a..6115b3d 100644 --- a/server/cocaine.lua +++ b/server/cocaine.lua @@ -15,6 +15,7 @@ function CaneCooldown(loc) GlobalState.CocaPlant = Config.CocaPlant Wait(1000) TriggerClientEvent('coke:respawnCane', -1, loc) + Log('Coca Plant Respawned At ' .. Config.CocaPlant[loc].location, 'coke') end) end @@ -30,6 +31,7 @@ AddEventHandler("coke:pickupCane", function(loc) CaneCooldown(loc) local Player = QBCore.Functions.GetPlayer(source) AddItem('coca_leaf', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked A Coca Leaf With a distance of ' .. dist(source, playerPed, Config.CocaPlant[loc].location) .. ' vectors', 'coke') end end) @@ -43,14 +45,27 @@ RegisterServerEvent('md-drugs:server:makepowder', function(num) if Config.TierSystem then local coke = Player.PlayerData.metadata['coke'] if coke <= Config.Tier1 then - if RemoveItem("coca_leaf", 1) then AddItem("coke", 1) end + if RemoveItem("coca_leaf", 1) then + AddItem("coke", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Raw Coke' .. dist(source, playerPed, Config.MakePowder[num]['loc']) .. ' vectors', 'coke') + end elseif coke >= Config.Tier1 and coke <= Config.Tier2 then - if RemoveItem("coca_leaf", 1) then AddItem("cokestagetwo", 1) end + if RemoveItem("coca_leaf", 1) then + AddItem("cokestagetwo", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Raw Coke tier 2' .. dist(source, playerPed, Config.MakePowder[num]['loc']) .. ' vectors', 'coke') + end + else - if RemoveItem("coca_leaf", 1) then AddItem("cokestagethree", 1) end + if RemoveItem("coca_leaf", 1) then + AddItem("cokestagethree", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Raw Coke tier 3' .. dist(source, playerPed, Config.MakePowder[num]['loc']) .. ' vectors', 'coke') + end end else - if RemoveItem("coca_leaf", 1) then AddItem("coke", 1) end + if RemoveItem("coca_leaf", 1) then + AddItem("coke", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Raw Coke' .. dist(source, playerPed, Config.MakePowder[num]['loc']) .. ' vectors', 'coke') + end end end) @@ -65,16 +80,19 @@ RegisterServerEvent('md-drugs:server:cutcokeone', function() local coke3 = Player.Functions.GetItemByName('cokestagethree') if coke then RemoveItem('coke', 1 ) - RemoveItem('bakingsoda', 1 ) - AddItem('loosecoke', 1) + RemoveItem('bakingsoda', 1 ) + AddItem('loosecoke', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Coke', 'coke') elseif coke2 then RemoveItem('cokestagetwo', 1 ) RemoveItem('bakingsoda', 1 ) AddItem('loosecokestagetwo', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Coke tier 2', 'coke') elseif coke3 then RemoveItem('cokestagethree', 1 ) RemoveItem('bakingsoda', 1 ) AddItem('loosecokestagethree', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Coke tier 3', 'coke') else Notifys(Lang.Coke.nocutcoke, "error") end @@ -82,6 +100,7 @@ RegisterServerEvent('md-drugs:server:cutcokeone', function() if RemoveItem('coke', 1 ) then RemoveItem('bakingsoda', 1 ) AddItem('loosecoke', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Coke', 'coke') else Notifys(Lang.Coke.nocutcoke, "error") end @@ -102,16 +121,19 @@ RegisterServerEvent('md-drugs:server:bagcoke', function() RemoveItem('empty_weed_bag', 1) AddItem('cokebaggy', 1) Player.Functions.SetMetaData('coke', (coke + 1)) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Coke and now has a rep of ' .. coke + 1, 'coke') elseif locoke2 then RemoveItem('loosecokestagetwo', 1 ) RemoveItem('empty_weed_bag', 1) AddItem('cokebaggystagetwo', 1) Player.Functions.SetMetaData('coke', (coke + 1)) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Coke tier 2 and now has a rep of ' .. coke + 1, 'coke') elseif locoke3 then RemoveItem('loosecokestagethree', 1 ) RemoveItem('empty_weed_bag', 1) AddItem('cokebaggystagethree', 1) Player.Functions.SetMetaData('coke', (coke + 1)) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Coke tier 3 and now has a rep of ' .. coke + 1, 'coke') else Notifys(Lang.Coke.nobagcoke, "error") end @@ -119,6 +141,7 @@ RegisterServerEvent('md-drugs:server:bagcoke', function() if RemoveItem('loosecoke', 1 ) then RemoveItem('empty_weed_bag', 1) AddItem('cokebaggy', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Coke', 'coke') else Notifys(Lang.Coke.nobagcoke, "error") end diff --git a/server/consumables.lua b/server/consumables.lua index 2960d63..ac7618e 100644 --- a/server/consumables.lua +++ b/server/consumables.lua @@ -17,6 +17,7 @@ RegisterNetEvent('md-drugs:server:removeconsum', function(item) local src = source local Player = QBCore.Functions.GetPlayer(src) Player.Functions.RemoveItem(item, 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got High With ' .. item .. '!', 'consuming') end) RegisterNetEvent('md-drugs:server:updatestatus', function(stat, statval) diff --git a/server/cornerselling.lua b/server/cornerselling.lua index d072f6d..3aabbbf 100644 --- a/server/cornerselling.lua +++ b/server/cornerselling.lua @@ -1,8 +1,6 @@ local QBCore = exports['qb-core']:GetCoreObject() local StolenDrugs = {} - - lib.callback.register('md-drugs:server:cornerselling:getAvailableDrugs', function(source, cb) local AvailableDrugs = {} local Player = QBCore.Functions.GetPlayer(source) @@ -12,6 +10,7 @@ lib.callback.register('md-drugs:server:cornerselling:getAvailableDrugs', functio local item = Player.Functions.GetItemByName(k) if item and type == 0 then type = type + 1 + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Allowed To Sell ' .. item.name .. '!' , 'cornerselling') return item.name, item.amount end end @@ -26,6 +25,7 @@ RegisterNetEvent('md-drugs:server:sellCornerDrugs', function(item, amount, price local Player = QBCore.Functions.GetPlayer(src) if RemoveItem(item, amount) then + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Sold ' .. amount .. ' Of ' .. item .. '!' , 'cornerselling') if QBConfig.MarkedBills then if price >= QBConfig.DrugsPrice[item]['min'] * amount and price <= QBConfig.DrugsPrice[item]['max'] * amount then local info = { diff --git a/server/crack.lua b/server/crack.lua index 8f49ff6..0495059 100644 --- a/server/crack.lua +++ b/server/crack.lua @@ -16,16 +16,19 @@ RegisterServerEvent('md-drugs:server:makecrackone', function(num) RemoveItem('bakingsoda', 1) AddItem('crackrock', 1) Notifys(Lang.Crack.makecrack, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Crack', 'crack') elseif locoke2 then RemoveItem('loosecokestagetwo', 1 ) RemoveItem('bakingsoda', 1) AddItem('crackrockstagetwo', 1) Notifys(Lang.Crack.makecrack, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Crack', 'crack') elseif locoke3 then RemoveItem('loosecokestagethree', 1 ) RemoveItem('bakingsoda', 1) AddItem('crackrockstagethree', 1) Notifys(Lang.Crack.makecrack, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Crack', 'crack') else Notifys(Lang.Crack.nocoke, 'error') end @@ -34,6 +37,7 @@ RegisterServerEvent('md-drugs:server:makecrackone', function(num) RemoveItem('bakingsoda', 1) AddItem('crackrock', 1) Notifys(Lang.Crack.makecrack, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Crack', 'crack') else Notifys(Lang.Crack.nocoke, 'error') end @@ -55,16 +59,19 @@ RegisterServerEvent('md-drugs:server:bagcrack', function(num) RemoveItem('empty_weed_bag', 1) AddItem('baggedcracked', 1) Notifys(Lang.Crack.makecrack, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Crack', 'crack') elseif rock2 then RemoveItem('crackrockstagetwo', 1 ) RemoveItem('empty_weed_bag', 1) AddItem('baggedcrackedstagetwo', 1) Notifys(Lang.Crack.makecrack, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Crack', 'crack') elseif rock3 then RemoveItem('crackrockstagethree', 1 ) RemoveItem('empty_weed_bag', 1) AddItem('baggedcrackedstagethree', 1) Notifys(Lang.Crack.makecrack, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Crack', 'crack') else Notifys(Lang.Crack.nocoke, "error") end @@ -73,6 +80,7 @@ RegisterServerEvent('md-drugs:server:bagcrack', function(num) RemoveItem('empty_weed_bag', 1) AddItem('baggedcracked', 1) Notifys(Lang.Crack.makecrack, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged Crack', 'crack') else Notifys(Lang.Crack.nocoke, "error") end diff --git a/server/functions.lua b/server/functions.lua index c036f6f..cb7dccb 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -1,5 +1,47 @@ local QBCore = exports['qb-core']:GetCoreObject() local notify = Config.Notify -- qb or ox +local logs = false +local logapi = GetConvar("fivemerrLogs", "") +local endpoint = 'https://api.fivemerr.com/v1/logs' +local headers = { + ['Authorization'] = logapi, + ['Content-Type'] = 'application/json', + } + +CreateThread(function() +if logs then + print'^2 Logs Enabled for md-drugs' + if logapi == 'insert string here' then + print'^1 homie you gotta set your api on line 4' + else + print'^2 API Key Looks Good, Dont Trust Me Though, Im Not Smart' + end +else + print'^1 logs disabled for md-drugs' +end +end) +function Log(message, meta, type) +if logs == false then return end + local buffer = { + level = "info", + message = message, + resource = GetCurrentResourceName(), + metadata = { + meta = type + } + } + SetTimeout(500, function() + PerformHttpRequest(endpoint, function(status, _, _, response) + if status ~= 200 then + if type(response) == 'string' then + response = json.decode(response) or response + end + end + end, 'POST', json.encode(buffer), headers) + buffer = nil + end) +end + function Notifys(text, type) if notify == 'qb' then @@ -13,18 +55,6 @@ function Notifys(text, type) end end -function checkTable(player, table) - local need = 0 - local have = 0 - for k, v in pairs (table) do - need = need + 1 - if Itemcheck(player, k, v, 'true') then have = have + 1 end - end - if need == have then - return true - else - end -end function Itemcheck(Player, item, amount, notify) local itemchecks = Player.Functions.GetItemByName(item) local yes @@ -37,7 +67,11 @@ function Itemcheck(Player, item, amount, notify) Notifys('You Need ' .. amount .. ' Of ' .. QBCore.Shared.Items[item].label .. ' To Do this', 'error') return else end end end - +function dist(source, Player, coords) + local pcoords = GetEntityCoords(Player) + local dist = #(pcoords - coords) + return dist +end function CheckDist(source,Player, coords) local pcoords = GetEntityCoords(Player) local ok @@ -46,7 +80,18 @@ function CheckDist(source,Player, coords) else DropPlayer(source, 'Too Far') return end end - +function checkTable(player, table) + local need = 0 + local have = 0 + for k, v in pairs (table) do + need = need + 1 + if Itemcheck(player, k, v, 'true') then have = have + 1 end + end + if need == have then + return true + else + end +end function RemoveItem( item, amount) local src = source local Player = QBCore.Functions.GetPlayer(src) @@ -65,17 +110,6 @@ function AddItem(item, amount) end end ---QBCore.Functions.CreateCallback('md-drugs:server:GetCoppers', function(source, cb, args) --- local amount = 0 --- local players = QBCore.Functions.GetQBPlayers() --- for k, v in pairs(players) do --- if v.PlayerData.job.type == 'leo' and v.PlayerData.job.onduty then --- amount = amount + 1 --- end --- end --- cb(amount) ---end) - lib.callback.register('md-drugs:server:GetCoppers', function(source, cb, args) local amount = 0 local players = QBCore.Functions.GetQBPlayers() @@ -87,13 +121,6 @@ lib.callback.register('md-drugs:server:GetCoppers', function(source, cb, args) return amount end) -lib.addCommand('cornersell', { - help = 'Start/Stop Cornerselling', - restricted = 'group.admin' -}, function(source, args, raw) - TriggerClientEvent('md-drugs:client:cornerselling',source) -end) - CreateThread(function() if not GetResourceState('ox_lib'):find("start") then print('^1 ox_lib Is A Depndancy, Not An Optional ') diff --git a/server/heroin.lua b/server/heroin.lua index 109bfde..e9547cd 100644 --- a/server/heroin.lua +++ b/server/heroin.lua @@ -16,6 +16,7 @@ function heroinCooldown(loc) GlobalState.PoppyPlants = Config.PoppyPlants Wait(1000) TriggerClientEvent('heroin:respawnCane', -1, loc) + Log('Heroin Plant Respawned At ' .. Config.PoppyPlants[loc].location, 'heroin') end) end @@ -26,6 +27,7 @@ local Player = QBCore.Functions.GetPlayer(src) if RemoveItem("cleaningkit", 1) then Notifys("Cleaned It Perfectly", "success") TriggerClientEvent("md-drugs:client:deletedirtyheroin", src, data) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wiped Down Their Heroin Lab Kit!' , 'heroin') else Notifys("You cant clean it with spit alone", "error") end @@ -42,7 +44,8 @@ RegisterServerEvent("heroin:pickupCane", function(loc) heroinCooldown(loc) local Player = QBCore.Functions.GetPlayer(source) AddItem('poppyresin', 1) - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked A Poppies With a distance of ' .. dist(source, playerPed, Config.PoppyPlants[loc].location) .. ' vectors', 'heroin') + end end) @@ -57,19 +60,24 @@ RegisterServerEvent('md-drugs:server:dryplant', function(num) if heroin <= Config.Tier1 then if RemoveItem("poppyresin", 1) then AddItem("heroin", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Heroin Powder With a distance of ' .. dist(source, playerPed, Config.dryplant[num]['loc']) .. ' vectors', 'heroin') end elseif heroin >= Config.Tier1 and heroin <= Config.Tier2 then if RemoveItem("poppyresin", 1) then AddItem("heroinstagetwo", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Heroin Powder Tier 2 With a distance of ' .. dist(source, playerPed, Config.dryplant[num]['loc']) .. ' vectors', 'heroin') end else if RemoveItem("poppyresin", 1) then AddItem("heroinstagethree", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Heroin Powder Tier 3 With a distance of ' .. dist(source, playerPed, Config.dryplant[num]['loc']) .. ' vectors', 'heroin') end end else if RemoveItem("poppyresin", 1) then - AddItem("heroin", 1) + AddItem("heroin", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Heroin Powder With a distance of ' .. dist(source, playerPed, Config.dryplant[num]['loc']) .. ' vectors', 'heroin') + end end end) @@ -90,16 +98,19 @@ RegisterServerEvent('md-drugs:server:cutheroin', function(num) RemoveItem('bakingsoda', 1 ) AddItem('heroincut',1) Notifys(Lang.Heroin.cutheroin, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Heroin With a distance of ' .. dist(source, playerPed, Config.cutheroinone[num]['loc']) .. ' vectors', 'heroin') elseif rawh2 then RemoveItem('heroinstagetwo', 1 ) RemoveItem('bakingsoda', 1 ) AddItem('heroincutstagetwo', 1) Notifys(Lang.Heroin.cutheroin, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Heroin Tier 2 With a distance of ' .. dist(source, playerPed, Config.cutheroinone[num]['loc']) .. ' vectors', 'heroin') elseif rawh3 then RemoveItem('heroinstagethree', 1 ) RemoveItem('bakingsoda', 1 ) AddItem('heroincutstagethree', 1) Notifys(Lang.Heroin.cutheroin, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Heroin Tier 3 With a distance of ' .. dist(source, playerPed, Config.cutheroinone[num]['loc']) .. ' vectors', 'heroin') else Notifys(Lang.Heroin.noheroin, "error") end @@ -108,6 +119,7 @@ RegisterServerEvent('md-drugs:server:cutheroin', function(num) RemoveItem('bakingsoda', 1 ) AddItem('heroincut',1) Notifys(Lang.Heroin.cutheroin, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Cut Heroin With a distance of ' .. dist(source, playerPed, Config.cutheroinone[num]['loc']) .. ' vectors', 'heroin') else Notifys(Lang.Heroin.noheroin, "error") end @@ -122,6 +134,7 @@ RegisterServerEvent('md-drugs:server:getheroinlabkit', function() if CheckDist(source, playerPed, vector3(Config.buyheroinlabkit.x,Config.buyheroinlabkit.y,Config.buyheroinlabkit.z)) then return end if Player.Functions.RemoveMoney('cash', Config.heroinlabkitprice) then AddItem('heroinlabkit', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bought A Heroin lab Kit ' .. dist(source, playerPed, vector3(Config.buyheroinlabkit.x,Config.buyheroinlabkit.y,Config.buyheroinlabkit.z)) .. ' vectors', 'heroin') else Notifys('You Need '.. Config.heroinlabkitprice .. ' In Cash For This', 'error') end @@ -130,18 +143,21 @@ end) RegisterServerEvent('md-drugs:server:getheroinlabkitback', function() local src = source local Player = QBCore.Functions.GetPlayer(src) - +local playerPed = GetPlayerPed(source) if Player.Functions.AddItem("heroinlabkit", 1) then Notifys('You Got Your Lab Kit Back', 'Success') + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Up Their Heroin Lab Kit Back At ' .. GetEntityCoords(playerPed) .. '!', 'heroin') end end) QBCore.Functions.CreateUseableItem('heroinlabkit', function(source, item) local src = source local Player = QBCore.Functions.GetPlayer(src) +local playerPed = GetPlayerPed(src) if not Itemcheck(Player, 'heroinlabkit', 1, 'true') then return end if TriggerClientEvent("md-drugs:client:setheroinlabkit", src) then Player.Functions.RemoveItem("heroinlabkit", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Placed Their Heroin Lab Kit Back At ' .. GetEntityCoords(playerPed) .. '!', 'heroin') end end) @@ -160,16 +176,19 @@ local Player = QBCore.Functions.GetPlayer(src) RemoveItem('emptyvial', 1) AddItem('heroinvial', 1) Notifys(Lang.Heroin.vial, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Vial Of Heroin', 'heroin') elseif cuth2 then RemoveItem('heroincutstagetwo', 1) RemoveItem('emptyvial', 1) AddItem('heroinvialstagetwo', 1) Notifys(Lang.Heroin.vial, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Vial Of Heroin Tier 2', 'heroin') elseif cuth3 then RemoveItem('heroincutstagethree', 1) RemoveItem('emptyvial', 1) AddItem('heroinvialstagethree', 1) Notifys(Lang.Heroin.vial, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Vial Of Heroin Tier 3', 'heroin') else Notifys(Lang.Heroin.novial, "error") end @@ -178,6 +197,7 @@ local Player = QBCore.Functions.GetPlayer(src) RemoveItem('emptyvial', 1) AddItem('heroinvial', 1) Notifys(Lang.Heroin.vial, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Vial Of Heroin', 'heroin') else Notifys(Lang.Heroin.novial, "error") end @@ -190,7 +210,7 @@ local Player = QBCore.Functions.GetPlayer(src) local cuth = Player.Functions.GetItemByName('heroincut') local cuth2 = Player.Functions.GetItemByName('heroincutstagetwo') local cuth3 = Player.Functions.GetItemByName('heroincutstagethree') - +Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Sucks And Burned Their Heroin', 'heroin') if cuth then RemoveItem('heroincut', 1) Notifys(Lang.Heroin.fail, "error") @@ -221,18 +241,21 @@ RegisterServerEvent('md-drugs:server:fillneedle', function(num) AddItem('heroin_ready', 1) Player.Functions.SetMetaData('heroin', (heroin + 1)) Notifys(Lang.Heroin.fill, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Filled A Needle Of Heroin And Now Has A Rep Of ' .. heroin + 1 .. '!' , 'heroin') elseif vh2 then RemoveItem('heroinvialstagetwo', 1 ) RemoveItem('needle', 1) AddItem('heroin_readystagetwo', 1) Player.Functions.SetMetaData('heroin', (heroin + 1)) Notifys(Lang.Heroin.fill, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Filled A Needle Of Heroin Tier 2 And Now Has A Rep Of ' .. heroin + 1 .. '!' , 'heroin') elseif vh3 then RemoveItem('heroinvialstagethree', 1 ) RemoveItem('needle', 1) AddItem('heroin_readystagethree', 1) Player.Functions.SetMetaData('heroin', (heroin + 1)) Notifys(Lang.Heroin.fill, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Filled A Needle Of Heroin Tier 3 And Now Has A Rep Of ' .. heroin + 1 .. '!' , 'heroin') else Notifys(Lang.Heroin.nofill, "error") end @@ -241,6 +264,7 @@ RegisterServerEvent('md-drugs:server:fillneedle', function(num) RemoveItem('needle', 1) AddItem('heroin_ready', 1) Notifys(Lang.Heroin.fill, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Filled A Needle Of Heroin!' , 'heroin') else Notifys(Lang.Heroin.nofill, "error") end @@ -252,6 +276,7 @@ end) RegisterServerEvent('md-drugs:server:failheroin', function() local src = source local Player = QBCore.Functions.GetPlayer(src) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Sucks And Burned Their Heroin', 'heroin') if Config.TierSystem then local vh = Player.Functions.GetItemByName('heroinvial') local vh2 = Player.Functions.GetItemByName('heroinvialstagetwo') diff --git a/server/lean.lua b/server/lean.lua index c499ac5..1e237be 100644 --- a/server/lean.lua +++ b/server/lean.lua @@ -8,10 +8,12 @@ RegisterServerEvent('md-drugs:server:givelean', function() if chance <= 50 then if AddItem('mdlean', amount) then Notifys(Lang.Lean.lean, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. amount .. ' Of Lean' , 'lean') end else if AddItem('mdreddextro', amount) then Notifys(Lang.Lean.dextro, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. amount .. ' Of Red Dextro' , 'lean') end end end) @@ -26,6 +28,7 @@ local Player = QBCore.Functions.GetPlayer(src) Player.Functions.RemoveItem('sprunk', 1 ) Player.Functions.RemoveItem('leancup', 1 ) Player.Functions.AddItem('cupoflean', 1 ) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Cup Of Lean' , 'lean') end else if Player.Functions.GetItemByName('leancup') and Player.Functions.GetItemByName('sprunk') and Player.Functions.GetItemByName('mdreddextro') then @@ -33,6 +36,7 @@ local Player = QBCore.Functions.GetPlayer(src) Player.Functions.RemoveItem('sprunk', 1 ) Player.Functions.RemoveItem('leancup', 1 ) Player.Functions.AddItem('cupofdextro', 1 ) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Cup Of Red Dextro' , 'lean') end end end) diff --git a/server/lsd.lua b/server/lsd.lua index ea19365..918c26e 100644 --- a/server/lsd.lua +++ b/server/lsd.lua @@ -7,6 +7,7 @@ local playerPed = GetPlayerPed(source) if CheckDist(source, playerPed, Config.lysergicacid[num]['loc']) then return end if AddItem('lysergic_acid', 2) then Notifys(Lang.lsd.lys, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got Lysergic acid with a distance of ' .. dist(source, playerPed, Config.lysergicacid[num]['loc']) .. '!', 'lsd') end end) @@ -17,6 +18,7 @@ local playerPed = GetPlayerPed(source) if CheckDist(source, playerPed, Config.diethylamide[num]['loc']) then return end if AddItem('diethylamide', 2) then Notifys(Lang.lsd.die, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got Diethylamide with a distance of ' .. dist(source, playerPed, Config.diethylamide[num]['loc']) .. '!', 'lsd') end end) @@ -24,9 +26,10 @@ end) QBCore.Functions.CreateUseableItem('lsdlabkit', function(source, item) local src = source local Player = QBCore.Functions.GetPlayer(src) - +local playerPed = GetPlayerPed(src) if TriggerClientEvent("md-drugs:client:setlsdlabkit", src) then Player.Functions.RemoveItem("lsdlabkit", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Placed Their LSD Lab Kit Back At ' .. GetEntityCoords(playerPed) .. '!', 'lsd') end end) @@ -38,15 +41,17 @@ local Player = QBCore.Functions.GetPlayer(src) if RemoveItem("cleaningkit", 1) then Notifys(Lang.lsd.cleaned, "success") TriggerClientEvent("md-drugs:client:resetlsdkit", src, data) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wiped Down Their LSD Lab Kit!' , 'lsd') end end) RegisterServerEvent('md-drugs:server:getlabkitback', function() local src = source local Player = QBCore.Functions.GetPlayer(src) - +local playerPed = GetPlayerPed(src) if AddItem("lsdlabkit", 1) then Notifys('You Got Your Lab Kit Back', 'success') + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Up Their LSD Lab Kit Back At ' .. GetEntityCoords(playerPed) .. '!', 'lsd') end end) @@ -59,6 +64,8 @@ local Player = QBCore.Functions.GetPlayer(src) RemoveItem('lysergic_acid', 1) AddItem('lsd_one_vial', 1) Notifys(Lang.lsd.madelsd, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Heated Basic LSD!', 'lsd') + end) RegisterServerEvent('md-drugs:server:failheating', function() @@ -68,6 +75,7 @@ local Player = QBCore.Functions.GetPlayer(src) RemoveItem('diethylamide', 1) RemoveItem('lysergic_acid', 1) Notifys(Lang.lsd.failed, "error") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Failed Basic LSD Like An Idiot!', 'lsd') end) @@ -96,6 +104,7 @@ if not Itemcheck(Player, 'lsd_one_vial', 1, 'true') then return end Notifys(Lang.lsd.refined, "Success") end Player.Functions.SetMetaData('lsd', (lsd + 1)) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Refined Acid and Now Has A Rep Of ' .. lsd + 1 .. '!', 'lsd') end else if RemoveItem('lsd_one_vial', 1) then @@ -115,6 +124,7 @@ if not Itemcheck(Player, 'lsd_one_vial', 1, 'true') then return end AddItem('lsd_vial_six', 1) Notifys(Lang.lsd.refined, "Success") end + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Refined Acid!', 'lsd') end end end) @@ -126,6 +136,7 @@ local randomchance = math.random(1,100) if not Itemcheck(Player, 'lsd_one_vial', 1, 'true') then return end if RemoveItem('lsd_one_vial', 1) then Player.Functions.SetMetaData('lsd', (Player.PlayerData.metadata.lsd - 1)) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Failed A Refinement And Now Has A Rep Of ' .. Player.PlayerData.metadata.lsd - 1 .. '!', 'lsd') if Player.PlayerData.metadata.lsd < 0 then Player.Functions.SetMetaData('lsd', 0) end end end) @@ -138,6 +149,7 @@ RegisterServerEvent('md-drugs:server:gettabpaper', function(num) if CheckDist(source, playerPed, Config.gettabs[num]['loc']) then return end if Player.Functions.RemoveMoney('cash', Config.tabcost * 10) then AddItem('tab_paper', 10) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bought Tab Paper!', 'lsd') else Notifys(Lang.lsd.broke, "error") end @@ -150,6 +162,7 @@ RegisterServerEvent('md-drugs:server:getlabkit', function() if CheckDist(source, playerPed, vector3(Config.buylsdlabkit.x, Config.buylsdlabkit.y, Config.buylsdlabkit.z)) then return end if Player.Functions.RemoveMoney('cash', Config.lsdlabkitcost) then AddItem('lsdlabkit', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bought A LSD Lab Kit!', 'lsd') else Notifys(Lang.lsd.broke, "error") end @@ -165,21 +178,27 @@ local Player = QBCore.Functions.GetPlayer(src) if Player.Functions.RemoveItem('lsd_one_vial', 1) then RemoveItem('tab_paper', 1) AddItem('smileyfacesheet', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Smiley Face Sheet', 'lsd') elseif Player.Functions.RemoveItem('lsd_vial_two', 1) then RemoveItem('tab_paper', 1) AddItem('wildcherrysheet', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Wild Cherry Sheet', 'lsd') elseif Player.Functions.RemoveItem('lsd_vial_three', 1) then RemoveItem('tab_paper', 1) AddItem('yinyangsheet', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Yin Yang Sheet', 'lsd') elseif Player.Functions.RemoveItem('lsd_vial_four', 1) then RemoveItem('tab_paper', 1) AddItem('pineapplesheet', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Pine Apple Sheet', 'lsd') elseif Player.Functions.RemoveItem('lsd_vial_five', 1) then RemoveItem('tab_paper', 1) AddItem('bartsheet', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Cluckin Bell Sheet', 'lsd') elseif Player.Functions.RemoveItem('lsd_vial_six', 1) then RemoveItem('tab_paper', 1) AddItem('gratefuldeadsheet', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Maze Sheet', 'lsd') else Notifys(Lang.lsd.novial, "error") end @@ -202,6 +221,7 @@ for k, v in pairs (sheets) do if Player.Functions.RemoveItem(v.item, 1) then Player.Functions.AddItem(v.recieve, math) TriggerClientEvent("inventory:client:ItemBox", src, QBCore.Shared.Items[v.recieve], "add", math ) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made ' .. math .. 'Tabs of ' .. v.recieve .. '!', 'lsd') end end) end \ No newline at end of file diff --git a/server/mescaline.lua b/server/mescaline.lua index 6385561..7427b48 100644 --- a/server/mescaline.lua +++ b/server/mescaline.lua @@ -16,6 +16,7 @@ function MescalineCooldown(loc) GlobalState.Mescaline = Config.Mescaline Wait(1000) TriggerClientEvent('Mescaline:respawnCane', -1, loc) + Log('Cactus Respawned At ' .. Config.Mescaline[loc].location, 'mescaline') end) end @@ -32,6 +33,7 @@ AddEventHandler("Mescaline:pickupCane", function(loc) MescalineCooldown(loc) local Player = QBCore.Functions.GetPlayer(source) AddItem('cactusbulb', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Cactus Bulbs With a distance of ' .. dist(source, playerPed, Config.Mescaline[loc].location) .. ' vectors', 'mescaline') end end) @@ -44,6 +46,7 @@ local Player = QBCore.Functions.GetPlayer(src) if RemoveItem("cactusbulb", 1) then AddItem("driedmescaline", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Dried Mescaline', 'mescaline') else Notifys(Lang.mescaline.nocactus, "error") end @@ -55,5 +58,6 @@ QBCore.Functions.CreateUseableItem("driedmescaline", function(source, item) if Player.Functions.RemoveItem("driedmescaline", 1) then TriggerClientEvent("md-drugs:client:takemescaline", src) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Consumed Mescaline', 'consume') end end) diff --git a/server/meth.lua b/server/meth.lua index 82cb960..ec2f919 100644 --- a/server/meth.lua +++ b/server/meth.lua @@ -7,6 +7,7 @@ RegisterServerEvent('md-drugs:server:startcook', function() Notifys("Adding Things To The Mix", "success") RemoveItem('ephedrine', 1) RemoveItem('acetone', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Started A Meth Batch', 'Meth') end) RegisterServerEvent('md-drugs:server:givemethingridients', function() @@ -17,11 +18,12 @@ RegisterServerEvent('md-drugs:server:givemethingridients', function() if chance <= 50 then if AddItem('ephedrine', amount) then Notifys(Lang.meth.eph, "success") - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. amount .. ' Of Ephedrine', 'Meth') end else if AddItem('acetone', amount) then Notifys(Lang.meth.ace, "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. amount .. ' Of Acetone', 'Meth') end end end) @@ -34,6 +36,7 @@ RegisterServerEvent('md-drugs:server:getmeth', function() if RemoveItem("empty_weed_bag", amount) then AddItem("methbags", amount) Notifys("You Made " .. amount .. " Bags Of Meth!", "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bagged ' .. amount .. 'Of Meth', 'Meth') else Notifys(Lang.meth.nobag, "error") end @@ -46,6 +49,7 @@ RegisterServerEvent('md-drugs:server:geteph', function(num) if CheckDist(source, playerPed, Config.MethEph[num]['loc']) then return end if AddItem('ephedrine', 1) then Notifys('Got Ephedrine!', "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. 1 .. 'Of Ephedrine', 'Meth') end end) @@ -55,6 +59,7 @@ RegisterServerEvent('md-drugs:server:getace', function(num) local playerPed = GetPlayerPed(source) if CheckDist(source, playerPed, Config.Methace[num]['loc']) then return end if AddItem('acetone', 1) then + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. 1 .. 'Of Acetone', 'Meth') Notifys('Got Acetone!', "success") end end) \ No newline at end of file diff --git a/server/oxyruns.lua b/server/oxyruns.lua index 7d75889..c7318be 100644 --- a/server/oxyruns.lua +++ b/server/oxyruns.lua @@ -6,6 +6,7 @@ RegisterServerEvent('md-drugs:server:payfortruck', function() local playerPed = GetPlayerPed(source) if Player.Functions.RemoveMoney('cash', Config.TruckPrice ) or Player.Functions.RemoveMoney('bank', Config.TruckPrice ) then TriggerClientEvent("md-drugs:Client:getoxylocation", src) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Rented A Van For OxyRuns', 'oxy') else Notifys(Lang.oxy.broke, "error") end @@ -25,6 +26,7 @@ RegisterServerEvent('md-drugs:server:giveoxybox', function() Player.Functions.AddMoney("cash", cash * 0.5) if itemchance <= Config.OxyItemChance then AddItem(item, Config.OxyItemAmount) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. Config.OxyItemAmount .. ' Of ' .. item .. ' For This Drop Off', 'oxy') end else Notifys(Lang.oxy.next, "success") @@ -32,6 +34,7 @@ RegisterServerEvent('md-drugs:server:giveoxybox', function() Player.Functions.AddMoney("cash", cash) if itemchance <= Config.OxyItemChance then AddItem(item, Config.OxyItemAmount) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Got ' .. Config.OxyItemAmount .. ' Of ' .. item .. ' For This Drop Off', 'oxy') end end diff --git a/server/pharma.lua b/server/pharma.lua index c7dbc37..f1c04b8 100644 --- a/server/pharma.lua +++ b/server/pharma.lua @@ -12,6 +12,7 @@ RegisterServerEvent('md-drugs:server:giveprescription', function(item) local src = source local Player = QBCore.Functions.GetPlayer(src) Player.Functions.AddItem(item, 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Prescription Of ' .. item .. '!', 'pharma') TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items[item], "add", 1) end) @@ -20,6 +21,7 @@ RegisterServerEvent('md-drugs:server:unbottle', function(item) local Player = QBCore.Functions.GetPlayer(src) local amount = math.random(10,30) Player.Functions.AddItem(item, amount) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Unbottled '.. amount .. ' Of ' .. item .. '!', 'pharma') TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items[item], "add", amount) end) @@ -42,6 +44,7 @@ local Player = QBCore.Functions.GetPlayer(src) if TriggerClientEvent('md-drugs:client:takepharma', src, item.name) then Player.Functions.RemoveItem(item.name, 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Took ' .. item.name .. '!', 'pharma') TriggerClientEvent("inventory:client:ItemBox", source, QBCore.Shared.Items[item.name], "remove", 1) end @@ -75,4 +78,5 @@ RegisterServerEvent('md-drugs:server:fillprescription', function() else Notifys(Lang.Pharma.no, "error") end + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Filled A Prescription!', 'pharma') end) diff --git a/server/shrooms.lua b/server/shrooms.lua index 5e421a1..7cf2e5f 100644 --- a/server/shrooms.lua +++ b/server/shrooms.lua @@ -16,6 +16,7 @@ function shroomsCooldown(loc) GlobalState.shrooms = Config.shrooms Wait(1000) TriggerClientEvent('shrooms:respawnCane', -1, loc) + Log('Cactus Respawned At ' .. Config.shrooms[loc].location, 'shrooms') end) end @@ -32,6 +33,7 @@ AddEventHandler("shrooms:pickupCane", function(loc) shroomsCooldown(loc) local Player = QBCore.Functions.GetPlayer(source) AddItem('shrooms', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked A Shroom With a distance of ' .. dist(source, playerPed, Config.shrooms[loc].location) .. ' vectors', 'shrooms') end end) @@ -40,7 +42,8 @@ local src = source local Player = QBCore.Functions.GetPlayer(src) if TriggerClientEvent('md-drugs:client:takeshrooms', src, item.name) then - Player.Functions.RemoveItem('shrooms', 1) + Player.Functions.RemoveItem('shrooms', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Took Some Mushrooms', 'shrooms') TriggerClientEvent("QBCore:Notify", src, Lang.Shrooms.trip, 'success') end end) diff --git a/server/travellingmerchant.lua b/server/travellingmerchant.lua index 5156e1f..023954b 100644 --- a/server/travellingmerchant.lua +++ b/server/travellingmerchant.lua @@ -7,6 +7,7 @@ RegisterServerEvent("md-drugs:server:travellingmerchantox", function(amount, mon if Player.Functions.RemoveMoney(tostring(money), tonumber(price) * tonumber(amount)) then TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items[item], "add", amount) Player.Functions.AddItem(item, amount) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bought ' .. amount .. ' Of ' .. item .. ' For ' .. tonumber(price) * tonumber(amount) .. '!', 'merchant') end end) \ No newline at end of file diff --git a/server/weed.lua b/server/weed.lua index c105595..7bc13b2 100644 --- a/server/weed.lua +++ b/server/weed.lua @@ -16,6 +16,7 @@ function WeedCooldown(loc) GlobalState.WeedPlant = Config.WeedPlant Wait(1000) TriggerClientEvent('weed:respawnCane', -1, loc) + Log('Weed Plant Respawned At ' .. Config.WeedPlant[loc].location, 'weed') end) end @@ -30,6 +31,8 @@ AddEventHandler("weed:pickupCane", function(loc) WeedCooldown(loc) local Player = QBCore.Functions.GetPlayer(source) AddItem('wetcannabis', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Weed With a distance of ' .. dist(source, playerPed, Config.WeedPlant[loc].location) .. ' vectors', 'weed') + end end) --------------- events @@ -38,6 +41,7 @@ RegisterServerEvent('md-drugs:server:dryoutweed', function() local Player = QBCore.Functions.GetPlayer(src) if RemoveItem("wetcannabis", 1) then AddItem("drycannabis", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Dried Weed', 'weed') else Notifys(Lang.Weed.nodry, "error") end @@ -56,6 +60,7 @@ RegisterServerEvent('md-drugs:server:makebutter', function() RemoveItem('mdbutter', 1) RemoveItem('grindedweed', 1) AddItem('cannabutter', 1 ) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Canna Butter ', 'weed') end end) @@ -73,6 +78,7 @@ RegisterServerEvent('md-drugs:server:makebrownies', function() RemoveItem('flour', 1) RemoveItem('chocolate', 1) AddItem('specialbrownie', 1 ) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Special Brownies ', 'weed') end end) @@ -88,6 +94,7 @@ RegisterServerEvent('md-drugs:server:makecookies', function() RemoveItem('cannabutter', 1) RemoveItem('flour', 1) AddItem('specialcookie', 1 ) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Special Cookies ', 'weed') end end) @@ -103,6 +110,7 @@ RegisterServerEvent('md-drugs:server:makechocolate', function() RemoveItem('cannabutter', 1) RemoveItem('chocolate', 1) AddItem('specialchocolate', 1 ) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Special Chocolate ', 'weed') end end) @@ -118,6 +126,7 @@ RegisterServerEvent('md-drugs:server:makemuffin', function() RemoveItem('cannabutter', 1) RemoveItem('flour', 1) AddItem('specialmuffin', 1 ) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Special Muffin ', 'weed') end end) @@ -133,6 +142,7 @@ RegisterServerEvent('md-drugs:server:makeoil', function() RemoveItem('butane', 1) RemoveItem('grindedweed', 1) AddItem('shatter', 1 ) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Shatter ', 'weed') end end) @@ -151,6 +161,7 @@ RegisterServerEvent('md-drugs:server:rollblunt', function() RemoveItem('bluntwrap', 1) RemoveItem('grindedweed', 1) AddItem('blunt', 1 ) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Rolled A Blunt ', 'weed') end end) @@ -167,6 +178,7 @@ RegisterServerEvent('md-drugs:server:rollleanblunt', function() TriggerClientEvent("md-drugs:client:rollanim", src) RemoveItem("bluntwrap", 1) AddItem("leanbluntwrap", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Rolled A Lean Blunt ', 'weed') if chance > 8 then RemoveItem("mdlean", 1) end @@ -187,6 +199,7 @@ RegisterServerEvent('md-drugs:server:rolldextroblunt', function() RemoveItem("bluntwrap", 1) AddItem("dextrobluntwrap", 1) TriggerClientEvent("md-drugs:client:rollanim", src) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Rolled A Dextro Blunt ', 'weed') if chance > 8 then Player.Functions.RemoveItem("mdreddextro", 1) end @@ -207,6 +220,8 @@ RegisterServerEvent('md-drugs:server:rollchewyblunt', function() RemoveItem("grindedweed", 1) AddItem("chewyblunt", 1) TriggerClientEvent("md-drugs:client:rollanim", src) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Rolled A Chewy Blunt ', 'weed') + end end) ------------------------ usuable items @@ -223,6 +238,7 @@ local keef = Player.Functions.GetItemByName("grindedweed") TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items['leanblunts'], "add", 1) TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items['grindedweed'], "remove", 1) TriggerClientEvent('inventory:client:ItemBox', src, QBCore.Shared.Items['leanbluntwrap'], "remove", 1) + end else Notifys(Lang.Weed.noweed, "error") diff --git a/server/wholesale.lua b/server/wholesale.lua index f86d3e1..e6dc320 100644 --- a/server/wholesale.lua +++ b/server/wholesale.lua @@ -23,6 +23,7 @@ RegisterServerEvent('md-drugs:server:wholesalecoke', function() local removed = Player.Functions.RemoveItem(v, item.amount) Player.Functions.AddMoney("cash", item.amount * price) Notifys("You received " .. item.amount * price .. " Dollars!" , "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wholesaled Drugs ', 'wholesale') end end end) @@ -45,7 +46,8 @@ RegisterServerEvent('md-drugs:server:wholesalecrack', function() if item and item.amount > 0 then local removed = Player.Functions.RemoveItem(v, item.amount) Player.Functions.AddMoney("cash", item.amount * price) - Notifys("You received " .. item.amount * price .. " Dollars!" , "success") + Notifys("You received " .. item.amount * price .. " Dollars!" , "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wholesaled Drugs ', 'wholesale') end end end) @@ -71,6 +73,7 @@ RegisterServerEvent('md-drugs:server:wholesalelsd', function() local removed = Player.Functions.RemoveItem(v, item.amount) Player.Functions.AddMoney("cash", item.amount * price) Notifys("You received " .. item.amount * price .. " Dollars!" , "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wholesaled Drugs ', 'wholesale') end end end) @@ -95,7 +98,7 @@ RegisterServerEvent('md-drugs:server:wholesaleheroin', function() local removed = Player.Functions.RemoveItem(v, item.amount) Player.Functions.AddMoney("cash", item.amount * price) Notifys("You received " .. item.amount * price .. " Dollars!" , "success") - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wholesaled Drugs ', 'wholesale') end end end) @@ -119,6 +122,7 @@ RegisterServerEvent('md-drugs:server:wholesalextc', function() local removed = Player.Functions.RemoveItem(v, item.amount) Player.Functions.AddMoney("cash", item.amount * price) Notifys("You received " .. item.amount * price .. " Dollars!" , "success") + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Wholesaled Drugs ', 'wholesale') end end end) diff --git a/server/xtc.lua b/server/xtc.lua index af50682..be1c88f 100644 --- a/server/xtc.lua +++ b/server/xtc.lua @@ -6,6 +6,7 @@ RegisterServerEvent('md-drugs:server:stealisosafrole', function(num) local playerPed = GetPlayerPed(source) if CheckDist(source, playerPed, Config.isosafrole[num]['loc']) then return end if AddItem("isosafrole", 1) then + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stole isosafrole with a distance of ' .. dist(source, playerPed, Config.isosafrole[num]['loc']) .. ' vectors!', 'xtc') end end) @@ -15,6 +16,8 @@ RegisterServerEvent('md-drugs:server:stealmdp2p', function(num) local playerPed = GetPlayerPed(source) if CheckDist(source, playerPed, Config.mdp2p[num]['loc']) then return end if AddItem("mdp2p", 1) then + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stole MDP2P with a distance of ' .. dist(source, playerPed, Config.mdp2p[num]['loc']) .. ' vectors!', 'xtc') + end end) local presses = { @@ -27,9 +30,10 @@ for k, v in pairs (presses) do QBCore.Functions.CreateUseableItem(v.item, function(source, item) local src = source local Player = QBCore.Functions.GetPlayer(src) - +local playerPed = GetPlayerPed(source) if TriggerClientEvent("md-drugs:client:setpress", src, v.data) then Player.Functions.RemoveItem(v.item, 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Placed A ' .. v.item .. ' At ' .. GetEntityCoords(playerPed) .. '!', 'xtc') end end) end @@ -37,19 +41,23 @@ end RegisterServerEvent('md-drugs:server:getpressback', function(type) local src = source local Player = QBCore.Functions.GetPlayer(src) - +local playerPed = GetPlayerPed(source) if type == 'single' then if Player.Functions.GetItemByName('singlepress') then Notifys('You Already Have A Kit') return end AddItem('singlepress', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Their Single Press At ' .. GetEntityCoords(playerPed) .. '!', 'xtc') elseif type == 'dual' then if Player.Functions.GetItemByName('dualpress') then Notifys('You Already Have A Kit') return end AddItem('dualpress', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Their Dual Press At ' .. GetEntityCoords(playerPed) .. '!', 'xtc') elseif type == 'triple' then if Player.Functions.GetItemByName('triplepress') then Notifys('You Already Have A Kit') return end AddItem('triplepress', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Their Triple Press At ' .. GetEntityCoords(playerPed) .. '!', 'xtc') elseif type == 'quad' then if Player.Functions.GetItemByName('quadpress') then Notifys('You Already Have A Kit') return end AddItem('quadpress', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Picked Their Quad Press At ' .. GetEntityCoords(playerPed) .. '!', 'xtc') end end) @@ -62,6 +70,7 @@ RegisterServerEvent('md-drugs:server:makextc', function(data) if data.color == 'white' then if RemoveItem('raw_xtc', 1) then AddItem('white_xtc', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Single Stack White Pill!', 'xtc') end elseif data.color == 'red' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end @@ -69,23 +78,27 @@ RegisterServerEvent('md-drugs:server:makextc', function(data) RemoveItem('raw_xtc', 1) RemoveItem('loosecoke', 1) AddItem('red_xtc', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Single Stack Red Pill!', 'xtc') elseif data.color == 'orange' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not Itemcheck(Player, 'heroinvial', 1, 'true') then return end RemoveItem('raw_xtc', 1) RemoveItem('heroinvial', 1) AddItem('orange_xtc', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Single Stack Orange Pill!', 'xtc') elseif data.color == 'blue' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not Itemcheck(Player, 'crackrock', 1, 'true') then return end RemoveItem('raw_xtc', 1) RemoveItem('crackrock', 1) AddItem('blue_xtc', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Single Stack Blue Pill!', 'xtc') end elseif data.data == 'dual' then if data.color == 'white' then if RemoveItem('raw_xtc', 1) then AddItem('white_xtc2', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Dual Stack White Pill!', 'xtc') end elseif data.color == 'red' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end @@ -93,23 +106,27 @@ RegisterServerEvent('md-drugs:server:makextc', function(data) RemoveItem('raw_xtc', 1) RemoveItem('loosecoke', 1) AddItem('red_xtc2', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Dual Stack Red Pill!', 'xtc') elseif data.color == 'orange' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not Itemcheck(Player, 'heroinvial', 1, 'true') then return end RemoveItem('raw_xtc', 1) RemoveItem('heroinvial', 1) AddItem('orange_xtc2', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Dual Stack Orange Pill!', 'xtc') elseif data.color == 'blue' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not Itemcheck(Player, 'crackrock', 1, 'true') then return end RemoveItem('raw_xtc', 1) RemoveItem('crackrock', 1) AddItem('blue_xtc2', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Dual Stack Blue Pill!', 'xtc') end elseif data.data == 'triple' then if data.color == 'white' then if RemoveItem('raw_xtc', 1) then AddItem('white_xtc3', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Triple Stack White Pill!', 'xtc') end elseif data.color == 'red' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end @@ -117,23 +134,27 @@ RegisterServerEvent('md-drugs:server:makextc', function(data) RemoveItem('raw_xtc', 1) RemoveItem('loosecoke', 1) AddItem('red_xtc3', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Triple Stack Red Pill!', 'xtc') elseif data.color == 'orange' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not Itemcheck(Player, 'heroinvial', 1, 'true') then return end RemoveItem('raw_xtc', 1) RemoveItem('heroinvial', 1) AddItem('orange_xtc3', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Triple Stack Orange Pill!', 'xtc') elseif data.color == 'blue' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not Itemcheck(Player, 'crackrock', 1, 'true') then return end RemoveItem('raw_xtc', 1) RemoveItem('crackrock', 1) AddItem('blue_xtc3', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Triple Stack Blue Pill!', 'xtc') end elseif data.data == 'quad' then if data.color == 'white' then if RemoveItem('raw_xtc', 1) then AddItem('white_xtc4', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Quad Stack White Pill!', 'xtc') end elseif data.color == 'red' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end @@ -141,18 +162,21 @@ RegisterServerEvent('md-drugs:server:makextc', function(data) RemoveItem('raw_xtc', 1) RemoveItem('loosecoke', 1) AddItem('red_xtc4', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Quad Stack Red Pill!', 'xtc') elseif data.color == 'orange' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not Itemcheck(Player, 'heroinvial', 1, 'true') then return end RemoveItem('raw_xtc', 1) RemoveItem('heroinvial', 1) AddItem('orange_xtc4', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Quad Stack Orange Pill!', 'xtc') elseif data.color == 'blue' then if not Itemcheck(Player, 'raw_xtc', 1, 'true') then return end if not Itemcheck(Player, 'crackrock', 1, 'true') then return end RemoveItem('raw_xtc', 1) RemoveItem('crackrock', 1) AddItem('blue_xtc4', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made A Quad Stack Blue Pill!', 'xtc') end end end) @@ -163,6 +187,7 @@ RegisterServerEvent('md-drugs:server:buypress', function() if Player.Functions.RemoveMoney("cash", 20000) then AddItem("singlepress", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Bought A Pill Press', 'xtc') else Notifys(Lang.xtc.cash, "error") end @@ -188,6 +213,7 @@ RegisterServerEvent('md-drugs:server:upgradepress', function(data) RemoveItem('orange_xtc', 20) RemoveItem('singlepress', 1) AddItem('dualpress', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Upgraded Press To Dual Press', 'xtc') end elseif data == 'triple' then local have = 0 @@ -202,6 +228,7 @@ RegisterServerEvent('md-drugs:server:upgradepress', function(data) RemoveItem('red_xtc2', 50) RemoveItem('orange_xtc2', 50) AddItem('triplepress', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Upgraded Press To Triple Press', 'xtc') end elseif data == 'quad' then local have = 0 @@ -216,6 +243,7 @@ RegisterServerEvent('md-drugs:server:upgradepress', function(data) RemoveItem('red_xtc3', 150) RemoveItem('orange_xtc3', 150) AddItem('quadpress', 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Upgraded Press To Quad Press', 'xtc') end else Notify('huh', 'error') @@ -232,6 +260,7 @@ RegisterServerEvent('md-drugs:server:makingrawxtc', function(num) RemoveItem('mdp2p', 1) RemoveItem('isosafrole', 1) AddItem("raw_xtc", 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Made Raw XTC With A Distance Of ' .. dist(source, playerPed, Config.rawxtcloc[num]['loc']) .. '!', 'xtc') end) RegisterServerEvent('md-drugs:server:stampwhite', function(num) @@ -250,14 +279,16 @@ RegisterServerEvent('md-drugs:server:stampwhite', function(num) if Player.Functions.RemoveItem("white_xtc", 1) then AddItem(one[chance], 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Single White Pill And Got ' .. one[chance] .. '!', 'xtc') elseif Player.Functions.RemoveItem("white_xtc2", 1) then AddItem(two[chance2], 1) - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Dual White Pill And Got ' .. two[chance2] .. '!', 'xtc') elseif Player.Functions.RemoveItem("white_xtc3", 1) then AddItem(three[chance3], 1) - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Triple White Pill And Got ' .. three[chance3] .. '!', 'xtc') elseif Player.Functions.RemoveItem("white_xtc4", 1) then AddItem(four[chance4], 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Quad White Pill And Got ' .. four[chance4] .. '!', 'xtc') else Notifys('You Dont Have Unstamped White Pills', 'error') end @@ -279,14 +310,16 @@ RegisterServerEvent('md-drugs:server:stampred', function(num) if Player.Functions.RemoveItem("red_xtc", 1) then AddItem(one[chance], 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Single Red Pill And Got ' .. one[chance] .. '!', 'xtc') elseif Player.Functions.RemoveItem("red_xtc2", 1) then AddItem(two[chance2], 1) - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Dual Red Pill And Got ' .. two[chance2] .. '!', 'xtc') elseif Player.Functions.RemoveItem("red_xtc3", 1) then AddItem(three[chance3], 1) - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Triple Red Pill And Got ' .. three[chance3] .. '!', 'xtc') elseif Player.Functions.RemoveItem("red_xtc4", 1) then AddItem(four[chance4], 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Quad Red Pill And Got ' .. four[chance4] .. '!', 'xtc') else Notifys('You Dont Have Unstamped red Pills', 'error') end @@ -308,14 +341,16 @@ RegisterServerEvent('md-drugs:server:stamporange', function(num) if Player.Functions.RemoveItem("orange_xtc", 1) then AddItem(one[chance], 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Single Orange Pill And Got ' .. one[chance] .. '!', 'xtc') elseif Player.Functions.RemoveItem("orange_xtc2", 1) then AddItem(two[chance2], 1) - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Dual Orange Pill And Got ' .. two[chance2] .. '!', 'xtc') elseif Player.Functions.RemoveItem("orange_xtc3", 1) then AddItem(three[chance3], 1) - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Triple Orange Pill And Got ' .. three[chance3] .. '!', 'xtc') elseif Player.Functions.RemoveItem("orange_xtc4", 1) then AddItem(four[chance4], 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Quad Orange Pill And Got ' .. four[chance4] .. '!', 'xtc') else Notifys('You Dont Have Unstamped orange Pills', 'error') end @@ -334,17 +369,18 @@ RegisterServerEvent('md-drugs:server:stampblue', function(num) local chance4 = math.random(#one) local playerPed = GetPlayerPed(source) if CheckDist(source, playerPed, Config.stamp[num]['loc']) then return end - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Single Blue Pill And Got ' .. one[chance] .. '!', 'xtc') if Player.Functions.RemoveItem("blue_xtc", 1) then AddItem(one[chance], 1) elseif Player.Functions.RemoveItem("blue_xtc2", 1) then AddItem(two[chance2], 1) - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Dual Blue Pill And Got ' .. two[chance2] .. '!', 'xtc') elseif Player.Functions.RemoveItem("blue_xtc3", 1) then AddItem(three[chance3], 1) - + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Triple Blue Pill And Got ' .. three[chance3] .. '!', 'xtc') elseif Player.Functions.RemoveItem("blue_xtc4", 1) then AddItem(four[chance4], 1) + Log(Player.PlayerData.charinfo.firstname .. ' ' .. Player.PlayerData.charinfo.lastname .. ' Stamped A Quad Blue Pill And Got ' .. four[chance4] .. '!', 'xtc') else Notifys('You Dont Have Unstamped blue Pills', 'error') end