[Release] [Standalone] Boost's webhook system

Webhook loging system made easy !

  • Creating logs is easy !
  • Infinite amount of webhooks


Logs

Config = {}
    Config.Logs = {
        ['default'] = '',
        ['inventory'] = '',
    }


Config.Colors = {
    ["default"] = 16711680,
    ["blue"] = 25087,
    ["green"] = 762640,
    ["white"] = 16777215,
    ["black"] = 0,
    ["orange"] = 16743168,
    ["lightgreen"] = 65309,
    ["yellow"] = 15335168,
    ["turqois"] = 62207,
    ["pink"] = 16711900,
    ["red"] = 16711680,
}

Example
es_extended/server/main.lua 290

if targetXPlayer.canCarryItem(itemName, itemCount) then
	sourceXPlayer.removeInventoryItem(itemName, itemCount)
	targetXPlayer.addInventoryItem   (itemName, itemCount)

	sourceXPlayer.showNotification(_U('gave_item', itemCount, sourceItem.label, targetXPlayer.name))
	targetXPlayer.showNotification(_U('received_item', itemCount, sourceItem.label, sourceXPlayer.name))

				local data = {
					['Player'] = sourceXPlayer.source, 
					['Target'] = targetXPlayer.source, 
					['Log'] = 'inventorius', 
					['Title'] = 'Dave itema is inventoriaus', -- Title
					['Message'] = '**Koki itema dave: **``' .. sourceItem.label .. '``\n**Kiekis: ** ``' .. itemCount .. '``', 
					['Color'] = 'blue', 
				}

				TriggerEvent('Boost-Logs:SendLog', data)

	else
		sourceXPlayer.showNotification(_U('ex_inv_lim', targetXPlayer.name))
end

More examples can be found on the github page
Get it here !

Previous release
[Standalone] Simple numpad

3 Likes

Removed discord link, please review releases rules.

1 Like

Thanks for share, i just tried it but it doesn’t send me any log of the login

can you give us an example

Added an example

There is no default logs, with this resource you need to add the logs yourself to where you want :slight_smile:

I mean give uss an working example like ls:checkOwner

Lovely. Can anyone give an example for society funds being added/withdrawn?

esx_society/server/main.lua 68

TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account)
			if amount > 0 and account.money >= amount then
				account.removeMoney(amount)
				xPlayer.addMoney(amount)
				xPlayer.showNotification(_U('have_withdrawn', ESX.Math.GroupDigits(amount)))

				local data = {
					['Player'] = xPlayer.source,
					['Log'] = 'society',
					['Title'] = 'Withdrawed society money'
					['Message'] = 'Player has withdrawed money from society: ``' .. societyName .. '``\nAmount: ``' .. amount .. '``'
				}

				TriggerEvent('Boost-Logs:SendLog', data)
			else
				xPlayer.showNotification(_U('invalid_amount'))
			end
		end)

Obviously you need to add the society log to config :). You basically do the same with deposit

1 Like

Thanks man. I could have done this most likely but I’ve got some other stuff going on and it’s nice to have decent people like yourself to help out, appreciate it. :100:

1 Like

Hello for me its not working i put this in the script but its not working ?

Did you add ['society'] = 'webhook' to config ?

1 Like

Nice release!

1 Like


I get this error but makes no sense seeing how the bracket is there…

NVM, you forgo to add a few “,”

Aaah will fix it in the examples my bad :smiley:

For some odd reason, when I add the society part to esx_society, it breaks the whole society script but doesn’t throw any errors.

I tried this made some natives on it looks amazing! And great script for server I used it on deving natives and sending them to discord, amazing webhook system! :heart:

1 Like

What would the code look like if I wanted to be logged in addition, the player throw away or collect items?

It would be interesting if players buy something e.g. cars or something from the 24/7 etc.?

sry for the question´s :confused:

if targetXPlayer.canCarryItem(itemName, itemCount) then
				sourceXPlayer.removeInventoryItem(itemName, itemCount)
				targetXPlayer.addInventoryItem   (itemName, itemCount)

				sourceXPlayer.showNotification(_U('gave_item', itemCount, sourceItem.label, targetXPlayer.name))
				targetXPlayer.showNotification(_U('received_item', itemCount, sourceItem.label, sourceXPlayer.name))

				local data = {
					['Player'] = sourceXPlayer.source, 
					['Target'] = targetXPlayer.source, 
					['Log'] = 'inventorius', 
					['Title'] = 'Dave itema is inventoriaus', -- Title
					['Message'] = '**Koki itema dave: **``' .. sourceItem.label .. '``\n**Kiekis: ** ``' .. itemCount .. '``', 
					['Color'] = 'blue', 
				}

				TriggerEvent('Boost-Logs:SendLog', data)

			else
				sourceXPlayer.showNotification(_U('ex_inv_lim', targetXPlayer.name))
			end

This is a example of giving items to other players. For shops you could find the event which is triggered when buying items and then log it.

nice script to easily add logs to our scripts thanks ! :blush:

1 Like