From 5bcf7ca694e84c9fd735a71f9906299296a047aa Mon Sep 17 00:00:00 2001 From: WENKz Date: Sun, 17 Mar 2024 16:57:55 +0100 Subject: [PATCH] Fix(dispatch) Do not send the same event multiple times --- server/main.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/main.lua b/server/main.lua index b9d0f612..dcb109e8 100644 --- a/server/main.lua +++ b/server/main.lua @@ -14,6 +14,12 @@ RegisterServerEvent('ps-dispatch:server:notify', function(data) data.units = {} data.responses = {} + if #calls > 0 then + if calls[#calls] == data then + return + end + end + if #calls >= Config.MaxCallList then table.remove(calls, 1) end