Skip to content

Commit

Permalink
refactor: (mythic_notify) await callbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Mar 26, 2024
1 parent f8616fd commit 8ab2747
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions server-data/resources/[esx]/mythic_notify/client/main.lua
Original file line number Diff line number Diff line change
@@ -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)

Expand Down

0 comments on commit 8ab2747

Please sign in to comment.