Added integration for Fivemerr

if you want to use the logs go to line 3 of server/functions.lua and turn to true, then inside of your server.cfg add this 

```
set fivemerrLogs "API_KEY"
```
obviously replace the API_KEY with your api key
This commit is contained in:
Mustache Dom authored and GitHub committed 2024-07-16 14:14:48 -07:00
1 parent 7aa929670e
commit 3d144cae58
17 files changed
+245 -61

No files matched your search

+4
View File
@@ -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)