From 8ab27477e72db2d7d0cfcdc0d0941f5ecbf8b7ac Mon Sep 17 00:00:00 2001 From: bitpredator <67551273+bitpredator@users.noreply.github.com> Date: Tue, 26 Mar 2024 12:09:38 +0100 Subject: [PATCH] refactor: (mythic_notify) await callbacks --- .../resources/[esx]/mythic_notify/client/main.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/server-data/resources/[esx]/mythic_notify/client/main.lua b/server-data/resources/[esx]/mythic_notify/client/main.lua index 210fdbde0..11cf22e32 100644 --- a/server-data/resources/[esx]/mythic_notify/client/main.lua +++ b/server-data/resources/[esx]/mythic_notify/client/main.lua @@ -1,15 +1,12 @@ -RegisterNetEvent("mythic_notify:client:SendAlert") -AddEventHandler("mythic_notify:client:SendAlert", function(data) +RegisterNetEvent("mythic_notify:client:SendAlert", function(data) SendAlert(data.type, data.text, data.length, data.style) end) -RegisterNetEvent("mythic_notify:client:SendUniqueAlert") -AddEventHandler("mythic_notify:client:SendUniqueAlert", function(data) +RegisterNetEvent("mythic_notify:client:SendUniqueAlert", function(data) SendUniqueAlert(data.id, data.type, data.text, data.length, data.style) end) -RegisterNetEvent("mythic_notify:client:PersistentAlert") -AddEventHandler("mythic_notify:client:PersistentAlert", function(data) +RegisterNetEvent("mythic_notify:client:PersistentAlert", function(data) PersistentAlert(data.action, data.id, data.type, data.text, data.style) end)