๐Ÿ“how to install

  1. Download the dependencies and make sure they are properly installed.

  2. Download mdev-staffduty from your keymaster, extract it to the resources folder and ensure it inside server.cfg after all of the dependencies.

  3. Configure the script to your liking and make sure to your webhooks in webhooks.lua

  4. Restart your server and enjoy!

How to use this script?

Export

if exports["mdev-staffduty"] and not exports["mdev-staffduty"]:inDienst(playerId) then
	TriggerClientEvent('esx:showNotification', playerId, 'You are not in staffduty', 5000)
	return
end

Example

Go to: es_extended/server/functions.lua

	RegisterCommand(name, function(playerId, args, rawCommand)
		local command = Core.RegisteredCommands[name]

		if not command.allowConsole and playerId == 0 then
			print(('[^3WARNING^7] ^5%s'):format(_U('commanderror_console')))
		else
			local xPlayer, error = ESX.GetPlayerFromId(playerId), nil
			
			if exports["mdev-staffduty"] and not exports["mdev-staffduty"]:inDienst(playerId) then
				TriggerClientEvent('esx:showNotification', playerId, 'You are not in staffduty', 5000)
				return
			end

			if command.suggestion then
				if command.suggestion.validate then
					if #args ~= #command.suggestion.arguments then
						error = _U('commanderror_argumentmismatch', #args, #command.suggestion.arguments)
					end
				end

Last updated