[RELEASE] [ESX/NON ESX] Staffchat with Discord Webhook

esx_webhookstaffchat

:game_die: Description

An ingame staff chat script, which automatically sends the text to discord server. Perfect for team chats etc.

:hammer_and_wrench: Requirements

ESX.
A Discord Webhook.

:wrench: Setup

Add the following things to your server.cfg:

start esx_webhookstaffchat

:question: How to edit Webhook?



:question: How do I add custom groups?

Just go to main.lua copy the code after line 25 here an example:

				if xPlayer.getGroup() == 'yourrankhere' then
					xPlayer.showNotification("~r~STAFF-CHAT ~g~RANK ~s~(".. GetPlayerName(source).. "): " .. nachricht)
					sendToDiscord("(RANK) " .. name, args)
				end

Edit Line 17:

if xPlayer.getGroup() == 'mod' or xPlayer.getGroup() == 'admin' or xPlayer.getGroup() == 'yourrank'  then

:inbox_tray: Download

Download
Source

Non ESX

Have fun!

6 Likes

Dang, got all excited until I saw the ESX part. Would love this based on ACE perms instead of ESX

Give me a minute

1 Like

Done.

2 Likes

Perhaps a screenshot of the chat layout itself?

Neeevverrrrmiiind! Lol, just looked at the source and I see itโ€™s a command! :wink:

Awesome!! Thank you!!

Hey,

I am getting an error where it is attempting to concentrate a nil value on line 21. Are you able to assist? See the attached screenshot.

Itโ€™s not working for me? No errors or anything?


Not Working for me

change โ€œnachrichtโ€ to โ€œargsโ€