To make custom logs you will need to have some coding knowledge! We only provide the export we can not help you make use of it.
If you run into issues you can always open a ticket but there won’t be guarantee that we can help.
To create custom logs you will need to add the export to the event/function or command you want to log.
This is in the resource you want to log
You can use the command !jdlogs create
on your discord server to setup a custom logs channel.
exports.JD_logsV3:createLog({
EmbedMessage = "Embed Message",
player_id = SERVER_ID_PLAYER_ONE,
player_2_id = SERVER_ID_PLAYER_TWO,
channel = "Channel name from channels.json | Discord Channel ID | Discord Webhook URL",
screenshot = true,
screenshot_2 = true,
title = 'Custom Title',
color = '#A1A1A1',
icon = '✅'
})
!jdlogs create
command.channels.json
This can also be the channel id or a webhook url.Since making custom logs are depending on what you want to logs i can not give any examples other than some standalone commands.
Since we’re not using player_id and player_2_id we have removed them from the export.
RegisterCommand("tweet", function(source, args, rawCommand)
TriggerClientEvent('chatMessage', -1, "Tweet | " .. GetPlayerName(source)..": "..rawCommand:gsub("tweet ", ""), { 201, 201, 201 })
exports.JD_logsV3:createLog({
EmbedMessage = "Tweet | " .. GetPlayerName(source)..": "..rawCommand:gsub("tweet ", ""),
channel = "tweet",
screenshot = false
})
end)
for server-side resources player_id
will be source
on client-side this will be GetPlayerServerId(PlayerId())
Keep in mind these might also change depending on the framework
RegisterCommand("me", function(source, args, rawCommand)
TriggerClientEvent('chatMessage', -1, "ME | " .. GetPlayerName(source)..": "..rawCommand:gsub("me", ""), { 201, 201, 201 })
exports.JD_logsV3:createLog({
EmbedMessage = "ME | " .. GetPlayerName(source)..": "..rawCommand:gsub("me", ""),
player_id = source,
channel = "me",
screenshot = false
})
end)
player_2_id will be a server variable that is the server id of the second player
Keep in mind these might also change depending on the framework
RegisterCommand("mention", function(source, args, rawCommand)
TriggerClientEvent('chatMessage', -1, "Mention | " .. GetPlayerName(args[1]), { 201, 201, 201 })
exports.JD_logsV3:createLog({
EmbedMessage = "Mention | " .. GetPlayerName(args[1]),
player_id = source,
player_2_id = args[1],
channel = "mention",
screenshot = false
})
end)