JohnnyS / JD_logsV3

JD Logs V3 by Prefech/JokeDevil. I was a admin on the discord, not sure what happened to him. This is no longer being maintained.
35 stars 26 forks source link

Problem with Custom Logs #13

Closed LoganZiiro closed 1 year ago

LoganZiiro commented 1 year ago

image

I think the export doesnt Work

JohnnyS commented 1 year ago

Show how you did the export, provide more information

LoganZiiro commented 1 year ago
exports.JD_logsV3:createLog({
        EmbedMessage = "Verkaufspunkt | " .. GetPlayerName(source).."verkaufte sein Fahrzeug mit dem Kennzeichen: " .. plate .. ".",
        channel = "test",
        screenshot = true
    })

And at the Channel.json i add the channel test

LoganZiiro commented 1 year ago

`RegisterServerEvent('myVehicleshop:sellVehicle') AddEventHandler('myVehicleshop:sellVehicle', function(plate, price, societyIdentifier)

local xPlayer = ESX.GetPlayerFromId(source)

local playerIdentifier = societyIdentifier or xPlayer.identifier
local trimmedPlate = Trim(plate)

MySQL.Async.execute('DELETE FROM owned_vehicles WHERE owner = @owner AND (plate = @plate OR plate = @trimmedPlate) LIMIT 1',
{
    ['@owner'] = playerIdentifier,
    ['@plate'] = plate,
    ['@trimmedPlate'] = trimmedPlate,
})

if societyIdentifier == nil then
    -- money to player
    xPlayer.addAccountMoney('bank', math.floor(price))
else
    -- money to society
    TriggerEvent('esx_society:getSociety', xPlayer.job.name, function(society)
        if society ~= nil then
            TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account)
                account.addMoney(math.floor(price))
            end)
        end
    end)
end

print('Sell vehicle..should be removed from db: plate being ' .. plate)
exports.JD_logsV3:createLog({
    EmbedMessage = "Verkaufspunkt | " .. GetPlayerName(source).."verkaufte sein Fahrzeug mit dem Kennzeichen: " .. plate .. ".",
    channel = "test",
    screenshot = true
})

end)`

JohnnyS commented 1 year ago

You have screenshot set to true but have no player ID to obtain the screenshot from, turn it to false and test again. If you need player details you have to add the player id field

LoganZiiro commented 1 year ago

Same Problem

JohnnyS commented 1 year ago

This is the default log export

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 = '✅'
})

Remove player 2 id and add your player ID and keep the embed message a String and just test to see if it works.

JohnnyS commented 1 year ago

turn SS to false as well

LoganZiiro commented 1 year ago

image Now its Work. How can i add this Information image

JohnnyS commented 1 year ago

Put it in the embed message and take the data from the code

LoganZiiro commented 1 year ago

Now its work Perfect Thanks a Lot

Last Question has JD_Logs a Ban Export ?

JohnnyS commented 1 year ago

Use the custom export for bans

LoganZiiro commented 1 year ago

Where i find the Custom Export for Bans ?

Cyzxin commented 1 year ago

you will have to get one yourself, one is not integrated into JD logs